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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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, how I can find this driver to load it?