Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver'?


alexey3nemckovich@...
 

I am developing efi application that should work with network.
I found, that some drivers (including 'Realtek UEFI UNDI Driver') are not loaded, when BIOS option 'Fast boot' is on.
I'v tried to load it using EFI_FIRMWARE_VOLUME2_PROTOCOL, enumerating files of type EFI_FV_FILETYPE_DRIVER and loading them, in such way

Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiFirmwareVolumeProtocolGuid, NULL, &NoHandles, &Buffer);
if (!EFI_ERROR(Status)) {
for (Index = 0; Index < NoHandles; Index++) {
Status = gBS->HandleProtocol(Buffer[Index], &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Fv);
if (!EFI_ERROR(Status)) {

for (Index2 = 0; Index2 < sizeof(FileTypes)/sizeof(EFI_FV_FILETYPE); Index2++) {

FileType = FileTypes[Index2];

Key = AllocatePool(Fv->KeySize);
ASSERT(Key != NULL);
ZeroMem(Key, Fv->KeySize);

Index3 = 0;

do {
NextStatus = Fv->GetNextFile(Fv, Key, &FileType, &NameGuid, &Attributes, &Size);

if (EFI_SUCCESS == NextStatus/* && Index3 < 50*/) {

Print(L"1\n");

UiSection = NULL;
Status = Fv->ReadSection(
Fv,
&NameGuid,
EFI_SECTION_USER_INTERFACE,
0,
(VOID **)&UiSection,
&Size,
&Authentication
);

Print(L"3\n");

if (!EFI_ERROR(Status)) {

Print(L"4\n");

Print(L"%d) Found driver image '%s'\n", Index3, UiSection);

EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_HANDLE ImageHandle;

DevicePath = FvFileDevicePath(Buffer[Index], &NameGuid);

Status = gBS->LoadImage(FALSE, gImageHandle, DevicePath, NULL, 0, &ImageHandle);
if (!EFI_ERROR(Status)) {
//PERF_END(NULL, "BDS", NULL, 0);

Print(L"%d) Load image success '%s'\n", Index3, UiSection);

Status = gBS->StartImage(ImageHandle, NULL, NULL);

Some drivers were loaded, but there was not 'Realtek UEFI UNDI Driver' among them.
Maybe somebody knows from where and how I can load this UNDI driver?