ReactOS  0.4.12-dev-934-g9a4676f
bl.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING.ARM in the top level directory
3  * PROJECT: ReactOS UEFI Boot Library
4  * FILE: boot/environ/include/bl.h
5  * PURPOSE: Main Boot Library Header
6  * PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 #ifndef _BL_H
10 #define _BL_H
11 
12 /* INCLUDES ******************************************************************/
13 
14 /* C Headers */
15 #include <stdlib.h>
16 #include <stdio.h>
17 #include <wchar.h>
18 
19 /* NT Base Headers */
20 #include <ntifs.h>
21 
22 /* NDK Headers */
23 #include <ntndk.h>
24 
25 /* NT SafeInt Header */
26 #include <ntintsafe.h>
27 
28 /* PE Headers */
29 #include <ntimage.h>
30 
31 /* ACPI Headers */
32 #include <drivers/acpi/acpi.h>
33 
34 /* UEFI Headers */
35 #include <Uefi.h>
36 #include <DevicePath.h>
37 #include <LoadedImage.h>
38 #include <GraphicsOutput.h>
39 #include <UgaDraw.h>
40 #include <BlockIo.h>
41 #include <Acpi.h>
42 #include <GlobalVariable.h>
43 
44 /* Registry Headers */
45 #define __FREELDR_H
46 #include <cmlib.h>
47 
48 /* DEFINES *******************************************************************/
49 
50 DEFINE_GUID(BadMemoryGuid, 0x54B8275B, 0xD431, 0x473F, 0xAC, 0xFB, 0xE5, 0x36, 0xA0, 0x84, 0x94, 0xA3);
51 
52 #define BL_APPLICATION_FLAG_CONVERTED_FROM_EFI 0x01
53 
54 #define BL_APP_ENTRY_SIGNATURE "BTAPENT"
55 
56 #define BOOT_APPLICATION_SIGNATURE_1 'TOOB'
57 #define BOOT_APPLICATION_SIGNATURE_2 ' PPA'
58 
59 #define BOOT_MEMORY_TRANSLATION_TYPE_PHYSICAL 0
60 #define BOOT_MEMORY_TRANSLATION_TYPE_VIRTUAL 1
61 
62 #define BOOT_APPLICATION_VERSION 2
63 #define BL_MEMORY_DATA_VERSION 1
64 #define BL_RETURN_ARGUMENTS_VERSION 1
65 #define BL_FIRMWARE_DESCRIPTOR_VERSION 2
66 
67 #define BL_RETURN_ARGUMENTS_NO_PAE_FLAG 0x40
68 
69 #define BL_APPLICATION_ENTRY_FLAG_NO_GUID 0x01
70 #define BL_APPLICATION_ENTRY_BCD_OPTIONS_INTERNAL 0x02
71 #define BL_APPLICATION_ENTRY_WINLOAD 0x04
72 #define BL_APPLICATION_ENTRY_STARTUP 0x08
73 #define BL_APPLICATION_ENTRY_REBOOT_ON_ERROR 0x20
74 #define BL_APPLICATION_ENTRY_NTLDR 0x40
75 #define BL_APPLICATION_ENTRY_BCD_OPTIONS_EXTERNAL 0x80
76 #define BL_APPLICATION_ENTRY_WINRESUME 0x100
77 #define BL_APPLICATION_ENTRY_SETUPLDR 0x200
78 #define BL_APPLICATION_ENTRY_BOOTSECTOR 0x400
79 #define BL_APPLICATION_ENTRY_BOOTMGR 0x1000
80 #define BL_APPLICATION_ENTRY_DISPLAY_ORDER 0x800000
81 #define BL_APPLICATION_ENTRY_FIXED_SEQUENCE 0x20000000
82 #define BL_APPLICATION_ENTRY_RECOVERY 0x40000000
83 
84 #define BL_CONTEXT_PAGING_ON 1
85 #define BL_CONTEXT_INTERRUPTS_ON 2
86 
87 #define BL_MM_FLAG_USE_FIRMWARE_FOR_MEMORY_MAP_BUFFERS 0x01
88 #define BL_MM_FLAG_REQUEST_COALESCING 0x02
89 
90 #define BL_MM_ADD_DESCRIPTOR_COALESCE_FLAG 0x01
91 #define BL_MM_ADD_DESCRIPTOR_TRUNCATE_FLAG 0x02
92 #define BL_MM_ADD_DESCRIPTOR_NEVER_COALESCE_FLAG 0x10
93 #define BL_MM_ADD_DESCRIPTOR_NEVER_TRUNCATE_FLAG 0x20
94 #define BL_MM_ADD_DESCRIPTOR_ALLOCATE_FLAG 0x1000
95 #define BL_MM_ADD_DESCRIPTOR_UPDATE_LIST_POINTER_FLAG 0x2000
96 
97 #define BL_MM_INCLUDE_MAPPED_ALLOCATED 0x01
98 #define BL_MM_INCLUDE_MAPPED_UNALLOCATED 0x02
99 #define BL_MM_INCLUDE_UNMAPPED_ALLOCATED 0x04
100 #define BL_MM_INCLUDE_UNMAPPED_UNALLOCATED 0x08
101 #define BL_MM_INCLUDE_RESERVED_ALLOCATED 0x10
102 #define BL_MM_INCLUDE_BAD_MEMORY 0x20
103 #define BL_MM_INCLUDE_FIRMWARE_MEMORY 0x40
104 #define BL_MM_INCLUDE_TRUNCATED_MEMORY 0x80
105 #define BL_MM_INCLUDE_PERSISTENT_MEMORY 0x100
106 #define BL_MM_INCLUDE_FIRMWARE_MEMORY_2 0x200
107 
108 #define BL_MM_INCLUDE_NO_FIRMWARE_MEMORY (BL_MM_INCLUDE_PERSISTENT_MEMORY | \
109  BL_MM_INCLUDE_TRUNCATED_MEMORY | \
110  BL_MM_INCLUDE_BAD_MEMORY | \
111  BL_MM_INCLUDE_RESERVED_ALLOCATED | \
112  BL_MM_INCLUDE_UNMAPPED_UNALLOCATED | \
113  BL_MM_INCLUDE_UNMAPPED_ALLOCATED | \
114  BL_MM_INCLUDE_MAPPED_UNALLOCATED | \
115  BL_MM_INCLUDE_MAPPED_ALLOCATED)
117 
118 #define BL_MM_INCLUDE_ONLY_FIRMWARE_MEMORY (BL_MM_INCLUDE_FIRMWARE_MEMORY_2 | \
119  BL_MM_INCLUDE_FIRMWARE_MEMORY)
121 
122 #define BL_MM_REQUEST_DEFAULT_TYPE 1
123 #define BL_MM_REQUEST_TOP_DOWN_TYPE 2
124 
125 #define BL_MM_REMOVE_PHYSICAL_REGION_FLAG 0x40000000
126 #define BL_MM_REMOVE_VIRTUAL_REGION_FLAG 0x80000000
127 
128 #define BL_LIBRARY_FLAG_NO_DISPLAY 0x01
129 #define BL_LIBRARY_FLAG_REINITIALIZE 0x02
130 #define BL_LIBRARY_FLAG_REINITIALIZE_ALL 0x04
131 #define BL_LIBRARY_FLAG_ZERO_HEAP_ALLOCATIONS_ON_FREE 0x10
132 #define BL_LIBRARY_FLAG_INITIALIZATION_COMPLETED 0x20
133 #define BL_LIBRARY_FLAG_NO_GRAPHICS_CONSOLE 0x800
134 
135 #define BL_DISPLAY_GRAPHICS_FORCED_VIDEO_MODE_FLAG 0x01
136 #define BL_DISPLAY_GRAPHICS_FORCED_HIGH_RES_MODE_FLAG 0x02
137 
138 #define BL_HT_VALUE_IS_INLINE 0x01
139 
140 #define BL_FS_REGISTER_AT_HEAD_FLAG 1
141 
142 #define BL_BLOCK_DEVICE_REMOVABLE_FLAG 0x01
143 #define BL_BLOCK_DEVICE_PRESENT_FLAG 0x02
144 #define BL_BLOCK_DEVICE_VIRTUAL_FLAG 0x04
145 
146 #define BL_MEMORY_CLASS_SHIFT 28
147 
148 #define BL_FILE_READ_ACCESS 0x01
149 #define BL_FILE_WRITE_ACCESS 0x02
150 #define BL_DIRECTORY_ACCESS 0x04
151 #define BL_UNKNOWN_ACCESS 0x10
152 
153 #define BL_DEVICE_READ_ACCESS 0x01
154 #define BL_DEVICE_WRITE_ACCESS 0x02
155 
156 #define BL_DEVICE_ENTRY_OPENED 0x01
157 #define BL_DEVICE_ENTRY_READ_ACCESS 0x02
158 #define BL_DEVICE_ENTRY_WRITE_ACCESS 0x04
159 
160 #define BL_FILE_ENTRY_OPENED 0x01
161 #define BL_FILE_ENTRY_READ_ACCESS 0x02
162 #define BL_FILE_ENTRY_WRITE_ACCESS 0x04
163 #define BL_FILE_ENTRY_UNKNOWN_ACCESS 0x10
164 #define BL_FILE_ENTRY_DIRECTORY 0x10000
165 
166 #define BL_ETFS_FILE_ENTRY_DIRECTORY 0x01
167 
168 #define BL_IMG_VALID_FILE 0x01
169 #define BL_IMG_MEMORY_FILE 0x02
170 #define BL_IMG_REMOTE_FILE 0x04
171 
172 #define BL_LOAD_IMG_VIRTUAL_BUFFER 0x01
173 #define BL_LOAD_IMG_EXISTING_BUFFER 0x04
174 #define BL_LOAD_IMG_UNKNOWN_BUFFER_FLAG 0x08
175 #define BL_LOAD_IMG_COMPUTE_SIGNATURE 0x10
176 #define BL_LOAD_IMG_COMPUTE_HASH 0x40000
177 
178 #define BL_LOAD_PE_IMG_VIRTUAL_BUFFER BL_LOAD_IMG_VIRTUAL_BUFFER
179 #define BL_LOAD_PE_IMG_CHECK_MACHINE 0x02
180 #define BL_LOAD_PE_IMG_EXISTING_BUFFER BL_LOAD_IMG_EXISTING_BUFFER
181 #define BL_LOAD_PE_IMG_COMPUTE_HASH 0x10
182 #define BL_LOAD_PE_IMG_CHECK_SUBSYSTEM 0x80
183 #define BL_LOAD_PE_IMG_SKIP_RELOCATIONS 0x100
184 #define BL_LOAD_PE_IMG_CHECK_FORCED_INTEGRITY 0x200
185 #define BL_LOAD_PE_IMG_IGNORE_CHECKSUM_MISMATCH 0x10000
186 #define BL_LOAD_PE_IMG_VALIDATE_ORIGINAL_FILENAME 0x400000
187 
188 #define BL_UTL_CHECKSUM_COMPLEMENT 0x10000
189 #define BL_UTL_CHECKSUM_ROTATE 0x20000
190 #define BL_UTL_CHECKSUM_NEGATE 0x40000
191 #define BL_UTL_CHECKSUM_UCHAR_BUFFER 0x01
192 #define BL_UTL_CHECKSUM_USHORT_BUFFER 0x02
193 
194 /* ENUMERATIONS **************************************************************/
195 
196 typedef enum _BL_COLOR
197 {
214 } BL_COLOR, *PBL_COLOR;
215 
216 typedef enum _BL_MENU_POLICY
217 {
221 
223 {
228 
230 {
236 
237 typedef enum _BL_ARCH_MODE
238 {
241 } BL_ARCH_MODE;
242 
243 //
244 // Boot Device Types
245 //
246 typedef enum _BL_DEVICE_TYPE
247 {
256 
257 //
258 // Local Device Types
259 //
261 {
269 
270 //
271 // Partition types
272 //
273 typedef enum _BL_PARTITION_TYPE
274 {
279 
280 //
281 // File Path Types
282 //
283 typedef enum _BL_PATH_TYPE
284 {
287 } BL_PATH_TYPE;
288 
289 //
290 // Classes of Memory
291 //
292 typedef enum _BL_MEMORY_CLASS
293 {
298 
299 //
300 // Types of Memory
301 //
302 typedef enum _BL_MEMORY_TYPE
303 {
304  //
305  // Loader Memory
306  //
307  BlLoaderMemory = 0xD0000002,
308  BlLoaderDeviceMemory = 0xD0000004,
309  BlLoaderHeap = 0xD0000005,
310  BlLoaderPageDirectory = 0xD0000006,
311  BlLoaderReferencePage = 0xD0000007,
312  BlLoaderRamDisk = 0xD0000008,
313  BlLoaderArchData = 0xD0000009,
314  BlLoaderData = 0xD000000A,
315  BlLoaderRegistry = 0xD000000B,
316  BlLoaderBlockMemory = 0xD000000C,
317  BlLoaderSelfMap = 0xD000000F,
318 
319  //
320  // Application Memory
321  //
322  BlApplicationReserved = 0xE0000001,
323  BlApplicationData = 0xE0000004,
324 
325  //
326  // System Memory
327  //
328  BlConventionalMemory = 0xF0000001,
329  BlUnusableMemory = 0xF0000002,
330  BlReservedMemory = 0xF0000003,
331  BlEfiBootMemory = 0xF0000004,
334  BlAcpiReclaimMemory = 0xF0000008,
335  BlAcpiNvsMemory = 0xF0000009,
336  BlDeviceIoMemory = 0xF000000A,
337  BlDevicePortMemory = 0xF000000B,
338  BlPalMemory = 0xF000000C,
341 
342 typedef enum _BL_MEMORY_ATTR
343 {
344  //
345  // Memory Caching Attributes
346  //
347  BlMemoryUncached = 0x00000001,
348  BlMemoryWriteCombined = 0x00000002,
349  BlMemoryWriteThrough = 0x00000004,
350  BlMemoryWriteBack = 0x00000008,
354 
355  //
356  // Memory Protection Attributes
357  //
359  BlMemoryReadProtected = 0x00000200,
363 
364  //
365  // Memory Allocation Attributes
366  //
367  BlMemoryLargePages = 0x00010000,
368  BlMemoryKernelRange = 0x00020000,
369  BlMemoryFixed = 0x00040000,
370  BlMemoryBelow1MB = 0x00080000,
373 
374  //
375  // Memory Type Attributes
376  //
377  BlMemoryRuntime = 0x01000000,
378  BlMemoryCoalesced = 0x02000000,
379  BlMemoryUpdate = 0x04000000,
380  BlMemoryNonFirmware = 0x08000000,
381  BlMemoryPersistent = 0x10000000,
382  BlMemorySpecial = 0x20000000,
383  BlMemoryFirmware = 0x80000000,
387 
388 /* CALLBACKS *****************************************************************/
389 
390 struct _BL_FILE_ENTRY;
391 struct _BL_FILE_INFORMATION;
392 typedef
393 NTSTATUS
395  _In_ struct _BL_FILE_ENTRY* Directory,
397  _In_ ULONG Flags,
398  _Out_ struct _BL_FILE_ENTRY** FileEntry
399  );
400 
401 typedef
402 NTSTATUS
404  _In_ struct _BL_FILE_ENTRY* FileEntry
405  );
406 
407 typedef
408 NTSTATUS
410  _In_ struct _BL_FILE_ENTRY* FileEntry,
411  _In_ PVOID Buffer,
412  _In_ ULONG Size,
414  );
415 
416 typedef
417 NTSTATUS
419  VOID
420  );
421 
422 typedef
423 NTSTATUS
425  VOID
426  );
427 
428 typedef
429 NTSTATUS
431  _In_ struct _BL_FILE_ENTRY* FileEntry,
433  );
434 
435 typedef
436 NTSTATUS
438  _In_ struct _BL_FILE_ENTRY* FileEntry,
440  );
441 
442 typedef
443 NTSTATUS
445  VOID
446  );
447 
448 typedef
449 NTSTATUS
451  VOID
452  );
453 
454 typedef
455 NTSTATUS
457  _In_ ULONG DeviceId,
459  _Out_ struct _BL_FILE_ENTRY** FileEntry
460  );
461 
462 typedef
463 NTSTATUS
465  VOID
466  );
467 
468 typedef
469 NTSTATUS
472  );
473 
474 struct _BL_TEXT_CONSOLE;
475 struct _BL_DISPLAY_STATE;
476 struct _BL_DISPLAY_MODE;
477 struct _BL_INPUT_CONSOLE;
478 struct _BL_REMOTE_CONSOLE;
479 struct _BL_GRAPHICS_CONSOLE;
480 typedef
481 VOID
484  );
485 
486 typedef
487 NTSTATUS
490  );
491 
492 typedef
493 NTSTATUS
495  _In_ struct _BL_TEXT_CONSOLE* Console,
496  _Out_ struct _BL_DISPLAY_STATE* TextState
497  );
498 
499 typedef
500 NTSTATUS
502  _In_ struct _BL_TEXT_CONSOLE* Console,
503  _In_ ULONG Flags,
504  _In_ struct _BL_DISPLAY_STATE* TextState
505  );
506 
507 typedef
508 NTSTATUS
510  _In_ struct _BL_TEXT_CONSOLE* Console,
512  );
513 
514 typedef
515 NTSTATUS
517  _In_ struct _BL_TEXT_CONSOLE* Console,
518  _In_ ULONG NewTextResolution,
519  _Out_ PULONG OldTextResolution
520  );
521 
522 typedef
523 NTSTATUS
525  _In_ struct _BL_TEXT_CONSOLE* Console,
526  _In_ BOOLEAN LineOnly
527  );
528 
529 typedef
530 BOOLEAN
533  );
534 
535 typedef
536 NTSTATUS
540  );
541 
542 typedef
543 NTSTATUS
547  );
548 
549 typedef
550 NTSTATUS
554 );
555 
556 typedef
557 NTSTATUS
559  _In_ struct _BL_TEXT_CONSOLE* Console,
560  _In_ PCHAR Text,
561  _In_ ULONG Attribute
562  );
563 
564 typedef
565 BOOLEAN
567  _In_ PVOID Entry,
570  _In_ PVOID Argument3,
571  _In_ PVOID Argument4
572  );
573 
574 typedef
575 NTSTATUS
577  _In_ PVOID Entry,
578  _In_ ULONG EntryIndex
579  );
580 
581 typedef
582 NTSTATUS
585  );
586 
587 typedef
588 NTSTATUS
590  VOID
591  );
592 
593 struct _BL_HASH_ENTRY;
594 typedef
595 BOOLEAN
597  _In_ struct _BL_HASH_ENTRY* Entry1,
598  _In_ struct _BL_HASH_ENTRY* Entry2
599  );
600 
601 typedef
602 ULONG
604  _In_ struct _BL_HASH_ENTRY* Entry,
606  );
607 
608 struct _BL_DEVICE_ENTRY;
609 struct _BL_DEVICE_DESCRIPTOR;
611 
612 typedef
613 NTSTATUS
615  VOID
616  );
617 
618 typedef
619 NTSTATUS
622  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry
623  );
624 
625 typedef
626 NTSTATUS
628  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry
629  );
630 
631 typedef
632 NTSTATUS
634  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry,
635  _In_ PVOID Buffer,
636  _In_ ULONG Size,
638  );
639 
640 typedef
641 NTSTATUS
643  VOID
644  );
645 
646 typedef
647 NTSTATUS
649  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry,
650  _Out_ struct _BL_DEVICE_INFORMATION* DeviceInformation
651  );
652 
653 typedef
654 NTSTATUS
656  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry,
657  _In_ struct _BL_DEVICE_INFORMATION* DeviceInformation
658  );
659 
660 typedef
661 NTSTATUS
663  VOID
664  );
665 
666 typedef
667 NTSTATUS
669  VOID
670  );
671 
672 typedef
673 NTSTATUS
675  VOID
676  );
677 
678 typedef VOID
680  VOID
681  );
682 
683 typedef VOID
685  VOID
686  );
687 
688 typedef NTSTATUS
693  );
694 
695 typedef NTSTATUS
699  );
700 
701 typedef VOID
703  VOID
704  );
705 
706 typedef VOID
709  );
710 
711 typedef VOID
712 (*PBL_MM_FLUSH_TLB) (
713  VOID
714  );
715 
716 typedef NTSTATUS
719  _In_ ULONG Size
720  );
721 
722 typedef NTSTATUS
726  _In_ ULONG Size,
727  _In_ ULONG CacheAttributes
728  );
729 
730 typedef NTSTATUS
734  _In_ ULONG Size,
735  _In_ ULONG CacheAttributes
736  );
737 
738 typedef BOOLEAN
742  _Out_opt_ PULONG CacheAttributes
743  );
744 
745 typedef NTSTATUS
748  _In_ ULONG Parameter1,
749  _In_ ULONG_PTR Parameter2,
750  _In_ ULONG_PTR Parameter3,
751  _In_ ULONG_PTR Parameter4
752  );
753 
754 /* DATA STRUCTURES ***********************************************************/
755 
757 {
767 
768 /* This should eventually go into a more public header */
770 {
771  /* This header tells the library what image we're dealing with */
777 
778  /* Where is the image located */
781 
782  /* Offset to BL_MEMORY_DATA */
784 
785  /* Offset to BL_APPLICATION_ENTRY */
787 
788  /* Offset to BL_DEVICE_DESCRPIPTOR */
790 
791  /* Offset to BL_FIRMWARE_PARAMETERS */
793 
794  /* Offset to BL_RETURN_ARGUMENTS */
797 
798 typedef struct _BL_MEMORY_DATA
799 {
806 
808 {
814 
815 typedef struct _BL_RETURN_ARGUMENTS
816 {
823 
824 typedef struct _BL_MEMORY_DESCRIPTOR
825 {
827  union
828  {
829  struct
830  {
833  };
834  struct
835  {
838  };
839  };
844 
845 typedef struct _BL_BCD_OPTION
846 {
854 
855 typedef struct _BL_APPLICATION_ENTRY
856 {
863 
865 {
870 
871 typedef struct _BL_MENU_STATUS
872 {
873  union
874  {
875  struct
876  {
881  ULONG Exit : 1;
883  };
885  };
889 
891 {
892  Reboot = 1,
893  Recover = 2,
896  NextOs = 5,
897  TryAgain = 6,
901 
902 typedef struct _BL_HARDDISK_DEVICE
903 {
905  union
906  {
907  struct
908  {
910  } Mbr;
911 
912  struct
913  {
915  } Gpt;
916 
917  struct
918  {
920  } Raw;
921  };
923 
924 typedef struct _BL_LOCAL_DEVICE
925 {
927  union
928  {
929  struct
930  {
932  } FloppyDisk;
933 
935 
937 
938  struct
939  {
943  } RamDisk;
944 
945  ULONG File; // unknown for now
946  };
948 
949 typedef struct _BL_DEVICE_DESCRIPTOR
950 {
955  union
956  {
958 
959  struct
960  {
961  ULONG Unknown;
962  } Remote;
963 
964  struct
965  {
966  union
967  {
969  } Mbr;
970 
971  union
972  {
974  } Gpt;
975 
977  } Partition;
978  };
980 
982 {
988 
990 {
997 
998 typedef struct _BL_ARCH_CONTEXT
999 {
1004 
1006 {
1012 
1013 typedef struct _BL_ADDRESS_RANGE
1014 {
1018 
1019 typedef struct _BL_FILE_INFORMATION
1020 {
1026 
1027 typedef struct _BL_FILE_CALLBACKS
1028 {
1037 
1038 typedef struct _BL_FILE_ENTRY
1039 {
1051 
1053 {
1060 
1062 {
1068 
1069 typedef struct _BL_DISPLAY_STATE
1070 {
1077 
1078 typedef struct _BL_DISPLAY_MODE
1079 {
1084 
1086 {
1096 
1098 {
1108 
1109 typedef struct _BL_TEXT_CONSOLE
1110 {
1119 
1121 {
1124  //PCONSOLE_IS_KEY_PENDING IsKeyPending;
1125  //PCONSOLE_READ_INPUT ReadInput;
1126  //PCONSOLE_ERASE_BUFFER EraseBuffer;
1127  //PCONSOLE_FILL_BUFFER FillBuffer;
1129 
1130 typedef struct _BL_INPUT_CONSOLE
1131 {
1138 
1140 {
1144 
1145 typedef struct _BL_GRAPHICS_CONSOLE
1146 {
1163 
1164 typedef struct _BL_REMOTE_CONSOLE
1165 {
1168 
1169 typedef struct _BL_HASH_TABLE
1170 {
1176 
1177 typedef struct _BL_HASH_ENTRY
1178 {
1183 
1184 typedef struct _BL_HASH_VALUE
1185 {
1189 
1190 typedef struct _BL_HASH_NODE
1191 {
1196 
1198 {
1208  struct
1209  {
1210  union
1211  {
1212  struct
1213  {
1215  } Mbr;
1216  struct
1217  {
1219  } Gpt;
1220  };
1221  } Disk;
1223 
1225 {
1227  union
1228  {
1230  };
1232 
1233 typedef struct _BL_BLOCK_DEVICE
1234 {
1240 
1241 typedef struct _BL_PROTOCOL_HANDLE
1242 {
1246 
1247 typedef struct _BL_DEVICE_CALLBACKS
1248 {
1260 
1261 typedef struct _BL_DEVICE_ENTRY
1262 {
1271 
1272 typedef struct _BL_IMG_FILE
1273 {
1275  union
1276  {
1279  };
1283 
1285 {
1290 
1292 {
1297 
1299 {
1305 
1306 #pragma pack(push)
1307 #pragma pack(1)
1308 typedef struct _BMP_HEADER
1309 {
1315 
1316 typedef struct _DIB_HEADER
1317 {
1330 
1331 typedef struct _BITMAP
1332 {
1335 } BITMAP, *PBITMAP;
1336 #pragma pack(pop)
1337 
1338 typedef struct _COORD
1339 {
1342 } COORD, *PCOORD;
1343 
1344 typedef struct _BL_PD_DATA_BLOB
1345 {
1350 
1351 /* INLINE ROUTINES ***********************************************************/
1352 
1354 VOID
1356  _Out_ PBL_LIBRARY_PARAMETERS LibraryParameters
1357  )
1358 {
1359  BL_LIBRARY_PARAMETERS DefaultParameters =
1360  {
1361  0x20,
1362  BlVirtual,
1363  1024,
1364  2 * 1024 * 1024,
1365  0,
1366  NULL,
1367  0,
1368  NULL
1369  };
1370 
1371  /* Copy the defaults */
1372  RtlCopyMemory(LibraryParameters, &DefaultParameters, sizeof(*LibraryParameters));
1373 }
1374 
1376 VOID
1379  )
1380 {
1381  /* Initialize the list */
1382  InitializeListHead(&List->ListHead);
1383  List->First = &List->ListHead;
1384  List->This = NULL;
1385  List->Type = 0;
1386 }
1387 
1389 PVOID
1392 {
1394 }
1395 
1396 /* INITIALIZATION ROUTINES ***************************************************/
1397 
1398 NTSTATUS
1400  _In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootAppParameters,
1401  _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
1402  );
1403 
1404 NTSTATUS
1406  _In_ ULONG Phase
1407  );
1408 
1409 NTSTATUS
1411  _In_ ULONG Phase,
1412  _In_ PBL_FIRMWARE_DESCRIPTOR FirmwareParameters
1413  );
1414 
1415 NTSTATUS
1417  _In_ PBL_MEMORY_DATA MemoryData,
1418  _In_ BL_TRANSLATION_TYPE TranslationType,
1419  _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
1420  );
1421 
1422 NTSTATUS
1424  VOID
1425  );
1426 
1427 NTSTATUS
1429  _In_ PBL_MEMORY_DATA MemoryData,
1430  _In_ ULONG MinimumPages
1431  );
1432 
1433 NTSTATUS
1435  _In_ ULONG Phase,
1436  _In_ PBL_MEMORY_DATA MemoryData,
1437  _In_ BL_TRANSLATION_TYPE TranslationType,
1438  _In_ BL_TRANSLATION_TYPE LibraryTranslationType
1439  );
1440 
1441 NTSTATUS
1444  _In_ ULONG HeapAttributes
1445  );
1446 
1447 VOID
1449  _In_ ULONG Phase,
1450  _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
1451  );
1452 
1453 NTSTATUS
1455  VOID
1456  );
1457 
1458 NTSTATUS
1460  VOID
1461  );
1462 
1463 NTSTATUS
1465  VOID
1466  );
1467 
1468 NTSTATUS
1470  _In_ ULONG Flags
1471  );
1472 
1473 NTSTATUS
1475  VOID
1476  );
1477 
1478 VOID
1480  VOID
1481  );
1482 
1483 NTSTATUS
1484 BcInitialize (
1485  VOID
1486  );
1487 
1488 /* FIRMWARE ROUTINES *********************************************************/
1489 
1490 VOID
1491 EfiPrintf (
1492  _In_ PWCHAR Format,
1493  ...
1494  );
1495 
1496 NTSTATUS
1499  );
1500 
1501 NTSTATUS
1504  );
1505 
1506 NTSTATUS
1508  _In_ ULONG Type,
1509  _In_ ULONG Pages,
1511  );
1512 
1513 NTSTATUS
1514 EfiStall (
1515  _In_ ULONG StallTime
1516  );
1517 
1518 NTSTATUS
1520  VOID
1521  );
1522 
1523 NTSTATUS
1524 EfiConInReset (
1525  VOID
1526  );
1527 
1528 NTSTATUS
1530  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1532  );
1533 
1534 NTSTATUS
1536  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1537  _In_ ULONG Mode,
1538  _In_ UINTN* Columns,
1539  _In_ UINTN* Rows
1540  );
1541 
1542 NTSTATUS
1544  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1545  _In_ ULONG Mode
1546  );
1547 
1548 VOID
1550  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1552  );
1553 
1554 NTSTATUS
1556  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1557  _In_ ULONG Attribute
1558  );
1559 
1560 NTSTATUS
1562  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1563  _In_ ULONG Column,
1564  _In_ ULONG Row
1565  );
1566 
1567 NTSTATUS
1569  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1570  _In_ BOOLEAN Visible
1571  );
1572 
1573 NTSTATUS
1575  _In_ EFI_LOCATE_SEARCH_TYPE SearchType,
1577  _Inout_ PULONG HandleCount,
1579  );
1580 
1581 NTSTATUS
1586  );
1587 
1588 NTSTATUS
1592  );
1593 
1594 NTSTATUS
1596  _In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
1597  _Out_ UINTN* Mode,
1599  );
1600 
1601 NTSTATUS
1602 EfiGopSetMode (
1603  _In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
1604  _In_ ULONG Mode
1605  );
1606 
1607 VOID
1609  _In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
1611  _Out_ UINTN *FrameBufferSize
1612  );
1613 
1614 VOID
1616  _In_ EFI_RESET_TYPE ResetType
1617  );
1618 
1621  _In_ EFI_DEVICE_PATH *DevicePath
1622  );
1623 
1626  _In_ EFI_DEVICE_PATH *DevicePath1,
1627  _In_ EFI_DEVICE_PATH *DevicePath2
1628  );
1629 
1630 NTSTATUS
1631 EfipGetRsdt (
1632  _Out_ PPHYSICAL_ADDRESS FoundRsdt
1633  );
1634 
1635 NTSTATUS
1636 EfiFreePages (
1637  _In_ ULONG Pages,
1639  );
1640 
1641 /* PLATFORM TIMER ROUTINES ***************************************************/
1642 
1643 NTSTATUS
1645  VOID
1646  );
1647 
1648 ULONGLONG
1651  );
1652 
1653 ULONGLONG
1655  VOID
1656  );
1657 
1658 /* RESOURCE LOCALE INTERNATIONALIZATION ROUTINES *****************************/
1659 
1660 NTSTATUS
1662  _In_ PWCHAR Locale
1663  );
1664 
1665 /* FONT ROUTINES *************************************************************/
1666 
1667 VOID
1669  _In_ PBL_DEFERRED_FONT_FILE DeferredFontFile
1670  );
1671 
1672 NTSTATUS
1675  _In_ PWCHAR FontPath
1676  );
1677 
1678 NTSTATUS
1680  VOID
1681  );
1682 
1683 NTSTATUS
1684 BfClearScreen (
1686  );
1687 
1688 NTSTATUS
1691  );
1692 
1693 /* FILESYSTEM ROUTINES *******************************************************/
1694 
1695 NTSTATUS
1696 FatInitialize (
1697  VOID
1698  );
1699 
1700 NTSTATUS
1701 FatMount (
1702  _In_ ULONG DeviceId,
1703  _In_ ULONG Unknown,
1704  _Out_ PBL_FILE_ENTRY* FileEntry
1705  );
1706 
1707 NTSTATUS
1709  VOID
1710  );
1711 
1712 NTSTATUS
1713 EtfsMount (
1714  _In_ ULONG DeviceId,
1715  _In_ ULONG Unknown,
1716  _Out_ PBL_FILE_ENTRY* FileEntry
1717  );
1718 
1719 /* DEBUG ROUTINES ************************************************************/
1720 
1721 BOOLEAN
1723  VOID
1724  );
1725 
1726 NTSTATUS
1731  );
1732 
1733 VOID
1734 BlStatusPrint (
1735  _In_ PCWCH Format,
1736  ...
1737  );
1738 
1739 VOID
1740 BlStatusError (
1742  _In_ ULONG Parameter1,
1743  _In_ ULONG_PTR Parameter2,
1744  _In_ ULONG_PTR Parameter3,
1745  _In_ ULONG_PTR Parameter4
1746  );
1747 
1748 /* UTILITY ROUTINES **********************************************************/
1749 
1750 VOID
1751 BlArchCpuId (
1753  _In_ ULONG SubFunction,
1755  );
1756 
1759  VOID
1760  );
1761 
1762 BOOLEAN
1765  );
1766 
1767 VOID
1769  _In_ ULONG Percentage,
1770  _Out_opt_ PBOOLEAN Completed
1771  );
1772 
1773 NTSTATUS
1775  _Out_ PVOID* TableAddress,
1777  );
1778 
1779 NTSTATUS
1781  VOID
1782  );
1783 
1784 NTSTATUS
1786  VOID
1787  );
1788 
1789 ULONG
1790 BlUtlCheckSum (
1791  _In_ ULONG PartialSum,
1792  _In_ PUCHAR Buffer,
1793  _In_ ULONG Length,
1794  _In_ ULONG Flags
1795  );
1796 
1797 NTSTATUS
1799  _Out_ PVOID* ImageBase,
1800  _Out_ PULONG ImageSize
1801  );
1802 
1803 VOID
1806  );
1807 
1808 NTSTATUS
1809 BlPdQueryData (
1810  _In_ const GUID* DataGuid,
1811  _In_ PVOID Unknown,
1812  _Inout_ PBL_PD_DATA_BLOB DataBlob
1813  );
1814 
1815 /* FIRMWARE UTILITY ROUTINES *************************************************/
1816 
1817 EFI_STATUS
1820  );
1821 
1822 NTSTATUS
1824  _In_ EFI_STATUS EfiStatus
1825  );
1826 
1827 VOID
1828 BlFwReboot (
1829  VOID
1830  );
1831 
1832 NTSTATUS
1833 MmFwFreePages (
1834  _In_ ULONG BasePage,
1835  _In_ ULONG PageCount
1836  );
1837 
1838 PGUID
1840  VOID
1841  );
1842 
1843 NTSTATUS
1845  VOID
1846  );
1847 
1848 NTSTATUS
1850  _Out_ PBOOLEAN SecureBootEnabled
1851  );
1852 
1853 NTSTATUS
1855  VOID
1856  );
1857 
1858 /* RESOURCE ROUTINES *********************************************************/
1859 
1860 PWCHAR
1862  _In_ ULONG MsgId
1863  );
1864 
1865 PWCHAR
1867  VOID
1868  );
1869 
1870 NTSTATUS
1872  VOID
1873  );
1874 
1875 /* TABLE ROUTINES ************************************************************/
1876 
1877 NTSTATUS
1878 BlTblMap (
1879  _In_ PVOID *Table,
1880  _In_ ULONG Count,
1881  _In_ PBL_TBL_MAP_ROUTINE MapCallback
1882  );
1883 
1884 PVOID
1886  _In_ PVOID *Table,
1887  _In_ ULONG Count,
1888  _Out_ PULONG EntryIndex,
1892  _In_ PVOID Argument3,
1893  _In_ PVOID Argument4
1894  );
1895 
1896 NTSTATUS
1897 BlTblSetEntry (
1898  _Inout_ PVOID** Table,
1900  _In_ PVOID Entry,
1901  _Out_ PULONG EntryIndex,
1903  );
1904 
1905 NTSTATUS
1907  _In_ PVOID Entry
1908  );
1909 
1910 /* HASH TABLE ROUTINES *******************************************************/
1911 
1912 NTSTATUS
1913 BlHtStore (
1914  _In_ ULONG TableId,
1916  _In_ PVOID Data,
1918  );
1919 
1920 NTSTATUS
1921 BlHtDelete (
1922  _In_ ULONG TableId,
1924  );
1925 
1926 NTSTATUS
1927 BlHtLookup (
1928  _In_ ULONG TableId,
1931  );
1932 
1933 NTSTATUS
1934 BlHtCreate (
1935  _In_ ULONG Size,
1936  _In_ PBL_HASH_TABLE_HASH_FUNCTION HashFunction,
1937  _In_ PBL_HASH_TABLE_COMPARE_FUNCTION CompareFunction,
1938  _Out_ PULONG Id
1939  );
1940 
1941 /* BCD OPTION ROUTINES *******************************************************/
1942 
1946  _In_ ULONG Type
1947  );
1948 
1949 ULONG
1951  _In_ PBL_BCD_OPTION BcdOption
1952  );
1953 
1954 ULONG
1956  _In_ PBL_BCD_OPTION BcdOption
1957  );
1958 
1959 NTSTATUS
1962  _In_ ULONG Type,
1963  _Out_ PWCHAR* Value
1964  );
1965 
1966 NTSTATUS
1969  _In_ ULONG Type,
1971  );
1972 
1973 NTSTATUS
1976  _In_ ULONG Type,
1978  );
1979 
1980 NTSTATUS
1983  _In_ ULONG Type,
1986  _In_ BOOLEAN NoCopy
1987  );
1988 
1989 NTSTATUS
1992  _In_ ULONG Type,
1994  _In_opt_ PBL_BCD_OPTION* ExtraOptions
1995  );
1996 
1997 NTSTATUS
2000  _In_ ULONG Type,
2001  _Out_ PGUID Value
2002  );
2003 
2004 NTSTATUS
2007  _In_ ULONG Type,
2008  _Out_ PGUID *Value,
2009  _In_ PULONG Count
2010  );
2011 
2012 NTSTATUS
2014  _In_ PBL_BCD_OPTION OptionList,
2015  _Out_ PBL_BCD_OPTION *CopiedOptions
2016  );
2017 
2018 NTSTATUS
2021  _In_ ULONG OptionId,
2023  );
2024 
2025 NTSTATUS
2028  _In_ ULONG OptionId,
2030  );
2031 
2032 NTSTATUS
2035  _In_ ULONG OptionId,
2036  _In_ PWCHAR OptionString
2037  );
2038 
2039 NTSTATUS
2043  );
2044 
2045 VOID
2048  _In_ ULONG Type
2049  );
2050 
2051 NTSTATUS
2054  _In_ PBL_BCD_OPTION NewOptions
2055  );
2056 
2057 /* BOOT REGISTRY ROUTINES ****************************************************/
2058 
2059 VOID
2060 BiCloseKey (
2062  );
2063 
2064 NTSTATUS
2065 BiOpenKey(
2066  _In_ HANDLE ParentHandle,
2069  );
2070 
2071 NTSTATUS
2072 BiLoadHive (
2074  _Out_ PHANDLE HiveHandle
2075  );
2076 
2077 NTSTATUS
2081  _In_ ULONG Type,
2082  _Out_ PVOID* Buffer,
2084  );
2085 
2086 NTSTATUS
2089  _Out_ PWCHAR** SubKeyList,
2090  _Out_ PULONG SubKeyCount
2091  );
2092 
2093 NTSTATUS
2094 BiDeleteKey (
2096  );
2097 
2098 VOID
2101  );
2102 
2103 /* CONTEXT ROUTINES **********************************************************/
2104 
2105 VOID
2107  _In_ BL_ARCH_MODE NewMode
2108  );
2109 
2110 VOID
2112  VOID
2113  );
2114 
2115 VOID
2117  VOID
2118  );
2119 
2120 /* MEMORY DESCRIPTOR ROUTINES ************************************************/
2121 
2122 VOID
2124  _In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList,
2125  _In_opt_ ULONG MaxCount
2126 );
2127 
2128 VOID
2130  _In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList,
2131  _In_ ULONG Type,
2132  _In_ PLIST_ENTRY ListHead
2133  );
2134 
2137  _In_ ULONG WhichList,
2138  _In_ ULONG Flags,
2139  _In_ ULONGLONG Page
2140  );
2141 
2145  _In_ ULONG Flags,
2146  _In_ ULONGLONG Page
2147  );
2148 
2149 NTSTATUS
2150 MmMdCopyList (
2151  _In_ PBL_MEMORY_DESCRIPTOR_LIST DestinationList,
2153  _In_opt_ PBL_MEMORY_DESCRIPTOR ListDescriptor,
2154  _Out_ PULONG ActualCount,
2155  _In_ ULONG Count,
2156  _In_ ULONG Flags
2157  );
2158 
2159 ULONG
2160 MmMdCountList (
2162  );
2163 
2164 VOID
2165 MmMdFreeList(
2167  );
2168 
2171  _In_ ULONG Flags,
2173  _In_ ULONGLONG BasePage,
2174  _In_ ULONGLONG VirtualPage,
2175  _In_ ULONGLONG PageCount
2176  );
2177 
2178 VOID
2180  VOID
2181  );
2182 
2183 NTSTATUS
2187  _In_ ULONG Flags
2188  );
2189 
2190 NTSTATUS
2194  _In_ ULONGLONG BasePage
2195  );
2196 
2197 VOID
2201  );
2202 
2203 BOOLEAN
2207  _In_ ULONGLONG Pages,
2208  _In_ PBL_ADDRESS_RANGE BaseRange,
2209  _In_ PBL_ADDRESS_RANGE VirtualRange,
2210  _In_ BOOLEAN TopDown,
2211  _In_ BL_MEMORY_TYPE MemoryType,
2212  _In_ ULONG Flags,
2214  );
2215 
2216 NTSTATUS
2219  __in ULONG Flags,
2220  __in ULONGLONG BasePage,
2221  __in ULONGLONG PageCount,
2223  );
2224 
2225 NTSTATUS
2228  );
2229 
2230 /* PAGE ALLOCATOR ROUTINES ***************************************************/
2231 
2232 NTSTATUS
2234  _In_ ULONGLONG BasePage
2235  );
2236 
2237 NTSTATUS
2240  _In_ BL_MEMORY_TYPE MemoryType,
2241  _In_ ULONGLONG PageCount,
2244  );
2245 
2246 NTSTATUS
2249  _In_ BL_MEMORY_TYPE MemoryType,
2250  _In_ ULONGLONG Pages,
2255  _In_ ULONG RangeType
2256  );
2257 
2258 NTSTATUS
2261  );
2262 
2263 NTSTATUS
2267  _In_ ULONG PageCount
2268  );
2269 
2270 NTSTATUS
2273  );
2274 
2275 NTSTATUS
2277  _In_ PVOID Address,
2278  _In_ ULONG WhichList
2279  );
2280 
2281 NTSTATUS
2284  _In_ BL_MEMORY_TYPE MemoryType,
2285  _In_ ULONGLONG Pages,
2289  _In_ ULONG Type
2290  );
2291 
2292 NTSTATUS
2295  _In_ ULONG Flags
2296  );
2297 
2298 NTSTATUS
2300  VOID
2301  );
2302 
2303 NTSTATUS
2305  VOID
2306  );
2307 
2308 NTSTATUS
2311  _In_ PBL_BUFFER_DESCRIPTOR MemoryParameters,
2312  _In_ ULONG WhichTypes,
2313  _In_ ULONG Flags
2314  );
2315 
2316 /* VIRTUAL MEMORY ROUTINES ***************************************************/
2317 
2318 NTSTATUS
2320  _Out_ PVOID* MappingAddress,
2321  _In_ PVOID PreferredAddress,
2324  _In_ ULONG Flags,
2326  );
2327 
2328 NTSTATUS
2333  _In_ ULONG CacheAttributes
2334  );
2335 
2336 NTSTATUS
2340  );
2341 
2342 NTSTATUS
2348  );
2349 
2350 NTSTATUS
2354  );
2355 
2356 BOOLEAN
2360  );
2361 
2362 BOOLEAN
2366  _Out_opt_ PULONG CachingFlags
2367  );
2368 
2369 /* BLOCK ALLOCATOR ROUTINES **************************************************/
2370 
2371 NTSTATUS
2373  VOID
2374  );
2375 
2376 /* HEAP ALLOCATOR ROUTINES ***************************************************/
2377 
2378 PVOID
2380  _In_ SIZE_T Size
2381  );
2382 
2383 NTSTATUS
2384 BlMmFreeHeap (
2385  _In_ PVOID Buffer
2386  );
2387 
2388 /* DISPLAY ROUTINES **********************************************************/
2389 
2390 VOID
2392  _Out_ PULONG TextWidth,
2393  _Out_ PULONG TextHeight
2394  );
2395 
2396 NTSTATUS
2398  VOID
2399  );
2400 
2401 NTSTATUS
2403  _Out_ PULONG HRes,
2404  _Out_ PULONG Vres
2405  );
2406 
2407 VOID
2409  VOID
2410  );
2411 
2412 PBITMAP
2414  _Out_ PCOORD Offset,
2416  );
2417 
2418 BOOLEAN
2420  VOID
2421  );
2422 
2423 NTSTATUS
2425  VOID
2426  );
2427 
2428 NTSTATUS
2430  _In_ ULONG Type
2431  );
2432 
2433 /* I/O ROUTINES **************************************************************/
2434 
2435 NTSTATUS
2437  _In_ PBL_IO_DESTROY_ROUTINE DestroyRoutine
2438  );
2439 
2440 NTSTATUS
2441 BlDeviceClose (
2442  _In_ ULONG DeviceId
2443  );
2444 
2445 BOOLEAN
2447  _In_ PBL_DEVICE_DESCRIPTOR InputDevice,
2448  _Outptr_ PBL_DEVICE_DESCRIPTOR* VirtualDevice
2449  );
2450 
2451 NTSTATUS
2452 BlpDeviceOpen (
2454  _In_ ULONG Flags,
2455  _In_ ULONG Unknown,
2456  _Out_ PULONG DeviceId
2457  );
2458 
2459 NTSTATUS
2461  _In_ ULONG DeviceId,
2462  _Out_ PBL_DEVICE_INFORMATION DeviceInformation
2463  );
2464 
2465 NTSTATUS
2467  _In_ ULONG DeviceId,
2468  _In_ PBL_DEVICE_INFORMATION DeviceInformation
2469  );
2470 
2471 NTSTATUS
2473  _In_ ULONG DeviceId,
2474  _In_ ULONG Size,
2476  _In_ PVOID Buffer,
2478  );
2479 
2480 /* IMAGE ROUTINES ************************************************************/
2481 
2482 NTSTATUS
2484  _In_ ULONG DeviceId,
2485  _In_ BL_MEMORY_TYPE MemoryType,
2488  _Inout_ PULONG MappedSize,
2490  _In_ BOOLEAN ShowProgress,
2491  _Out_opt_ PUCHAR* HashBuffer,
2492  _Out_opt_ PULONG HashSize
2493  );
2494 
2497  _In_ PVOID ImageBase,
2498  _In_ ULONG ImageSize
2499  );
2500 
2501 NTSTATUS
2504  _Out_ PULONG AppHandle
2505  );
2506 
2507 NTSTATUS
2509  _In_ ULONG AppHandle,
2510  _Inout_ PBL_RETURN_ARGUMENTS ReturnArguments
2511  );
2512 
2513 NTSTATUS
2515  _In_ ULONG AppHandle
2516  );
2517 
2518 VOID
2520  _In_ PBL_LOADED_APPLICATION_ENTRY ApplicationEntry,
2521  _Out_ PBOOLEAN IntegrityChecksDisabled,
2522  _Out_ PBOOLEAN TestSigning
2523  );
2524 
2525 /* FILE I/O ROUTINES *********************************************************/
2526 
2527 NTSTATUS
2528 BlFileClose (
2529  _In_ ULONG FileId
2530  );
2531 
2532 NTSTATUS
2534  _In_ ULONG FileId,
2535  _In_ ULONG Size,
2537  _In_ PVOID Buffer,
2539  _In_ ULONG Flags
2540  );
2541 
2542 NTSTATUS
2544  _In_ ULONG FileId,
2546  );
2547 
2548 NTSTATUS
2549 BlFileOpen (
2550  _In_ ULONG DeviceId,
2552  _In_ ULONG Flags,
2553  _Out_ PULONG FileId
2554  );
2555 
2556 /* BLOCK I/O ROUTINES *******************************************************/
2557 
2558 NTSTATUS
2562  );
2563 
2564 /* INPUT CONSOLE ROUTINES ****************************************************/
2565 
2566 VOID
2569  );
2570 
2571 NTSTATUS
2574  );
2575 
2576 NTSTATUS
2578  VOID
2579  );
2580 
2581 /* TEXT CONSOLE ROUTINES *****************************************************/
2582 
2583 VOID
2586  );
2587 
2588 NTSTATUS
2591  _In_ BOOLEAN LineOnly
2592  );
2593 
2594 NTSTATUS
2597  _In_ ULONG Color
2598  );
2599 
2600 NTSTATUS
2603  );
2604 
2605 NTSTATUS
2608  _In_ ULONG Mask,
2609  _In_ PBL_DISPLAY_STATE TextState
2610  );
2611 
2612 BOOLEAN
2615  );
2616 
2617 NTSTATUS
2621  );
2622 
2623 NTSTATUS
2627  );
2628 
2629 NTSTATUS
2633  );
2634 
2635 VOID
2637  _In_ struct _BL_TEXT_CONSOLE* Console
2638  );
2639 
2640 NTSTATUS
2642  _In_ struct _BL_TEXT_CONSOLE* Console
2643  );
2644 
2645 NTSTATUS
2647  _In_ struct _BL_TEXT_CONSOLE* Console,
2648  _Out_ PBL_DISPLAY_STATE TextState
2649  );
2650 
2651 NTSTATUS
2653  _In_ struct _BL_TEXT_CONSOLE* Console,
2654  _In_ ULONG Flags,
2655  _In_ PBL_DISPLAY_STATE TextState
2656  );
2657 
2658 NTSTATUS
2660  _In_ struct _BL_TEXT_CONSOLE* Console,
2662  );
2663 
2664 NTSTATUS
2666  _In_ struct _BL_TEXT_CONSOLE* Console,
2667  _In_ ULONG NewTextResolution,
2668  _Out_ PULONG OldTextResolution
2669  );
2670 
2671 NTSTATUS
2673  _In_ struct _BL_TEXT_CONSOLE* Console,
2674  _In_ BOOLEAN LineOnly
2675  );
2676 
2677 NTSTATUS
2679  _In_ struct _BL_TEXT_CONSOLE* Console,
2680  _In_ PCHAR Text,
2681  _In_ ULONG Attribute
2682  );
2683 
2684 NTSTATUS
2686  _In_ PBL_TEXT_CONSOLE TextConsole,
2687  _In_ BOOLEAN Activate
2688  );
2689 
2690 BOOLEAN
2694  _In_ ULONG MaxIndex
2695  );
2696 
2697 NTSTATUS
2700  _In_ BOOLEAN LineOnly
2701  );
2702 
2703 VOID
2705  _In_ PBL_TEXT_CONSOLE TextConsole
2706  );
2707 
2708 NTSTATUS
2710  _In_ PBL_TEXT_CONSOLE TextConsole
2711  );
2712 
2713 NTSTATUS
2715  _In_ PBL_TEXT_CONSOLE TextConsole,
2716  _In_ UCHAR Mask,
2718  );
2719 
2720 NTSTATUS
2722  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2723  );
2724 
2725 NTSTATUS
2727  _In_ PBL_TEXT_CONSOLE* TextConsole
2728  );
2729 
2730 NTSTATUS
2732  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole,
2734  );
2735 
2736 VOID
2738  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2739  );
2740 
2741 VOID
2743  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2744  );
2745 
2746 NTSTATUS
2749  _In_ ULONG Color
2750  );
2751 
2752 NTSTATUS
2754  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2755  );
2756 
2757 NTSTATUS
2759  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2760  );
2761 
2762 VOID
2764  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2765  );
2766 
2767 VOID
2769  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2770  );
2771 
2772 NTSTATUS
2774  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2775  );
2776 
2777 NTSTATUS
2779  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2780  );
2781 
2782 NTSTATUS
2784  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole,
2786  _In_ ULONG DisplayModeCount
2787  );
2788 
2789 NTSTATUS
2791  VOID
2792  );
2793 
2794 NTSTATUS
2797  _In_opt_ PULONG ValueToFill
2798  );
2799 
2800 VOID
2803  _In_ ULONG Width,
2804  _In_ PUCHAR FillColor,
2805  _In_ ULONG Height,
2806  _In_ ULONG ScanlineWidth,
2807  _In_ ULONG PixelDepth
2808  );
2809 
2810 NTSTATUS
2813  _Out_ PUCHAR Pixel
2814  );
2815 
2817 extern ULONG BlpApplicationFlags;
2840 extern WCHAR BlScratchBuffer[8192];
2862 
2863 #endif
struct _BL_ADDRESS_RANGE * PBL_ADDRESS_RANGE
PBL_FILE_GET_NEXT GetNext
Definition: bl.h:1033
PBL_FILE_OPEN Open
Definition: bl.h:1029
static BYTE Memory[0x20]
Definition: ps2.c:54
BL_BLOCK_DEVICE_INFORMATION
Definition: bl.h:1235
ULONGLONG VirtualAddress
Definition: bl.h:837
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
ULONG File
Definition: bl.h:945
enum _BL_PATH_TYPE BL_PATH_TYPE
PBL_FILE_CLOSE Close
Definition: bl.h:1030
signed char * PCHAR
Definition: retypes.h:7
EFI_GUID EfiBlockIoProtocol
Definition: firmware.c:33
struct _BL_IMG_FILE BL_IMG_FILE
NTSTATUS BlGetApplicationBaseAndSize(_Out_ PVOID *ImageBase, _Out_ PULONG ImageSize)
Definition: bootlib.c:424
PCONSOLE_SET_TEXT_RESOLUTION SetTextResolution
Definition: bl.h:1092
CONST WCHAR * PCWCH
Definition: ntbasedef.h:418
NTSTATUS(* PCONSOLE_SET_TEXT_RESOLUTION)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ ULONG NewTextResolution, _Out_ PULONG OldTextResolution)
Definition: bl.h:516
Definition: bl.h:203
BL_DISPLAY_MODE ConsoleGraphicalResolutionList[]
Definition: display.c:22
NTSTATUS ConsoleTextLocalWriteText(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ PCHAR Text, _In_ ULONG Attribute)
Definition: textcons.c:94
BL_DISPLAY_MODE DisplayMode
Definition: bl.h:1113
PBL_DEVICE_DESCRIPTOR BlpBootDevice
Definition: bootlib.c:16
NTSTATUS ConsoleEfiUgaSetResolution(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole, _In_ PBL_DISPLAY_MODE DisplayMode, _In_ ULONG DisplayModeCount)
Definition: uga.c:35
PBL_HASH_TABLE_HASH_FUNCTION HashFunction
Definition: bl.h:1174
Definition: bl.h:202
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4693
struct _BL_HASH_TABLE * PBL_HASH_TABLE
PHYSICAL_ADDRESS ImageBase
Definition: bl.h:940
VOID BiCloseKey(_In_ HANDLE KeyHandle)
Definition: bootreg.c:141
LIST_ENTRY ListEntry
Definition: bl.h:1192
NTSTATUS BlFileGetInformation(_In_ ULONG FileId, _In_ PBL_FILE_INFORMATION FileInfo)
Definition: file.c:564
BL_LIBRARY_PARAMETERS BlpLibraryParameters
Definition: bootlib.c:15
PBL_FS_MOUNT_CALLBACK MountCallback
Definition: bl.h:1057
ASMGENDATA Table[]
Definition: genincdata.c:61
VOID BlpArchEnableTranslation(VOID)
Definition: arch.c:189
PULONG Buffer
Definition: bl.h:1133
ULONGLONG Size
Definition: bl.h:1021
ULONG BlGetBootOptionListSize(_In_ PBL_BCD_OPTION BcdOption)
Definition: bcdopt.c:79
ULONG DescriptorSize
Definition: bl.h:803
ULONG BootIndex
Definition: bl.h:886
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
struct _BL_DEVICE_INFORMATION BL_DEVICE_INFORMATION
PCONSOLE_CLEAR_TEXT ClearText
Definition: bl.h:1093
NTSTATUS BlUtlGetAcpiTable(_Out_ PVOID *TableAddress, _In_ ULONG Signature)
Definition: util.c:34
Definition: bl.h:204
NTSTATUS ConsoleCreateLocalInputConsole(VOID)
Definition: textcons.c:243
struct _BL_DISPLAY_MODE BL_DISPLAY_MODE
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4418
Definition: bl.h:248
NTSTATUS BlFileOpen(_In_ ULONG DeviceId, _In_ PWCHAR FileName, _In_ ULONG Flags, _Out_ PULONG FileId)
Definition: file.c:477
BL_DISPLAY_MODE ConsoleTextResolutionList[]
Definition: display.c:30
PBL_FILE_READ Read
Definition: bl.h:1031
struct _BL_PROTOCOL_HANDLE BL_PROTOCOL_HANDLE
_Out_ PNDIS_BUFFER _In_ NDIS_HANDLE _In_ PVOID MemoryDescriptor
Definition: ndis.h:3252
NTSTATUS BlDeviceClose(_In_ ULONG DeviceId)
Definition: device.c:2073
PBL_DEVICE_WRITE Write
Definition: bl.h:1253
NTSTATUS EfiLocateHandleBuffer(_In_ EFI_LOCATE_SEARCH_TYPE SearchType, _In_ EFI_GUID *Protocol, _Inout_ PULONG HandleCount, _Inout_ EFI_HANDLE **Buffer)
Definition: firmware.c:1399
VOID MmMdFreeList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList)
Definition: descriptor.c:356
NTSTATUS(* PBL_FS_PURGE_CALLBACK)(VOID)
Definition: bl.h:464
NTSTATUS BlMmMapPhysicalAddressEx(_In_ PVOID *VirtualAddress, _In_ ULONG Attributes, _In_ ULONGLONG Size, _In_ PHYSICAL_ADDRESS PhysicalAddress)
Definition: mm.c:192
ULONG Size
Definition: bl.h:1179
NTSTATUS EfiGopGetCurrentMode(_In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface, _Out_ UINTN *Mode, _Out_ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Information)
Definition: firmware.c:1296
Definition: bl.h:1052
Definition: bl.h:209
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
Type
Definition: Type.h:6
struct _BL_BCD_OPTION * PBL_BCD_OPTION
_In_ PIRP _In_ PDEVICE_OBJECT Device
Definition: fatprocs.h:2020
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ ULONG AllocationAttributes
Definition: mmfuncs.h:360
VOID BlDestroyLibrary(VOID)
Definition: bootlib.c:405
NTSTATUS(* PBL_DEVICE_WRITE)(VOID)
Definition: bl.h:642
ULONG FrameBufferSize
Definition: bl.h:1158
ULONG DriveNumber
Definition: bl.h:931
struct _BL_TEXT_CONSOLE * PBL_TEXT_CONSOLE
BL_TEXT_CONSOLE TextConsole
Definition: bl.h:1147
struct _Entry Entry
Definition: kefuncs.h:640
ULONG Reserved
Definition: bl.h:882
NTSTATUS BlGetBootOptionGuid(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PGUID Value)
Definition: bcdopt.c:228
BOOLEAN(* PBL_TBL_LOOKUP_ROUTINE)(_In_ PVOID Entry, _In_ PVOID Argument1, _In_ PVOID Argument2, _In_ PVOID Argument3, _In_ PVOID Argument4)
Definition: bl.h:566
NTSTATUS BlGetBootOptionGuidList(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PGUID *Value, _In_ PULONG Count)
Definition: bcdopt.c:266
BL_DISPLAY_MODE DisplayMode
Definition: bl.h:1148
ULONG HeapAllocationAttributes
Definition: bl.h:762
_In_ ULONG Mode
Definition: hubbusif.h:303
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4693
NTSTATUS EfiStall(_In_ ULONG StallTime)
Definition: firmware.c:1003
VOID BlFwReboot(VOID)
Definition: fwutil.c:14
ULONG PartitionNumber
Definition: bl.h:968
ULONGLONG Unknown2
Definition: bl.h:1047
BL_HASH_VALUE Value
Definition: bl.h:1194
NTSTATUS(* PBL_TBL_SET_ROUTINE)(_In_ PVOID Entry)
Definition: bl.h:583
ULONGLONG BlpTimePerformanceFrequency
Definition: time.c:15
FORCEINLINE VOID MmMdInitializeListHead(_In_ PBL_MEMORY_DESCRIPTOR_LIST List)
Definition: bl.h:1377
BL_HASH_ENTRY Entry
Definition: bl.h:1193
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * EfiConOut
Definition: firmware.c:23
PLIST_ENTRY This
Definition: bl.h:1009
NTSTATUS ConsoleCreateRemoteConsole(_In_ PBL_TEXT_CONSOLE *TextConsole)
Definition: emscons.c:31
struct _BL_GRAPHICS_CONSOLE BL_GRAPHICS_CONSOLE
NTSTATUS BlImgLoadImageWithProgress2(_In_ ULONG DeviceId, _In_ BL_MEMORY_TYPE MemoryType, _In_ PWCHAR FileName, _Inout_ PVOID *MappedBase, _Inout_ PULONG MappedSize, _In_ ULONG ImageFlags, _In_ BOOLEAN ShowProgress, _Out_opt_ PUCHAR *HashBuffer, _Out_opt_ PULONG HashSize)
Definition: image.c:358
#define ANYSIZE_ARRAY
Definition: typedefs.h:45
VOID BlpArchSwitchContext(_In_ BL_ARCH_MODE NewMode)
Definition: arch.c:166
VOID BlDisplayGetTextCellResolution(_Out_ PULONG TextWidth, _Out_ PULONG TextHeight)
Definition: display.c:602
NTSTATUS(* PBL_MM_ZERO_VIRTUAL_ADDRESS_RANGE)(_In_ PVOID DestinationAddress, _In_ ULONGLONG Size)
Definition: bl.h:696
UCHAR Path[ANYSIZE_ARRAY]
Definition: bl.h:986
NTSTATUS BlHtLookup(_In_ ULONG TableId, _In_ PBL_HASH_ENTRY Entry, _Out_ PBL_HASH_VALUE *Value)
enum _BL_COLOR BL_COLOR
ULONG HRes2
Definition: bl.h:1082
_In_ IN_ADDR _In_ IN_ADDR _Out_ MULTICAST_MODE_TYPE _Inout_ ULONG _Out_writes_ SourceCount IN_ADDR * SourceList
Definition: ws2tcpip.h:622
BOOLEAN MmArchTranslateVirtualAddress(_In_ PVOID VirtualAddress, _Out_opt_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_opt_ PULONG CachingFlags)
Definition: mmx86.c:108
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappedAllocated
Definition: pagealloc.c:35
ULONG Version
Definition: bl.h:817
NTSTATUS BlFwGetParameters(_In_ PBL_FIRMWARE_DESCRIPTOR Parameters)
Definition: firmware.c:2359
struct _BL_HARDDISK_DEVICE BL_HARDDISK_DEVICE
NTSTATUS BlpMmInitialize(_In_ PBL_MEMORY_DATA MemoryData, _In_ BL_TRANSLATION_TYPE TranslationType, _In_ PBL_LIBRARY_PARAMETERS LibraryParameters)
Definition: mm.c:541
struct _BL_LOCAL_DEVICE BL_LOCAL_DEVICE
BIOS_MEMORY_MAP MemoryMap[32]
Definition: loader.c:11
WCHAR KeyValue
Definition: bl.h:887
NTSTATUS BlpResourceInitialize(VOID)
Definition: resource.c:478
NTSTATUS BlHtCreate(_In_ ULONG Size, _In_ PBL_HASH_TABLE_HASH_FUNCTION HashFunction, _In_ PBL_HASH_TABLE_COMPARE_FUNCTION CompareFunction, _Out_ PULONG Id)
Definition: util.c:504
VOID ConsoleFirmwareGraphicalDisable(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: guicons.c:153
PVOID FrameBuffer
Definition: bl.h:1157
ULONG DataSize
Definition: bl.h:849
unsigned char * PUCHAR
Definition: retypes.h:3
WCHAR BlScratchBuffer[8192]
Definition: firmware.c:39
PBL_MM_RELOCATE_SELF_MAP BlMmRelocateSelfMap
Definition: arch.c:16
struct _BL_LOADED_APPLICATION_ENTRY * PBL_LOADED_APPLICATION_ENTRY
char CHAR
Definition: xmlstorage.h:175
struct _BL_REMOTE_CONSOLE * PBL_REMOTE_CONSOLE
USHORT Planes
Definition: bl.h:1321
EFI_SIMPLE_TEXT_OUTPUT_MODE OldMode
Definition: bl.h:1117
ULONG MmMdCountList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList)
Definition: descriptor.c:205
GUID Guid
Definition: bl.h:859
NTSTATUS(* PBL_MM_UNMAP_VIRTUAL_ADDRESS)(_In_ PVOID VirtualAddress, _In_ ULONG Size)
Definition: bl.h:717
NTSTATUS ConsoleFirmwareTextSetState(_In_ PBL_TEXT_CONSOLE TextConsole, _In_ UCHAR Mask, _In_ PBL_DISPLAY_STATE State)
Definition: textcons.c:198
EFI_BLOCK_IO * Protocol
Definition: bl.h:1237
NTSTATUS TblDoNotPurgeEntry(_In_ PVOID Entry)
Definition: util.c:495
Definition: bl.h:252
PWCHAR FilePath
Definition: bl.h:1040
LONG NTSTATUS
Definition: precomp.h:26
EFI_HANDLE Handle
Definition: bl.h:1243
NTSTATUS MmUnmapVirtualAddress(_Inout_ PVOID *VirtualAddress, _Inout_ PULONGLONG Size)
Definition: mm.c:453
struct _BL_LOCAL_DEVICE::@124::@127 RamDisk
NTSTATUS ConsoleFirmwareGraphicalEnable(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: guicons.c:128
_In_ ULONGLONG _In_ ULONGLONG _In_ BOOLEAN Enable
Definition: ntddpcm.h:140
NTSTATUS MmHaInitialize(_In_ ULONG HeapSize, _In_ ULONG HeapAttributes)
Definition: heapalloc.c:538
VOID(* PBL_MM_RELOCATE_SELF_MAP)(VOID)
Definition: bl.h:684
NTSTATUS(* PCONSOLE_SET_TEXT_STATE)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ ULONG Flags, _In_ struct _BL_DISPLAY_STATE *TextState)
Definition: bl.h:501
BOOLEAN ConsolepFindResolution(_In_ PBL_DISPLAY_MODE Mode, _In_ PBL_DISPLAY_MODE List, _In_ ULONG MaxIndex)
Definition: textcons.c:159
NTSTATUS BlPdQueryData(_In_ const GUID *DataGuid, _In_ PVOID Unknown, _Inout_ PBL_PD_DATA_BLOB DataBlob)
Definition: bootlib.c:457
struct _BL_MEMORY_DESCRIPTOR BL_MEMORY_DESCRIPTOR
#define _Outptr_
Definition: no_sal2.h:396
ULONG AsULong
Definition: bl.h:884
VOID(* PBL_MM_FLUSH_TLB)(VOID)
Definition: bl.h:679
struct _BL_DEFERRED_FONT_FILE BL_DEFERRED_FONT_FILE
NTSTATUS BlDisplayClearScreen(VOID)
Definition: display.c:942
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * EfiConInEx
Definition: firmware.c:25
ULONG PartitionType
Definition: bl.h:904
ULONG DiskNumber
Definition: bl.h:919
PWCHAR FileName
Definition: bl.h:1281
PBL_TEXT_CONSOLE_VTABLE Callbacks
Definition: bl.h:1111
PCONSOLE_DESTRUCT Destruct
Definition: bl.h:1087
_BL_PARTITION_TYPE
Definition: bl.h:273
ULONG NextEntryOffset
Definition: bl.h:851
_BL_LOCAL_DEVICE_TYPE
Definition: bl.h:260
VOID BlRemoveBootOption(_In_ PBL_BCD_OPTION List, _In_ ULONG Type)
Definition: bcdopt.c:801
struct _BL_PD_DATA_BLOB BL_PD_DATA_BLOB
PBL_INPUT_CONSOLE_VTABLE Callbacks
Definition: bl.h:1132
PBL_FILE_GET_INFO GetInfo
Definition: bl.h:1034
BOOLEAN Active
Definition: bl.h:1114
Definition: bl.h:201
NTSTATUS MmMdAddDescriptorToList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR MemoryDescriptor, _In_ ULONG Flags)
Definition: descriptor.c:582
PCONSOLE_GET_TEXT_STATE GetTextState
Definition: bl.h:1089
NTSTATUS(* PBL_DEVICE_GET_INFORMATION)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry, _Out_ struct _BL_DEVICE_INFORMATION *DeviceInformation)
Definition: bl.h:648
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
PBL_DEVICE_GET_INFORMATION GetInformation
Definition: bl.h:1254
EFI_GUID EfiUgaDrawProtocol
Definition: firmware.c:29
PVOID Value
Definition: bl.h:1181
NTSTATUS MmSelectMappingAddress(_Out_ PVOID *MappingAddress, _In_ PVOID PreferredAddress, _In_ ULONGLONG Size, _In_ ULONG AllocationAttributes, _In_ ULONG Flags, _In_ PHYSICAL_ADDRESS PhysicalAddress)
Definition: pagealloc.c:1625
NTSTATUS BlMmAllocatePhysicalPages(_Inout_ PPHYSICAL_ADDRESS Address, _In_ BL_MEMORY_TYPE MemoryType, _In_ ULONGLONG PageCount, _In_ ULONG Attributes, _In_ ULONG Alignment)
CHAR Signature[8]
Definition: bl.h:857
VOID BlStatusError(_In_ ULONG ErrorCode, _In_ ULONG Parameter1, _In_ ULONG_PTR Parameter2, _In_ ULONG_PTR Parameter3, _In_ ULONG_PTR Parameter4)
Definition: debug.c:121
struct _BL_DEVICE_ENTRY * PBL_DEVICE_ENTRY
LARGE_INTEGER ImageSize
Definition: bl.h:941
ULONG DeviceId
Definition: bl.h:1263
NTSTATUS(* PBL_DEVICE_RESET)(VOID)
Definition: bl.h:662
UINT32 UINTN
ULONG ReferenceCount
Definition: bl.h:1266
struct _BL_REMOTE_CONSOLE BL_REMOTE_CONSOLE
static WCHAR String[]
Definition: stringtable.c:55
static COORD TextResolution
Definition: video.c:48
ULONG_PTR MmArchTopOfApplicationAddressSpace
Definition: mmx86.c:30
VOID(* PBL_MM_FLUSH_TLB_ENTRY)(_In_ PVOID VirtualAddress)
Definition: bl.h:707
BOOLEAN(* PBL_MM_TRANSLATE_VIRTUAL_ADDRESS)(_In_ PVOID VirtualAddress, _Out_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_opt_ PULONG CacheAttributes)
Definition: bl.h:739
NTSTATUS(* PCONSOLE_SET_GRAPHICAL_RESOLUTION)(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ struct _BL_DISPLAY_MODE DisplayMode)
Definition: bl.h:544
struct _BL_ARCH_CONTEXT * PBL_ARCH_CONTEXT
Definition: bl.h:199
NTSTATUS BlMmFreePhysicalPages(_In_ PHYSICAL_ADDRESS Address)
Definition: pagealloc.c:1187
uint16_t * PWCHAR
Definition: typedefs.h:54
NTSTATUS ConsoleCreateLocalInputCnsole(VOID)
PCONSOLE_DESTRUCT Destruct
Definition: bl.h:1122
NTSTATUS BlpTimeCalibratePerformanceCounter(VOID)
Definition: time.c:62
NTSTATUS BlDeviceGetInformation(_In_ ULONG DeviceId, _Out_ PBL_DEVICE_INFORMATION DeviceInformation)
Definition: device.c:682
VOID(* PBL_MM_DESTROY_SELF_MAP)(VOID)
Definition: bl.h:702
struct _BL_LIBRARY_PARAMETERS * PBL_LIBRARY_PARAMETERS
BL_MEMORY_DESCRIPTOR_LIST MmMdlReservedAllocated
Definition: pagealloc.c:40
struct _BL_HASH_TABLE BL_HASH_TABLE
BL_HARDDISK_DEVICE HardDisk
Definition: bl.h:934
enum OPTION_FLAGS Options
Definition: stats.c:44
PBL_DEVICE_READ Read
Definition: bl.h:1252
NTSTATUS BlHtDelete(_In_ ULONG TableId, _In_ PBL_HASH_ENTRY Entry)
Definition: util.c:722
_In_opt_ PSECURITY_DESCRIPTOR _Out_ PSECURITY_DESCRIPTOR * NewDescriptor
Definition: sefuncs.h:29
EFI_GUID EfiSimpleTextInputExProtocol
Definition: firmware.c:32
NTSTATUS BlMmFreeHeap(_In_ PVOID Buffer)
Definition: heapalloc.c:663
NTSTATUS EfiAllocatePages(_In_ ULONG Type, _In_ ULONG Pages, _Inout_ EFI_PHYSICAL_ADDRESS *Memory)
Definition: firmware.c:1568
NTSTATUS ConsoleFirmwareTextClear(_In_ PBL_TEXT_CONSOLE Console, _In_ BOOLEAN LineOnly)
Definition: textcons.c:557
SIZE_T WINAPI HeapSize(HANDLE, DWORD, LPCVOID)
ULONG Exit
Definition: bl.h:881
NTSTATUS(* PBL_DEVICE_FLUSH)(VOID)
Definition: bl.h:668
NTSTATUS ConsoleEfiUgaOpen(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: uga.c:18
NTSTATUS MmFwFreePages(_In_ ULONG BasePage, _In_ ULONG PageCount)
Definition: fwutil.c:28
ULONG DataSize
Definition: bl.h:1347
NTSTATUS FatInitialize(VOID)
Definition: fat.c:81
PBL_FS_PURGE_CALLBACK Purge
Definition: bl.h:1066
PBL_FS_INIT_CALLBACK Init
Definition: bl.h:1063
BL_TRANSLATION_TYPE TranslationType
Definition: bl.h:1001
NTSTATUS MmMdCopyList(_In_ PBL_MEMORY_DESCRIPTOR_LIST DestinationList, _In_ PBL_MEMORY_DESCRIPTOR_LIST SourceList, _In_opt_ PBL_MEMORY_DESCRIPTOR ListDescriptor, _Out_ PULONG ActualCount, _In_ ULONG Count, _In_ ULONG Flags)
Definition: descriptor.c:249
NTSTATUS EfiConOutEnableCursor(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ BOOLEAN Visible)
Definition: firmware.c:1163
struct _BL_WINDOWS_LOAD_OPTIONS * PBL_WINDOWS_LOAD_OPTIONS
NTSTATUS(* PBL_MM_MOVE_VIRTUAL_ADDRESS_RANGE)(_In_ PVOID DestinationAddress, _In_ PVOID SourceAddress, _In_ ULONGLONG Size)
Definition: bl.h:689
struct _BL_FIRMWARE_DESCRIPTOR * PBL_FIRMWARE_DESCRIPTOR
enum _BL_TRANSLATION_TYPE BL_TRANSLATION_TYPE
ULONG Offset
Definition: bl.h:1313
#define _In_opt_
Definition: no_sal2.h:213
EFI_RESET_TYPE
Definition: UefiSpec.h:968
NTSTATUS MmMdRemoveRegionFromMdlEx(__in PBL_MEMORY_DESCRIPTOR_LIST MdList, __in ULONG Flags, __in ULONGLONG BasePage, __in ULONGLONG PageCount, __in PBL_MEMORY_DESCRIPTOR_LIST NewMdList)
Definition: bl.h:206
NTSTATUS EfiConOutQueryMode(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ ULONG Mode, _In_ UINTN *Columns, _In_ UINTN *Rows)
Definition: firmware.c:1032
NTSTATUS(* PBL_FILE_GET_NEXT)(VOID)
Definition: bl.h:424
NTSTATUS BlGetBootOptionInteger(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG Value)
Definition: bcdopt.c:467
PCONSOLE_ENABLE Enable
Definition: bl.h:1101
PWCHAR ApplicationBaseDirectory
Definition: bl.h:763
NTSTATUS BlFwEnumerateDevice(_In_ PBL_DEVICE_DESCRIPTOR Device)
Definition: firmware.c:2375
NTSTATUS EfiConOutSetAttribute(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ ULONG Attribute)
Definition: firmware.c:1098
NTSTATUS BlMmRemoveBadMemory(VOID)
Definition: mm.c:155
NTSTATUS MmArchInitialize(_In_ ULONG Phase, _In_ PBL_MEMORY_DATA MemoryData, _In_ BL_TRANSLATION_TYPE TranslationType, _In_ BL_TRANSLATION_TYPE LibraryTranslationType)
Definition: mmx86.c:1028
PVOID Data
Definition: bl.h:1187
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:52
NTSTATUS(* PCONSOLE_GET_TEXT_STATE)(_In_ struct _BL_TEXT_CONSOLE *Console, _Out_ struct _BL_DISPLAY_STATE *TextState)
Definition: bl.h:494
PCWSTR FilePath
NTSTATUS(* PBL_DEVICE_READ)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry, _In_ PVOID Buffer, _In_ ULONG Size, _Out_ PULONG BytesRead)
Definition: bl.h:633
PLIST_ENTRY First
Definition: bl.h:1008
Definition: bl.h:1261
NTSTATUS(* PBL_FILE_CLOSE)(_In_ struct _BL_FILE_ENTRY *FileEntry)
Definition: bl.h:403
NTSTATUS BlockIoEfiCompareDevice(_In_ PBL_DEVICE_DESCRIPTOR Device, _In_ EFI_HANDLE Handle)
Definition: device.c:1268
DWORD Id
Definition: bl.h:213
NTSTATUS ConsoleGraphicalReinitialize(_In_ struct _BL_GRAPHICS_CONSOLE *Console)
VOID ConsoleTextLocalDestruct(_In_ struct _BL_TEXT_CONSOLE *Console)
Definition: textcons.c:30
struct _BMP_HEADER * PBMP_HEADER
_BL_COLOR
Definition: bl.h:196
ULONG ContextFlags
Definition: bl.h:1002
BL_LOADED_APPLICATION_ENTRY BlpApplicationEntry
Definition: bootlib.c:19
ULONG FgColor
Definition: bl.h:1072
NTSTATUS ConsoleGraphicalConstruct(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: guicons.c:58
NTSTATUS BlTblMap(_In_ PVOID *Table, _In_ ULONG Count, _In_ PBL_TBL_MAP_ROUTINE MapCallback)
Definition: util.c:399
struct _BL_IMAGE_APPLICATION_ENTRY * PBL_IMAGE_APPLICATION_ENTRY
PCONSOLE_IS_ENABLED IsEnabled
Definition: bl.h:1100
LIST_ENTRY ListEntry
Definition: bl.h:1300
uint32_t ULONG_PTR
Definition: typedefs.h:63
PULONG DataEnd
Definition: bl.h:1135
EFI_GRAPHICS_OUTPUT_PROTOCOL * Protocol
Definition: bl.h:1156
Definition: bl.h:232
NTSTATUS BfLoadFontFile(_In_ PBL_DEVICE_DESCRIPTOR Device, _In_ PWCHAR FontPath)
Definition: font.c:51
EFI_GUID EfiGlobalVariable
Definition: firmware.c:36
ULONGLONG DataPage
Definition: bl.h:821
enum _BL_MEMORY_CLASS BL_MEMORY_CLASS
struct _BL_ADDRESS_RANGE BL_ADDRESS_RANGE
NTSTATUS FatMount(_In_ ULONG DeviceId, _In_ ULONG Unknown, _Out_ PBL_FILE_ENTRY *FileEntry)
Definition: fat.c:23
NTSTATUS(* PBL_TBL_MAP_ROUTINE)(_In_ PVOID Entry, _In_ ULONG EntryIndex)
Definition: bl.h:576
ImageFlags
Definition: gdiplusenums.h:329
ULONG DataOffset
Definition: bl.h:848
ULONG Compression
Definition: bl.h:1323
NTSTATUS BlpMmCreateBlockAllocator(VOID)
Definition: blkalloc.c:213
USHORT BitCount
Definition: bl.h:1322
PBL_FS_MOUNT_CALLBACK Mount
Definition: bl.h:1065
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
NTSTATUS(* PBL_FS_DESTROY_CALLBACK)(VOID)
Definition: bl.h:450
PBL_MM_ZERO_VIRTUAL_ADDRESS_RANGE BlMmZeroVirtualAddressRange
Definition: arch.c:18
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
WCHAR LoadOptions[ANYSIZE_ARRAY]
Definition: bl.h:995
BL_PARTITION_TYPE PartitionType
Definition: bl.h:1202
BL_FILE_CALLBACKS Callbacks
Definition: bl.h:1048
BL_MEMORY_TYPE Type
Definition: bl.h:842
ULONG ConsoleGraphicalResolutionListSize
Definition: display.c:28
PBL_DEVICE_ENUMERATE_DEVICE_CLASS EnumerateDeviceClass
Definition: bl.h:1249
NTSTATUS ConsoleTextLocalClearText(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ BOOLEAN LineOnly)
Definition: textcons.c:85
NTSTATUS EtfsMount(_In_ ULONG DeviceId, _In_ ULONG Unknown, _Out_ PBL_FILE_ENTRY *FileEntry)
Definition: etfs.c:874
BL_LOCAL_DEVICE Local
Definition: bl.h:957
Definition: bl.h:855
VOID MmMdRemoveDescriptorFromList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR Entry)
Definition: descriptor.c:338
struct _BL_HASH_NODE BL_HASH_NODE
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
NTSTATUS BlDisplaySetCursorType(_In_ ULONG Type)
Definition: display.c:968
BL_MEMORY_DESCRIPTOR_LIST MmMdlCompleteBadMemory
Definition: pagealloc.c:44
NTSTATUS(* PBL_FS_INIT_CALLBACK)(VOID)
Definition: bl.h:444
static LPOVERLAPPED_COMPLETION_ROUTINE Function
Definition: sync.c:684
NTSTATUS EfiConOutOutputString(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ PWCHAR String)
Definition: firmware.c:1195
VOID EfiResetSystem(_In_ EFI_RESET_TYPE ResetType)
Definition: firmware.c:1509
NTSTATUS BlpMmInitializeConstraints(VOID)
Definition: pagealloc.c:106
NTSTATUS EfiOpenProtocol(_In_ EFI_HANDLE Handle, _In_ EFI_GUID *Protocol, _Out_ PVOID *Interface)
NTSTATUS(* PCONSOLE_CLEAR_TEXT)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ BOOLEAN LineOnly)
Definition: bl.h:524
NTSTATUS BlBdPullRemoteFile(_In_ PWCHAR FilePath, _Out_ PVOID BaseAddress, _Out_ PULONGLONG FileSize)
Definition: debug.c:34
ULONG OldPixelDepth
Definition: bl.h:1153
NTSTATUS BlpSecureBootEFIIsEnabled(VOID)
Definition: firmware.c:687
EFI_HANDLE ImageHandle
Definition: bl.h:811
NTSTATUS BlHtStore(_In_ ULONG TableId, _In_ PBL_HASH_ENTRY Entry, _In_ PVOID Data, _In_ ULONG DataSize)
Definition: util.c:668
NTSTATUS BfClearScreen(_In_ PBL_GRAPHICS_CONSOLE Console)
Definition: font.c:158
struct _DIB_HEADER DIB_HEADER
BL_TEXT_CONSOLE_VTABLE Text
Definition: bl.h:1099
struct _BL_HASH_ENTRY BL_HASH_ENTRY
struct _BL_BLOCK_DEVICE_INFORMATION BL_BLOCK_DEVICE_INFORMATION
enum _BL_LOCAL_DEVICE_TYPE BL_LOCAL_DEVICE_TYPE
CPU_VENDORS
Definition: ketypes.h:41
ULONGLONG BlTimeQueryPerformanceCounter(_Out_opt_ PLARGE_INTEGER Frequency)
Definition: time.c:101
NTSTATUS BlpDeviceInitialize(VOID)
Definition: device.c:2309
NTSTATUS(* PCONSOLE_GET_GRAPHICAL_RESOLUTION)(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _Out_ struct _BL_DISPLAY_MODE *DisplayMode)
Definition: bl.h:537
struct _BL_LOCAL_DEVICE::@124::@126 FloppyDisk
struct _BL_MEMORY_DESCRIPTOR * PBL_MEMORY_DESCRIPTOR
ULONG ConsoleGraphicalResolutionListFlags
Definition: display.c:21
enum _BL_MENU_POLICY BL_MENU_POLICY
ULONG ReferenceCount
Definition: bl.h:1044
PBL_BCD_OPTION BcdData
Definition: bl.h:868
ULONG LibraryFlags
Definition: bl.h:758
NTSTATUS ConsoleFirmwareTextOpen(_In_ PBL_TEXT_CONSOLE TextConsole)
Definition: textcons.c:421
BL_LOCAL_DEVICE Disk
Definition: bl.h:976
struct _BL_FILE_INFORMATION * PBL_FILE_INFORMATION
struct _BOOT_APPLICATION_PARAMETER_BLOCK * PBOOT_APPLICATION_PARAMETER_BLOCK
struct _BITMAP * PBITMAP
ULONG OemKey
Definition: bl.h:880
ULONG AdvancedOptions
Definition: bl.h:878
GUID PartitionGuid
Definition: bl.h:973
PBL_HASH_TABLE_COMPARE_FUNCTION CompareFunction
Definition: bl.h:1173
struct _BL_DISPLAY_STATE BL_DISPLAY_STATE
EFI_STATUS EfiGetEfiStatusCode(_In_ NTSTATUS Status)
Definition: firmware.c:2474
NTSTATUS MmPapAllocatePhysicalPagesInRange(_Inout_ PPHYSICAL_ADDRESS BaseAddress, _In_ BL_MEMORY_TYPE MemoryType, _In_ ULONGLONG Pages, _In_ ULONG Attributes, _In_ ULONG Alignment, _In_ PBL_MEMORY_DESCRIPTOR_LIST NewList, _In_opt_ PBL_ADDRESS_RANGE Range, _In_ ULONG RangeType)
Definition: pagealloc.c:438
NTSTATUS BiGetRegistryValue(_In_ HANDLE KeyHandle, _In_ PWCHAR ValueName, _In_ ULONG Type, _Out_ PVOID *Buffer, _Out_ PULONG ValueLength)
Definition: bootreg.c:651
struct _BL_PD_DATA_BLOB * PBL_PD_DATA_BLOB
BOOLEAN BlDeviceIsVirtualPartitionDevice(_In_ PBL_DEVICE_DESCRIPTOR InputDevice, _Outptr_ PBL_DEVICE_DESCRIPTOR *VirtualDevice)
Definition: device.c:612
ULONG Unknown[4]
Definition: bl.h:860
BL_TRANSLATION_TYPE MmTranslationType
Definition: mm.c:17
BOOLEAN BlDisplayValidOemBitmap(VOID)
Definition: display.c:879
PCONSOLE_GET_GRAPHICAL_RESOLUTION GetGraphicalResolution
Definition: bl.h:1103
PBL_DEVICE_OPEN Open
Definition: bl.h:1250
Definition: bl.h:897
struct _BL_DEVICE_CALLBACKS BL_DEVICE_CALLBACKS
PVOID ImageBase
Definition: bl.h:1287
struct _BL_FILE_CALLBACKS BL_FILE_CALLBACKS
Definition: bl.h:892
_BL_PATH_TYPE
Definition: bl.h:283
unsigned char BOOLEAN
NTSTATUS BiLoadHive(_In_ PBL_FILE_PATH_DESCRIPTOR FilePath, _Out_ PHANDLE HiveHandle)
Definition: bootreg.c:363
DEVICE_TYPE DeviceType
Definition: bl.h:951
struct _BL_MENU_STATUS BL_MENU_STATUS
_BL_GRAPHICS_CONSOLE_TYPE
Definition: bl.h:1139
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS ConsoleGraphicalClearPixels(_In_ PBL_GRAPHICS_CONSOLE Console, _In_ ULONG Color)
Definition: guicons.c:275
NTSTATUS BlGetBootOptionBoolean(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBOOLEAN Value)
Definition: bcdopt.c:504
VOID BlDisplayInvalidateOemBitmap(VOID)
Definition: display.c:722
static WCHAR Address[46]
Definition: ping.c:68
BL_HARDDISK_DEVICE VirtualHardDisk
Definition: bl.h:936
PVOID BlMmAllocateHeap(_In_ SIZE_T Size)
Definition: heapalloc.c:569
Definition: bl.h:240
_In_ ULONG Rows
Definition: haltypes.h:7
NTSTATUS BlImgStartBootApplication(_In_ ULONG AppHandle, _Inout_ PBL_RETURN_ARGUMENTS ReturnArguments)
#define FORCEINLINE
Definition: ntbasedef.h:221
BL_BLOCK_DEVICE_INFORMATION BlockDeviceInfo
Definition: bl.h:1229
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
enum _BL_GRAPHICS_CONSOLE_TYPE BL_GRAPHICS_CONSOLE_TYPE
#define _Out_
Definition: no_sal2.h:323
Definition: bl.h:208
Definition: bl.h:234
ULONGLONG PageCount
Definition: bl.h:840
NTSTATUS BlpIoRegisterDestroyRoutine(_In_ PBL_IO_DESTROY_ROUTINE DestroyRoutine)
Definition: io.c:21
ULONG Flags
Definition: bl.h:1043
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
NTSTATUS EfiCloseProtocol(_In_ EFI_HANDLE Handle, _In_ EFI_GUID *Protocol)
Definition: firmware.c:581
Definition: bufpool.h:45
struct _BL_MEMORY_DESCRIPTOR_LIST * PBL_MEMORY_DESCRIPTOR_LIST
Definition: bl.h:864
struct _BL_INPUT_CONSOLE_VTABLE BL_INPUT_CONSOLE_VTABLE
NTSTATUS ConsoleTextLocalConstruct(_In_ PBL_TEXT_CONSOLE TextConsole, _In_ BOOLEAN Activate)
Definition: textcons.c:104
ULONG PixelsPerScanLine
Definition: bl.h:1159
NTSTATUS BlpGetBootOptionIntegerList(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG *Value, _Out_ PULONGLONG Count, _In_ BOOLEAN NoCopy)
Definition: bcdopt.c:541
NTSTATUS EfiFreePages(_In_ ULONG Pages, _In_ EFI_PHYSICAL_ADDRESS PhysicalAddress)
Definition: firmware.c:973
PBL_MEMORY_DESCRIPTOR MmMdInitByteGranularDescriptor(_In_ ULONG Flags, _In_ BL_MEMORY_TYPE Type, _In_ ULONGLONG BasePage, _In_ ULONGLONG VirtualPage, _In_ ULONGLONG PageCount)
Definition: descriptor.c:377
PWCHAR BlResourceFindMessage(_In_ ULONG MsgId)
Definition: resource.c:349
NTSTATUS ConsoleGraphicalClearText(_In_ PBL_GRAPHICS_CONSOLE Console, _In_ BOOLEAN LineOnly)
Definition: guicons.c:299
USHORT Signature
Definition: bl.h:1310
BL_LOCAL_DEVICE_TYPE Type
Definition: bl.h:1199
NTSTATUS(* PBL_MM_MAP_PHYSICAL_ADDRESS)(_In_ PHYSICAL_ADDRESS PhysicalAddress, _Out_ PVOID VirtualAddress, _In_ ULONG Size, _In_ ULONG CacheAttributes)
Definition: bl.h:731
Definition: bl.h:210
struct _BOOT_APPLICATION_PARAMETER_BLOCK BOOT_APPLICATION_PARAMETER_BLOCK
PBL_ARCH_CONTEXT CurrentExecutionContext
Definition: arch.c:17
struct _BL_HASH_NODE * PBL_HASH_NODE
struct _BL_DEVICE_DESCRIPTOR BL_DEVICE_DESCRIPTOR
_In_ PVOID Argument2
Definition: classpnp.h:680
NTSTATUS BlSecureBootIsEnabled(_Out_ PBOOLEAN SecureBootEnabled)
Definition: firmware.c:732
struct _BL_DEVICE_CALLBACKS * PBL_DEVICE_CALLBACKS
struct _BL_MENU_STATUS * PL_MENU_STATUS
Definition: bl.h:198
_BL_MEMORY_DESCRIPTOR_TYPE
Definition: bl.h:222
struct _BL_FILE_SYSTEM_ENTRY * PBL_FILE_SYSTEM_ENTRY
NTSTATUS BlpDisplayRegisterLocale(_In_ PWCHAR Locale)
Definition: display.c:176
BOOLEAN BlArchIsCpuIdFunctionSupported(_In_ ULONG Function)
Definition: util.c:856
PBITMAP BlDisplayGetOemBitmap(_Out_ PCOORD Offset, _Out_opt_ PULONG Flags)
Definition: bl.h:251
ULONG X
Definition: bl.h:1340
struct _DIB_HEADER * PDIB_HEADER
NTSTATUS ConsoleGraphicalGetOriginalResolution(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ PBL_DISPLAY_MODE DisplayMode)
struct _BL_WINDOWS_LOAD_OPTIONS BL_WINDOWS_LOAD_OPTIONS
struct _BL_DEVICE_INFORMATION * PBL_DEVICE_INFORMATION
Definition: bl.h:893
struct _BL_DEVICE_DESCRIPTOR::@128::@131 Partition
struct _COORD COORD
PBL_DEVICE_DESCRIPTOR Device
Definition: bl.h:1302
#define _Out_opt_
Definition: no_sal2.h:339
#define BL_MM_INCLUDE_NO_FIRMWARE_MEMORY
Definition: bl.h:108
_In_ HANDLE Handle
Definition: extypes.h:390
PBL_BCD_OPTION MiscGetBootOption(_In_ PBL_BCD_OPTION List, _In_ ULONG Type)
Definition: bcdopt.c:17
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
NTSTATUS BlDeviceReadAtOffset(_In_ ULONG DeviceId, _In_ ULONG Size, _In_ ULONGLONG Offset, _In_ PVOID Buffer, _Out_ PULONG BytesRead)
Definition: device.c:773
NTSTATUS MmMdFreeDescriptor(_In_ PBL_MEMORY_DESCRIPTOR MemoryDescriptor)
Definition: descriptor.c:157
CHAR Signature[8]
Definition: bl.h:991
VOID BlDestroyBootEntry(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry)
Definition: bootlib.c:442
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
BL_TEXT_CONSOLE TextConsole
Definition: bl.h:1166
PCONSOLE_SET_TEXT_STATE SetTextState
Definition: bl.h:1090
ULONG FileSize
Definition: bl.h:1280
LIST_ENTRY ListHead
Definition: bl.h:1007
UCHAR Flags
Definition: bl.h:1274
VOID ConsoleFirmwareTextClose(_In_ PBL_TEXT_CONSOLE TextConsole)
Definition: textcons.c:398
VOID ConsoleEfiGopClose(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: gop.c:177
ULONGLONG Maximum
Definition: bl.h:1016
ULONG(* PBL_HASH_TABLE_HASH_FUNCTION)(_In_ struct _BL_HASH_ENTRY *Entry, _In_ ULONG TableSize)
Definition: bl.h:603
enum _BL_MEMORY_ATTR BL_MEMORY_ATTR
PVOID DeviceSpecificData
Definition: bl.h:1268
struct _BL_HARDDISK_DEVICE::@119::@122 Gpt
NTSTATUS BlReplaceBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ PBL_BCD_OPTION NewOptions)
Definition: bcdopt.c:824
ULONG ClrUsed
Definition: bl.h:1327
NTSTATUS BlMmGetMemoryMap(_In_ PLIST_ENTRY MemoryMap, _In_ PBL_BUFFER_DESCRIPTOR MemoryParameters, _In_ ULONG WhichTypes, _In_ ULONG Flags)
Definition: pagealloc.c:1222
PLIST_ENTRY HashLinks
Definition: bl.h:1171
NTSTATUS MmFwGetMemoryMap(_Out_ PBL_MEMORY_DESCRIPTOR_LIST MemoryMap, _In_ ULONG Flags)
Definition: firmware.c:1845
LIST_ENTRY List
Definition: psmgr.c:57
struct _BL_BLOCK_DEVICE_INFORMATION::@134 Disk
__wchar_t WCHAR
Definition: xmlstorage.h:180
PBL_FS_DESTROY_CALLBACK Destroy
Definition: bl.h:1064
VOID EfiConOutReadCurrentMode(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _Out_ EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode)
Definition: firmware.c:1227
struct _BL_BLOCK_DEVICE_INFORMATION * PBL_BLOCK_DEVICE_INFORMATION
PBL_DEVICE_CREATE Create
Definition: bl.h:1258
PULONG DataStart
Definition: bl.h:1134
Definition: bl.h:231
struct _BL_HASH_ENTRY * PBL_HASH_ENTRY
NTSTATUS BlCopyBootOptions(_In_ PBL_BCD_OPTION OptionList, _Out_ PBL_BCD_OPTION *CopiedOptions)
Definition: bcdopt.c:597
ULONGLONG DataSize
Definition: bl.h:820
uint64_t ULONGLONG
Definition: typedefs.h:65
NTSTATUS MmBaInitialize(VOID)
Definition: blkalloc.c:271
NTSTATUS BlSecureBootCheckForFactoryReset(VOID)
Definition: firmware.c:759
enum _BL_DEVICE_TYPE BL_DEVICE_TYPE
struct _BL_FILE_CALLBACKS * PBL_FILE_CALLBACKS
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * Protocol
Definition: bl.h:1115
NTSTATUS BlUtlInitialize(VOID)
Definition: util.c:197
C_ASSERT(BL_MM_INCLUDE_NO_FIRMWARE_MEMORY==0x1BF)
struct _BL_RETURN_ARGUMENTS BL_RETURN_ARGUMENTS
NTSTATUS BlInitializeLibrary(_In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootAppParameters, _In_ PBL_LIBRARY_PARAMETERS LibraryParameters)
Definition: bootlib.c:355
ULONG DataSize
Definition: bl.h:1186
struct _BL_IMAGE_APPLICATION_ENTRY BL_IMAGE_APPLICATION_ENTRY
struct _BL_FILE_PATH_DESCRIPTOR BL_FILE_PATH_DESCRIPTOR
NTSTATUS BiOpenKey(_In_ HANDLE ParentHandle, _In_ PWCHAR KeyName, _Out_ PHANDLE Handle)
Definition: bootreg.c:186
NTSTATUS MmPaReleaseSelfMapPages(_In_ PHYSICAL_ADDRESS Address)
Definition: pagealloc.c:1505
_BL_MEMORY_TYPE
Definition: bl.h:302
PCONSOLE_WRITE_TEXT WriteText
Definition: bl.h:1094
PVOID BlTblFindEntry(_In_ PVOID *Table, _In_ ULONG Count, _Out_ PULONG EntryIndex, _In_ PBL_TBL_LOOKUP_ROUTINE Callback, _In_ PVOID Argument1, _In_ PVOID Argument2, _In_ PVOID Argument3, _In_ PVOID Argument4)
Definition: util.c:273
NTSTATUS ConsoleGraphicalSetTextState(_In_ PBL_GRAPHICS_CONSOLE Console, _In_ ULONG Mask, _In_ PBL_DISPLAY_STATE TextState)
Definition: guicons.c:37
struct _BL_LIBRARY_PARAMETERS BL_LIBRARY_PARAMETERS
NTSTATUS BlpDisplayInitialize(_In_ ULONG Flags)
Definition: display.c:574
ULONG Flags
Definition: bl.h:1264
struct _BL_BLOCK_DEVICE BL_BLOCK_DEVICE
NTSTATUS BlImgUnloadBootApplication(_In_ ULONG AppHandle)
Definition: image.c:2021
enum _BL_PARTITION_TYPE BL_PARTITION_TYPE
_BL_MEMORY_CLASS
Definition: bl.h:292
struct _BL_FIRMWARE_DESCRIPTOR BL_FIRMWARE_DESCRIPTOR
Definition: bl.h:212
ULONG ClrImportant
Definition: bl.h:1328
#define _Inout_
Definition: no_sal2.h:244
struct _BITMAP BITMAP
FORCEINLINE VOID BlSetupDefaultParameters(_Out_ PBL_LIBRARY_PARAMETERS LibraryParameters)
Definition: bl.h:1355
NTSTATUS BlMmUnmapVirtualAddressEx(_In_ PVOID VirtualAddress, _In_ ULONGLONG Size)
Definition: mm.c:487
NTSTATUS ConsoleTextLocalReinitialize(_In_ struct _BL_TEXT_CONSOLE *Console)
Definition: textcons.c:38
BL_LOCAL_DEVICE_TYPE Type
Definition: bl.h:926
ULONG DescriptorOffset
Definition: bl.h:804
NTSTATUS MmPaReserveSelfMapPages(_Inout_ PPHYSICAL_ADDRESS PhysicalAddress, _In_ ULONG Alignment, _In_ ULONG PageCount)
Definition: pagealloc.c:1564
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
struct _BL_GRAPHICS_CONSOLE_VTABLE * PBL_GRAPHICS_CONSOLE_VTABLE
enum _BL_ARCH_MODE BL_ARCH_MODE
BOOLEAN(* PCONSOLE_IS_ENABLED)(_In_ struct _BL_GRAPHICS_CONSOLE *Console)
Definition: bl.h:531
ULONGLONG TotalBytesRead
Definition: bl.h:1046
EFI_HANDLE Handle
Definition: bl.h:1154
NTSTATUS EfiConInReset(VOID)
Definition: firmware.c:794
NTSTATUS BlAppendBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ PBL_BCD_OPTION Options)
Definition: bcdopt.c:737
PGUID BlGetApplicationIdentifier(VOID)
Definition: bootlib.c:414
ULONG Type
Definition: bl.h:847
struct _BL_HARDDISK_DEVICE::@119::@121 Mbr
struct _BL_BCD_OPTION BL_BCD_OPTION
ULONG XPelsPerMeter
Definition: bl.h:1325
NTSTATUS EfipGetRsdt(_Out_ PPHYSICAL_ADDRESS FoundRsdt)
Definition: firmware.c:1635
enum _BL_MEMORY_TYPE BL_MEMORY_TYPE
GUID PartitionSignature
Definition: bl.h:914
NTSTATUS MmPaTruncateMemory(_In_ ULONGLONG BasePage)
Definition: pagealloc.c:51
NTSTATUS(* PBL_FILE_OPEN)(_In_ struct _BL_FILE_ENTRY *Directory, _In_ PWCHAR FileName, _In_ ULONG Flags, _Out_ struct _BL_FILE_ENTRY **FileEntry)
Definition: bl.h:394
ULONG SizeImage
Definition: bl.h:1324
VOID MmMdFreeGlobalDescriptors(VOID)
Definition: descriptor.c:1332
PCONSOLE_REINITIALIZE Reinitialize
Definition: bl.h:1088
PBL_DEVICE_FLUSH Flush
Definition: bl.h:1257
static VIDEODISPLAYMODE DisplayMode
Definition: pcvideo.c:116
ULONG HRes
Definition: bl.h:1080
ULONG Size
Definition: bl.h:1172
ULONG ActualSize
Definition: bl.h:1294
Definition: bl.h:200
PBL_FS_INIT_CALLBACK InitCallback
Definition: bl.h:1055
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1060
VOID ConsoleGraphicalDestruct(_In_ struct _BL_GRAPHICS_CONSOLE *Console)
NTSTATUS(* PCONSOLE_GET_TEXT_RESOLUTION)(_In_ struct _BL_TEXT_CONSOLE *Console, _Out_ PULONG TextResolution)
Definition: bl.h:509
struct _BL_DEVICE_DESCRIPTOR::@128::@130 Remote
NTSTATUS ConsoleTextBaseGetTextResolution(_In_ struct _BL_TEXT_CONSOLE *Console, _Out_ PULONG TextResolution)
Definition: textcons.c:66
unsigned char UCHAR
Definition: xmlstorage.h:181
BOOLEAN BlBdDebuggerEnabled(VOID)
Definition: debug.c:53
_BL_DEVICE_TYPE
Definition: bl.h:246
struct _BL_FILE_SYSTEM_REGISTRATION_TABLE BL_FILE_SYSTEM_REGISTRATION_TABLE
char * PBOOLEAN
Definition: retypes.h:11
ULONG BgColor
Definition: bl.h:1071
NTSTATUS BiDeleteKey(_In_ HANDLE KeyHandle)
Definition: bootreg.c:886
ULONG Size
Definition: bl.h:1311
ULONG DeviceId
Definition: bl.h:1041
struct _BL_HASH_VALUE BL_HASH_VALUE
ULONG BlobSize
Definition: bl.h:1348
NTSTATUS BlDisplayGetScreenResolution(_Out_ PULONG HRes, _Out_ PULONG Vres)
Definition: display.c:679
struct _BL_DISPLAY_MODE * PBL_DISPLAY_MODE
ULONG BufferSize
Definition: bl.h:1295
_In_ PPCI_DEVICE_PRESENCE_PARAMETERS Parameters
Definition: iotypes.h:871
ULONG MinimumHeapSize
Definition: bl.h:761
BL_DISPLAY_STATE State
Definition: bl.h:1112
PVOID DspRemoteInputConsole
Definition: display.c:35
VOID ConsolepClearBuffer(_In_ PUCHAR FrameBuffer, _In_ ULONG Width, _In_ PUCHAR FillColor, _In_ ULONG Height, _In_ ULONG ScanlineWidth, _In_ ULONG PixelDepth)
Definition: guicons.c:109
NTSTATUS ConsolepConvertColorToPixel(_In_ BL_COLOR Color, _Out_ PUCHAR Pixel)
Definition: guicons.c:174
NTSTATUS BlGetBootOptionString(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PWCHAR *Value)
Definition: bcdopt.c:146
_BL_MEMORY_ATTR
Definition: bl.h:342
LIST_ENTRY ListEntry
Definition: bl.h:1054
ULONGLONG BaseAddress
Definition: bl.h:836
CPU_VENDORS BlArchGetCpuVendor(VOID)
Definition: util.c:937
#define NTSTATUS
Definition: precomp.h:20
_In_ GUID _In_ PVOID _In_ ULONG ValueLength
Definition: hubbusif.h:311
_BL_ARCH_MODE
Definition: bl.h:237
struct _BL_DEFERRED_FONT_FILE * PBL_DEFERRED_FONT_FILE
Definition: bl.h:207
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
#define VOID
Definition: acefi.h:82
BL_MEMORY_DESCRIPTOR_LIST MmMdlBadMemory
Definition: pagealloc.c:41
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:31
NTSTATUS ConsoleTextLocalSetTextResolution(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ ULONG NewTextResolution, _Out_ PULONG OldTextResolution)
Definition: textcons.c:75
struct _BL_HARDDISK_DEVICE::@119::@123 Raw
_BL_TRANSLATION_TYPE
Definition: bl.h:229
union _BL_DEVICE_DESCRIPTOR::@128::@131::@132 Mbr
#define BL_MM_INCLUDE_ONLY_FIRMWARE_MEMORY
Definition: bl.h:118
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
PBL_FS_PURGE_CALLBACK PurgeCallback
Definition: bl.h:1058
ULONG Unknown
Definition: bl.h:1265
struct _BL_PROTOCOL_HANDLE * PBL_PROTOCOL_HANDLE
ULONG Size
Definition: bl.h:1318
PBL_FS_DESTROY_CALLBACK DestroyCallback
Definition: bl.h:1056
Definition: typedefs.h:117
NTSTATUS(* PBL_FILE_WRITE)(VOID)
Definition: bl.h:418
NTSTATUS MmPapFreePages(_In_ PVOID Address, _In_ ULONG WhichList)
Definition: pagealloc.c:1196
NTSTATUS ConsoleInputLocalEraseBuffer(_In_ PBL_INPUT_CONSOLE Console, _In_opt_ PULONG ValueToFill)
Definition: textcons.c:527
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3773
BL_MEMORY_DESCRIPTOR_LIST MmMdlUnmappedUnallocated
Definition: pagealloc.c:39
NTSTATUS BlpFileInitialize(VOID)
Definition: file.c:908
ULONG Flags
Definition: bl.h:1180
struct _BL_FILE_ENTRY BL_FILE_ENTRY
Definition: range.c:43
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
EFI_GUID EfiDevicePathProtocol
Definition: firmware.c:31
BOOLEAN(* PBL_HASH_TABLE_COMPARE_FUNCTION)(_In_ struct _BL_HASH_ENTRY *Entry1, _In_ struct _BL_HASH_ENTRY *Entry2)
Definition: bl.h:596
PBL_FILE_SET_INFO SetInfo
Definition: bl.h:1035
Definition: bl.h:1177
ULONGLONG Minimum
Definition: bl.h:1015
Definition: bl.h:1338
VOID(* PCONSOLE_DESTRUCT)(_In_ struct _BL_TEXT_CONSOLE *Console)
Definition: bl.h:482
NTSTATUS BlAppendBootOptionString(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ PWCHAR OptionString)
Definition: bcdopt.c:689
PBL_DEVICE_RESET Reset
Definition: bl.h:1256
struct _BL_ARCH_CONTEXT BL_ARCH_CONTEXT
struct _BL_HASH_VALUE * PBL_HASH_VALUE
ULONG Flags
Definition: bl.h:858
VOID BlImgQueryCodeIntegrityBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY ApplicationEntry, _Out_ PBOOLEAN IntegrityChecksDisabled, _Out_ PBOOLEAN TestSigning)
Definition: image.c:651
ULONG BlpApplicationFlags
Definition: bootlib.c:21
VOID MmMdDbgDumpList(_In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList, _In_opt_ ULONG MaxCount)
Definition: mmx86.c:579
ULONG PartitionSignature
Definition: bl.h:909
VOID BlUtlUpdateProgress(_In_ ULONG Percentage, _Out_opt_ PBOOLEAN Completed)
Definition: util.c:181
Status
Definition: gdiplustypes.h:24
NTSTATUS BlFileClose(_In_ ULONG FileId)
Definition: file.c:220
GUID Guid
Definition: bl.h:867
BMP_HEADER BmpHeader
Definition: bl.h:1333
NTSTATUS EtfsInitialize(VOID)
Definition: etfs.c:969
struct _BMP_HEADER BMP_HEADER
NTSTATUS BlpArchInitialize(_In_ ULONG Phase)
Definition: arch.c:235
static PVOID FrameBuffer
Definition: xboxvideo.c:24
NTSTATUS ConsoleFirmwareGraphicalClear(_In_ PBL_GRAPHICS_CONSOLE Console, _In_ ULONG Color)
Definition: guicons.c:90
Definition: bl.h:896
PCONSOLE_SET_GRAPHICAL_RESOLUTION SetOriginalResolution
Definition: bl.h:1105
struct _BL_APPLICATION_ENTRY BL_APPLICATION_ENTRY
ULONG TranslationType
Definition: bl.h:759
struct _BL_DEVICE_DESCRIPTOR * PBL_DEVICE_DESCRIPTOR
#define _In_
Definition: no_sal2.h:204
NTSTATUS MmMapPhysicalAddress(_Inout_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_ PVOID *VirtualAddress, _Inout_ PULONGLONG Size, _In_ ULONG CacheAttributes)
PBL_MEMORY_DESCRIPTOR MmMdFindDescriptor(_In_ ULONG WhichList, _In_ ULONG Flags, _In_ ULONGLONG Page)
Definition: descriptor.c:1049
struct _BL_IMG_FILE * PBL_IMG_FILE
EFI_DEVICE_PATH * EfiIsDevicePathParent(_In_ EFI_DEVICE_PATH *DevicePath1, _In_ EFI_DEVICE_PATH *DevicePath2)
Definition: firmware.c:47
ULONG_PTR SIZE_T
Definition: typedefs.h:78
NTSTATUS BlGetBootOptionDevice(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PBL_DEVICE_DESCRIPTOR *Value, _In_opt_ PBL_BCD_OPTION *ExtraOptions)
Definition: bcdopt.c:321
ULONGLONG BasePage
Definition: bl.h:831
struct _FileName FileName
Definition: fatprocs.h:884
NTSTATUS BlpFwInitialize(_In_ ULONG Phase, _In_ PBL_FIRMWARE_DESCRIPTOR FirmwareParameters)
Definition: firmware.c:2290
NTSTATUS MmPaInitialize(_In_ PBL_MEMORY_DATA MemoryData, _In_ ULONG MinimumPages)
_Must_inspect_result_ _In_ USHORT _In_ PHIDP_PREPARSED_DATA _Out_writes_to_ LengthAttributes PHIDP_EXTENDED_ATTRIBUTES Attributes
Definition: hidpi.h:348
Definition: bl.h:211
static const COLUMN_LIST Columns[]
Definition: listview.c:19
ULONG FileId
Definition: bl.h:1042
struct _BL_LOADED_APPLICATION_ENTRY BL_LOADED_APPLICATION_ENTRY
VOID EfiGopGetFrameBuffer(_In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface, _Out_ PHYSICAL_ADDRESS *FrameBuffer, _Out_ UINTN *FrameBufferSize)
Definition: firmware.c:1255
struct _BL_BLOCK_DEVICE_INFORMATION::@134::@135::@137 Mbr
union _BL_DEVICE_DESCRIPTOR::@128::@131::@133 Gpt
_BL_MENU_POLICY
Definition: bl.h:216
NTSTATUS BfClearToEndOfLine(_In_ PBL_GRAPHICS_CONSOLE Console)
Definition: font.c:149
ULONG BlGetBootOptionSize(_In_ PBL_BCD_OPTION BcdOption)
Definition: bcdopt.c:115
struct _BL_BLOCK_DEVICE * PBL_BLOCK_DEVICE
NTSTATUS EfiConOutSetMode(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ ULONG Mode)
Definition: firmware.c:1066
NTSTATUS(* PBL_FILE_READ)(_In_ struct _BL_FILE_ENTRY *FileEntry, _In_ PVOID Buffer, _In_ ULONG Size, _Out_opt_ PULONG BytesRead)
Definition: bl.h:409
Definition: bl.h:286
EFI_GUID EfiLoadedImageProtocol
Definition: firmware.c:30
PCONSOLE_REINITIALIZE Reinitialize
Definition: bl.h:1123
Definition: bl.h:1038
Definition: bl.h:266
PVOID DspLocalInputConsole
Definition: display.c:38
unsigned short USHORT
Definition: pedump.c:61
EFI_GUID EfiRootAcpiTableGuid
Definition: firmware.c:34
_BL_BOOT_ERROR_STATUS
Definition: bl.h:890
struct _BL_INPUT_CONSOLE_VTABLE * PBL_INPUT_CONSOLE_VTABLE
NTSTATUS(* PBL_STATUS_ERROR_HANDLER)(_In_ ULONG ErrorCode, _In_ ULONG Parameter1, _In_ ULONG_PTR Parameter2, _In_ ULONG_PTR Parameter3, _In_ ULONG_PTR Parameter4)
Definition: bl.h:746
ULONG PixelDepth
Definition: bl.h:1149
VOID MmMdInitialize(_In_ ULONG Phase, _In_ PBL_LIBRARY_PARAMETERS LibraryParameters)
Definition: descriptor.c:1384
ULONG ImageSize
Definition: bl.h:1288
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
ULONG YPelsPerMEter
Definition: bl.h:1326
Definition: bl.h:1331
VOID BiDereferenceHive(_In_ HANDLE KeyHandle)
Definition: bootreg.c:117
BL_MEMORY_DESCRIPTOR_LIST MmMdlFwAllocationTracker
Definition: pagealloc.c:37
NTSTATUS(* PBL_DEVICE_SET_INFORMATION)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry, _In_ struct _BL_DEVICE_INFORMATION *DeviceInformation)
Definition: bl.h:655
ULONG Version
Definition: bl.h:800
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappingTrackers
Definition: pagealloc.c:46
#define DEVICE_TYPE
Definition: guid.c:10
NTSTATUS(* PBL_DEVICE_OPEN)(_In_ struct _BL_DEVICE_DESCRIPTOR *Device, _In_ struct _BL_DEVICE_ENTRY *DeviceEntry)
Definition: bl.h:620
NTSTATUS(* PBL_MM_REMAP_VIRTUAL_ADDRESS)(_In_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_ PVOID VirtualAddress, _In_ ULONG Size, _In_ ULONG CacheAttributes)
Definition: bl.h:723
_In_ FILTER_INFORMATION_CLASS _In_ ULONG _Out_ PULONG BytesReturned
Definition: fltkernel.h:1716
EFI_GUID EfiGraphicsOutputProtocol
Definition: firmware.c:28
FORCEINLINE PVOID PhysicalAddressToPtr(_In_ PHYSICAL_ADDRESS PhysicalAddress)
Definition: bl.h:1390
NTSTATUS(* PBL_FS_MOUNT_CALLBACK)(_In_ ULONG DeviceId, _In_ ULONG Unknown, _Out_ struct _BL_FILE_ENTRY **FileEntry)
Definition: bl.h:456
LIST_ENTRY ListEntry
Definition: bl.h:826
struct _BL_GRAPHICS_CONSOLE * PBL_GRAPHICS_CONSOLE
ULONG VRes
Definition: bl.h:1081
enum _BL_MEMORY_DESCRIPTOR_TYPE BL_MEMORY_DESCRIPTOR_TYPE
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS BlUtlRegisterProgressRoutine(VOID)
Definition: util.c:244
VOID BfiFreeDeferredFontFile(_In_ PBL_DEFERRED_FONT_FILE DeferredFontFile)
Definition: font.c:30
VOID EfiPrintf(_In_ PWCHAR Format,...)
Definition: firmware.c:126
EFI_GUID EfiRootAcpiTable10Guid
Definition: firmware.c:35
BL_MEMORY_DESCRIPTOR_LIST MmMdlPersistentMemory
Definition: pagealloc.c:43
ULONG Height
Definition: bl.h:1320
struct _BL_TEXT_CONSOLE_VTABLE * PBL_TEXT_CONSOLE_VTABLE
ULONG MdListOffset
Definition: bl.h:801
VOID ConsoleFirmwareGraphicalClose(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: guicons.c:18
EFI_DEVICE_PATH * EfiGetLeafNode(_In_ EFI_DEVICE_PATH *DevicePath)
Definition: firmware.c:102
EFI_SYSTEM_TABLE * SystemTable
Definition: bl.h:812
PBL_MM_FLUSH_TLB BlMmFlushTlb
Definition: mmx86.c:48
static LARGE_INTEGER Frequency
Definition: clock.c:41
BOOLEAN ConsoleGraphicalIsEnabled(_In_ struct _BL_GRAPHICS_CONSOLE *Console)
CConsole Console
ULONGLONG BlArchGetPerformanceCounter(VOID)
Definition: util.c:902
ULONG XPos
Definition: bl.h:1073
VOID Archx86TransferTo32BitApplicationAsm(VOID)
Definition: arch.c:51
NTSTATUS BlImgLoadBootApplication(_In_ PBL_LOADED_APPLICATION_ENTRY BootEntry, _Out_ PULONG AppHandle)
Definition: image.c:1324
NTSTATUS(* PCONSOLE_ENABLE)(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ BOOLEAN Enable)
Definition: bl.h:551
PBL_FILE_WRITE Write
Definition: bl.h:1032
NTSTATUS ConsoleEfiGopOpen(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: gop.c:198
_Must_inspect_result_ _Outptr_result_bytebuffer_ ViewSize PVOID * MappedBase
Definition: mmfuncs.h:493
ULONG Mode
Definition: bl.h:1116
NTSTATUS BlTblSetEntry(_Inout_ PVOID **Table, _Inout_ PULONG Count, _In_ PVOID Entry, _Out_ PULONG EntryIndex, _In_ PBL_TBL_SET_ROUTINE Callback)
Definition: util.c:321
ULONGLONG StartOffset
Definition: bl.h:1236
NTSTATUS BcInitialize(VOID)
Definition: blkcache.c:73
NTSTATUS(* PBL_DEVICE_ENUMERATE_DEVICE_CLASS)(VOID)
Definition: bl.h:614
VOID BlStatusPrint(_In_ PCWCH Format,...)
Definition: debug.c:75
DIB_HEADER DibHeader
Definition: bl.h:1334
NTSTATUS BiEnumerateSubKeys(_In_ HANDLE KeyHandle, _Out_ PWCHAR **SubKeyList, _Out_ PULONG SubKeyCount)
Definition: bootreg.c:717
ULONG MinimumAllocationCount
Definition: bl.h:760
struct _BL_GRAPHICS_CONSOLE_VTABLE BL_GRAPHICS_CONSOLE_VTABLE
NTSTATUS ConsoleEfiGraphicalOpenProtocol(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole, _In_ BL_GRAPHICS_CONSOLE_TYPE Type)
Definition: guicons.c:34
Definition: bl.h:894
PBL_DEVICE_CLOSE Close
Definition: bl.h:1251
struct _BL_TEXT_CONSOLE_VTABLE BL_TEXT_CONSOLE_VTABLE
#define BOOLEAN
Definition: pedump.c:73
PIMAGE_SECTION_HEADER BlImgFindSection(_In_ PVOID ImageBase, _In_ ULONG ImageSize)
Definition: image.c:611
NTSTATUS BlpDisplayReinitialize(VOID)
Definition: display.c:541
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:390
struct FileInfo FileInfo
_Must_inspect_result_ typedef _Out_ PULONG TableSize
Definition: iotypes.h:3970
NTSTATUS BfLoadDeferredFontFiles(VOID)
Definition: font.c:99
ULONG Flags
Definition: bl.h:866
PULONG EndBuffer
Definition: bl.h:1136
PVOID FsSpecificData
Definition: bl.h:1049
NTSTATUS EfiConInExReset(VOID)
Definition: firmware.c:825
BL_MEMORY_DESCRIPTOR_LIST MmMdlUnmappedAllocated
Definition: pagealloc.c:38
ULONG Width
Definition: bl.h:1319
NTSTATUS(* PCONSOLE_WRITE_TEXT)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ PCHAR Text, _In_ ULONG Attribute)
Definition: bl.h:558
struct _BL_FILE_ENTRY * PBL_FILE_ENTRY
NTSTATUS BlDisplaySetScreenResolution(VOID)
Definition: display.c:645
EFI_LOCATE_SEARCH_TYPE
Definition: UefiSpec.h:1415
NTSTATUS BlpIoInitialize(VOID)
Definition: io.c:35
unsigned int ULONG
Definition: retypes.h:1
ULONG YPos
Definition: bl.h:1074
ULONG ImageOffset
Definition: bl.h:942
BL_MEMORY_DESCRIPTOR_LIST MmMdlTruncatedMemory
Definition: pagealloc.c:42
NTSTATUS EfiGopSetMode(_In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface, _In_ ULONG Mode)
Definition: firmware.c:1349
#define ULONG_PTR
Definition: config.h:101
struct _BL_APPLICATION_ENTRY * PBL_APPLICATION_ENTRY
PBL_DEVICE_DESCRIPTOR DeviceDescriptor
Definition: bl.h:1269
VOID BlArchCpuId(_In_ ULONG Function, _In_ ULONG SubFunction, _Out_ PCPU_INFO Result)
Definition: util.c:924
ULONG ListOffset
Definition: bl.h:850
NTSTATUS(* PBL_DEVICE_CLOSE)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry)
Definition: bl.h:627
struct _BL_DISPLAY_STATE * PBL_DISPLAY_STATE
struct _BL_INPUT_CONSOLE * PBL_INPUT_CONSOLE
NTSTATUS BlDeviceSetInformation(_In_ ULONG DeviceId, _In_ PBL_DEVICE_INFORMATION DeviceInformation)
VOID ConsoleInputLocalDestruct(_In_ struct _BL_INPUT_CONSOLE *Console)
PBL_MEMORY_DESCRIPTOR MmMdFindDescriptorFromMdl(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ ULONG Flags, _In_ ULONGLONG Page)
Definition: descriptor.c:960
ULONGLONG Offset
Definition: bl.h:1022
NTSTATUS(* PBL_FILE_DESTROY_CALLBACK)(_In_ PVOID Entry)
Definition: bl.h:470
NTSTATUS BlpDeviceOpen(_In_ PBL_DEVICE_DESCRIPTOR Device, _In_ ULONG Flags, _In_ ULONG Unknown, _Out_ PULONG DeviceId)
Definition: device.c:2111
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappedUnallocated
Definition: pagealloc.c:36
ULONG AnyKey
Definition: bl.h:877
Definition: bl.h:1284
struct _BL_INPUT_CONSOLE BL_INPUT_CONSOLE
BL_ARCH_MODE Mode
Definition: bl.h:1000
PCONSOLE_GET_GRAPHICAL_RESOLUTION GetOriginalResolution
Definition: bl.h:1104
NTSTATUS ConsoleEfiGopEnable(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: gop.c:88
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Out_ PPHYSICAL_ADDRESS DestinationAddress
Definition: iotypes.h:1089
NTSTATUS(* PBL_FILE_SET_INFO)(_In_ struct _BL_FILE_ENTRY *FileEntry, _In_ struct _BL_FILE_INFORMATION *FileInfo)
Definition: bl.h:437
BOOLEAN BlMmTranslateVirtualAddress(_In_ PVOID VirtualAddress, _Out_ PPHYSICAL_ADDRESS PhysicalAddress)
Definition: mm.c:525
NTSTATUS ConsoleGraphicalGetGraphicalResolution(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ PBL_DISPLAY_MODE DisplayMode)
NTSTATUS MmMdTruncateDescriptors(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR_LIST NewList, _In_ ULONGLONG BasePage)
Definition: descriptor.c:410
ULONG Empty
Definition: bl.h:852
ULONGLONG VirtualPage
Definition: bl.h:832
struct _BL_MEMORY_DATA * PBL_MEMORY_DATA
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
VOID ConsoleEfiUgaClose(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: uga.c:27
DEFINE_GUID(BadMemoryGuid, 0x54B8275B, 0xD431, 0x473F, 0xAC, 0xFB, 0xE5, 0x36, 0xA0, 0x84, 0x94, 0xA3)
BL_DEVICE_TYPE DeviceType
Definition: bl.h:1226
_In_ BOOLEAN _In_ USHORT Directory
Definition: rtlfuncs.h:3718
struct _BL_BUFFER_DESCRIPTOR * PBL_BUFFER_DESCRIPTOR
BL_ADDRESS_RANGE MmArchKsegAddressRange
Definition: mmx86.c:29
NTSTATUS MmPapAllocatePagesInRange(_Inout_ PVOID *PhysicalAddress, _In_ BL_MEMORY_TYPE MemoryType, _In_ ULONGLONG Pages, _In_ ULONG Attributes, _In_ ULONG Alignment, _In_opt_ PBL_ADDRESS_RANGE Range, _In_ ULONG Type)
Definition: pagealloc.c:707
static const WCHAR Signature[]
Definition: parser.c:141
struct _COORD * PCOORD
NTSTATUS ConsoleInputBaseReinitialize(_In_ struct _BL_INPUT_CONSOLE *Console)
#define __in
Definition: dbghelp.h:35
BL_DEVICE_CALLBACKS Callbacks
Definition: bl.h:1267
NTSTATUS EfiGetNtStatusCode(_In_ EFI_STATUS EfiStatus)
Definition: firmware.c:2539
ULONG Y
Definition: bl.h:1341
BL_DISPLAY_MODE OldDisplayMode
Definition: bl.h:1152
struct _BL_FILE_SYSTEM_ENTRY BL_FILE_SYSTEM_ENTRY
NTSTATUS ConsoleTextBaseGetTextState(_In_ struct _BL_TEXT_CONSOLE *Console, _Out_ PBL_DISPLAY_STATE TextState)
Definition: textcons.c:47
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS SourceAddress
Definition: iotypes.h:1089
struct _BL_DEVICE_ENTRY BL_DEVICE_ENTRY
PWCHAR FontBaseDirectory
Definition: bl.h:765
NTSTATUS(* PBL_DEVICE_CREATE)(VOID)
Definition: bl.h:674
EFI_HANDLE Handle
Definition: bl.h:1238
LPFNPSPCALLBACK Callback
Definition: desk.c:111
BL_MEMORY_DESCRIPTOR_LIST MmMdlFreeVirtual
Definition: pagealloc.c:45
PWCHAR BlResourceFindHtml(VOID)
Definition: resource.c:305
ULONG BootOptions
Definition: bl.h:879
struct _BL_FILE_PATH_DESCRIPTOR * PBL_FILE_PATH_DESCRIPTOR
ULONG BlUtlCheckSum(_In_ ULONG PartialSum, _In_ PUCHAR Buffer, _In_ ULONG Length, _In_ ULONG Flags)
Definition: util.c:777
LIST_ENTRY RegisteredFileSystems
Definition: file.c:18
PWCHAR FsName
Definition: bl.h:1023
struct _BL_MEMORY_DATA BL_MEMORY_DATA
NTSTATUS BlAppendBootOptionInteger(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ ULONGLONG Value)
Definition: bcdopt.c:657
BOOLEAN MmMdFindSatisfyingRegion(_In_ PBL_MEMORY_DESCRIPTOR Descriptor, _Out_ PBL_MEMORY_DESCRIPTOR NewDescriptor, _In_ ULONGLONG Pages, _In_ PBL_ADDRESS_RANGE BaseRange, _In_ PBL_ADDRESS_RANGE VirtualRange, _In_ BOOLEAN TopDown, _In_ BL_MEMORY_TYPE MemoryType, _In_ ULONG Flags, _In_ ULONG Alignment)
Definition: descriptor.c:1158
VOID MmMdInitializeList(_In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList, _In_ ULONG Type, _In_ PLIST_ENTRY ListHead)
Definition: descriptor.c:222
PBL_APPLICATION_ENTRY AppEntry
Definition: bl.h:1286
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4733
BL_GRAPHICS_CONSOLE_TYPE Type
Definition: bl.h:1155
Definition: bl.h:205
PVOID Data
Definition: bl.h:1346
NTSTATUS EfiConOutSetCursorPosition(_In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface, _In_ ULONG Column, _In_ ULONG Row)
Definition: firmware.c:1130
struct _BL_BUFFER_DESCRIPTOR BL_BUFFER_DESCRIPTOR
NTSTATUS Status
Definition: bl.h:818
Definition: bl.h:233
ULONG MmDescriptorCallTreeCount
Definition: mm.c:19
base of all file and directory entries
Definition: entries.h:82
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesRead
Definition: fltkernel.h:1255
struct _BL_TEXT_CONSOLE BL_TEXT_CONSOLE
ULONG Unknown
Definition: bl.h:1045
enum _BL_BOOT_ERROR_STATUS BL_BOOT_ERROR_STATUS
PBL_DEVICE_SET_INFORMATION SetInformation
Definition: bl.h:1255
ULONG DescriptorCount
Definition: bl.h:764
PVOID BaseAddress
Definition: bl.h:1277
ULONG FileId
Definition: bl.h:1278
Iosb Information
Definition: create.c:4377
PVOID Interface
Definition: bl.h:1244
struct _BL_BLOCK_DEVICE_INFORMATION::@134::@135::@138 Gpt
char * Text
Definition: combotst.c:136
NTSTATUS ConsoleTextLocalSetTextState(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ ULONG Flags, _In_ PBL_DISPLAY_STATE TextState)
Definition: textcons.c:56
NTSTATUS BlAppendBootOptionBoolean(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ ULONG OptionId, _In_ BOOLEAN Value)
Definition: bcdopt.c:625
NTSTATUS(* PBL_FILE_GET_INFO)(_In_ struct _BL_FILE_ENTRY *FileEntry, _Out_ struct _BL_FILE_INFORMATION *FileInfo)
Definition: bl.h:430
LONGLONG QuadPart
Definition: typedefs.h:112
struct _BL_LOCAL_DEVICE * PBL_LOCAL_DEVICE
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
Definition: fatprocs.h:716
PBL_MM_MOVE_VIRTUAL_ADDRESS_RANGE BlMmMoveVirtualAddressRange
Definition: arch.c:17
struct _BL_MEMORY_DESCRIPTOR_LIST BL_MEMORY_DESCRIPTOR_LIST
PBL_STATUS_ERROR_HANDLER BlpStatusErrorHandler
Definition: debug.c:20
ULONG CursorVisible
Definition: bl.h:1075
BL_BCD_OPTION BcdData
Definition: bl.h:861
NTSTATUS BlFileReadAtOffsetEx(_In_ ULONG FileId, _In_ ULONG Size, _In_ ULONGLONG ByteOffset, _In_ PVOID Buffer, _Out_ PULONG BytesReturned, _In_ ULONG Flags)
Definition: file.c:788
NTSTATUS(* PCONSOLE_REINITIALIZE)(_In_ struct _BL_TEXT_CONSOLE *Console)
Definition: bl.h:488
PCONSOLE_GET_TEXT_RESOLUTION GetTextResolution
Definition: bl.h:1091
struct _BL_RETURN_ARGUMENTS * PBL_RETURN_ARGUMENTS
NTSTATUS(* PBL_IO_DESTROY_ROUTINE)(VOID)
Definition: bl.h:589
struct _BL_FILE_INFORMATION BL_FILE_INFORMATION
enum _BL_COLOR * PBL_COLOR
ULONG DescriptorCount
Definition: bl.h:802
NTSTATUS ConsoleGraphicalEnable(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ BOOLEAN Enable)
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966