ReactOS  0.4.15-dev-4853-g3a72a52
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 #include <cmlib.h>
46 
47 /* DEFINES *******************************************************************/
48 
49 DEFINE_GUID(BadMemoryGuid, 0x54B8275B, 0xD431, 0x473F, 0xAC, 0xFB, 0xE5, 0x36, 0xA0, 0x84, 0x94, 0xA3);
50 
51 #define BL_APPLICATION_FLAG_CONVERTED_FROM_EFI 0x01
52 
53 #define BL_APP_ENTRY_SIGNATURE "BTAPENT"
54 
55 #define BOOT_APPLICATION_SIGNATURE_1 'TOOB'
56 #define BOOT_APPLICATION_SIGNATURE_2 ' PPA'
57 
58 #define BOOT_MEMORY_TRANSLATION_TYPE_PHYSICAL 0
59 #define BOOT_MEMORY_TRANSLATION_TYPE_VIRTUAL 1
60 
61 #define BOOT_APPLICATION_VERSION 2
62 #define BL_MEMORY_DATA_VERSION 1
63 #define BL_RETURN_ARGUMENTS_VERSION 1
64 #define BL_FIRMWARE_DESCRIPTOR_VERSION 2
65 
66 #define BL_RETURN_ARGUMENTS_NO_PAE_FLAG 0x40
67 
68 #define BL_APPLICATION_ENTRY_FLAG_NO_GUID 0x01
69 #define BL_APPLICATION_ENTRY_BCD_OPTIONS_INTERNAL 0x02
70 #define BL_APPLICATION_ENTRY_WINLOAD 0x04
71 #define BL_APPLICATION_ENTRY_STARTUP 0x08
72 #define BL_APPLICATION_ENTRY_REBOOT_ON_ERROR 0x20
73 #define BL_APPLICATION_ENTRY_NTLDR 0x40
74 #define BL_APPLICATION_ENTRY_BCD_OPTIONS_EXTERNAL 0x80
75 #define BL_APPLICATION_ENTRY_WINRESUME 0x100
76 #define BL_APPLICATION_ENTRY_SETUPLDR 0x200
77 #define BL_APPLICATION_ENTRY_BOOTSECTOR 0x400
78 #define BL_APPLICATION_ENTRY_BOOTMGR 0x1000
79 #define BL_APPLICATION_ENTRY_DISPLAY_ORDER 0x800000
80 #define BL_APPLICATION_ENTRY_FIXED_SEQUENCE 0x20000000
81 #define BL_APPLICATION_ENTRY_RECOVERY 0x40000000
82 
83 #define BL_CONTEXT_PAGING_ON 1
84 #define BL_CONTEXT_INTERRUPTS_ON 2
85 
86 #define BL_MM_FLAG_USE_FIRMWARE_FOR_MEMORY_MAP_BUFFERS 0x01
87 #define BL_MM_FLAG_REQUEST_COALESCING 0x02
88 
89 #define BL_MM_ADD_DESCRIPTOR_COALESCE_FLAG 0x01
90 #define BL_MM_ADD_DESCRIPTOR_TRUNCATE_FLAG 0x02
91 #define BL_MM_ADD_DESCRIPTOR_NEVER_COALESCE_FLAG 0x10
92 #define BL_MM_ADD_DESCRIPTOR_NEVER_TRUNCATE_FLAG 0x20
93 #define BL_MM_ADD_DESCRIPTOR_ALLOCATE_FLAG 0x1000
94 #define BL_MM_ADD_DESCRIPTOR_UPDATE_LIST_POINTER_FLAG 0x2000
95 
96 #define BL_MM_INCLUDE_MAPPED_ALLOCATED 0x01
97 #define BL_MM_INCLUDE_MAPPED_UNALLOCATED 0x02
98 #define BL_MM_INCLUDE_UNMAPPED_ALLOCATED 0x04
99 #define BL_MM_INCLUDE_UNMAPPED_UNALLOCATED 0x08
100 #define BL_MM_INCLUDE_RESERVED_ALLOCATED 0x10
101 #define BL_MM_INCLUDE_BAD_MEMORY 0x20
102 #define BL_MM_INCLUDE_FIRMWARE_MEMORY 0x40
103 #define BL_MM_INCLUDE_TRUNCATED_MEMORY 0x80
104 #define BL_MM_INCLUDE_PERSISTENT_MEMORY 0x100
105 #define BL_MM_INCLUDE_FIRMWARE_MEMORY_2 0x200
106 
107 #define BL_MM_INCLUDE_NO_FIRMWARE_MEMORY (BL_MM_INCLUDE_PERSISTENT_MEMORY | \
108  BL_MM_INCLUDE_TRUNCATED_MEMORY | \
109  BL_MM_INCLUDE_BAD_MEMORY | \
110  BL_MM_INCLUDE_RESERVED_ALLOCATED | \
111  BL_MM_INCLUDE_UNMAPPED_UNALLOCATED | \
112  BL_MM_INCLUDE_UNMAPPED_ALLOCATED | \
113  BL_MM_INCLUDE_MAPPED_UNALLOCATED | \
114  BL_MM_INCLUDE_MAPPED_ALLOCATED)
116 
117 #define BL_MM_INCLUDE_ONLY_FIRMWARE_MEMORY (BL_MM_INCLUDE_FIRMWARE_MEMORY_2 | \
118  BL_MM_INCLUDE_FIRMWARE_MEMORY)
120 
121 #define BL_MM_REQUEST_DEFAULT_TYPE 1
122 #define BL_MM_REQUEST_TOP_DOWN_TYPE 2
123 
124 #define BL_MM_REMOVE_PHYSICAL_REGION_FLAG 0x40000000
125 #define BL_MM_REMOVE_VIRTUAL_REGION_FLAG 0x80000000
126 
127 #define BL_LIBRARY_FLAG_NO_DISPLAY 0x01
128 #define BL_LIBRARY_FLAG_REINITIALIZE 0x02
129 #define BL_LIBRARY_FLAG_REINITIALIZE_ALL 0x04
130 #define BL_LIBRARY_FLAG_ZERO_HEAP_ALLOCATIONS_ON_FREE 0x10
131 #define BL_LIBRARY_FLAG_INITIALIZATION_COMPLETED 0x20
132 #define BL_LIBRARY_FLAG_NO_GRAPHICS_CONSOLE 0x800
133 
134 #define BL_DISPLAY_GRAPHICS_FORCED_VIDEO_MODE_FLAG 0x01
135 #define BL_DISPLAY_GRAPHICS_FORCED_HIGH_RES_MODE_FLAG 0x02
136 
137 #define BL_HT_VALUE_IS_INLINE 0x01
138 
139 #define BL_FS_REGISTER_AT_HEAD_FLAG 1
140 
141 #define BL_BLOCK_DEVICE_REMOVABLE_FLAG 0x01
142 #define BL_BLOCK_DEVICE_PRESENT_FLAG 0x02
143 #define BL_BLOCK_DEVICE_VIRTUAL_FLAG 0x04
144 
145 #define BL_MEMORY_CLASS_SHIFT 28
146 
147 #define BL_FILE_READ_ACCESS 0x01
148 #define BL_FILE_WRITE_ACCESS 0x02
149 #define BL_DIRECTORY_ACCESS 0x04
150 #define BL_UNKNOWN_ACCESS 0x10
151 
152 #define BL_DEVICE_READ_ACCESS 0x01
153 #define BL_DEVICE_WRITE_ACCESS 0x02
154 
155 #define BL_DEVICE_ENTRY_OPENED 0x01
156 #define BL_DEVICE_ENTRY_READ_ACCESS 0x02
157 #define BL_DEVICE_ENTRY_WRITE_ACCESS 0x04
158 
159 #define BL_FILE_ENTRY_OPENED 0x01
160 #define BL_FILE_ENTRY_READ_ACCESS 0x02
161 #define BL_FILE_ENTRY_WRITE_ACCESS 0x04
162 #define BL_FILE_ENTRY_UNKNOWN_ACCESS 0x10
163 #define BL_FILE_ENTRY_DIRECTORY 0x10000
164 
165 #define BL_ETFS_FILE_ENTRY_DIRECTORY 0x01
166 
167 #define BL_IMG_VALID_FILE 0x01
168 #define BL_IMG_MEMORY_FILE 0x02
169 #define BL_IMG_REMOTE_FILE 0x04
170 
171 #define BL_LOAD_IMG_VIRTUAL_BUFFER 0x01
172 #define BL_LOAD_IMG_EXISTING_BUFFER 0x04
173 #define BL_LOAD_IMG_UNKNOWN_BUFFER_FLAG 0x08
174 #define BL_LOAD_IMG_COMPUTE_SIGNATURE 0x10
175 #define BL_LOAD_IMG_COMPUTE_HASH 0x40000
176 
177 #define BL_LOAD_PE_IMG_VIRTUAL_BUFFER BL_LOAD_IMG_VIRTUAL_BUFFER
178 #define BL_LOAD_PE_IMG_CHECK_MACHINE 0x02
179 #define BL_LOAD_PE_IMG_EXISTING_BUFFER BL_LOAD_IMG_EXISTING_BUFFER
180 #define BL_LOAD_PE_IMG_COMPUTE_HASH 0x10
181 #define BL_LOAD_PE_IMG_CHECK_SUBSYSTEM 0x80
182 #define BL_LOAD_PE_IMG_SKIP_RELOCATIONS 0x100
183 #define BL_LOAD_PE_IMG_CHECK_FORCED_INTEGRITY 0x200
184 #define BL_LOAD_PE_IMG_IGNORE_CHECKSUM_MISMATCH 0x10000
185 #define BL_LOAD_PE_IMG_VALIDATE_ORIGINAL_FILENAME 0x400000
186 
187 #define BL_UTL_CHECKSUM_COMPLEMENT 0x10000
188 #define BL_UTL_CHECKSUM_ROTATE 0x20000
189 #define BL_UTL_CHECKSUM_NEGATE 0x40000
190 #define BL_UTL_CHECKSUM_UCHAR_BUFFER 0x01
191 #define BL_UTL_CHECKSUM_USHORT_BUFFER 0x02
192 
193 /* ENUMERATIONS **************************************************************/
194 
195 typedef enum _BL_COLOR
196 {
213 } BL_COLOR, *PBL_COLOR;
214 
215 typedef enum _BL_MENU_POLICY
216 {
220 
222 {
227 
229 {
235 
236 typedef enum _BL_ARCH_MODE
237 {
240 } BL_ARCH_MODE;
241 
242 //
243 // Boot Device Types
244 //
245 typedef enum _BL_DEVICE_TYPE
246 {
255 
256 //
257 // Local Device Types
258 //
260 {
268 
269 //
270 // Partition types
271 //
272 typedef enum _BL_PARTITION_TYPE
273 {
278 
279 //
280 // File Path Types
281 //
282 typedef enum _BL_PATH_TYPE
283 {
286 } BL_PATH_TYPE;
287 
288 //
289 // Classes of Memory
290 //
291 typedef enum _BL_MEMORY_CLASS
292 {
297 
298 //
299 // Types of Memory
300 //
301 typedef enum _BL_MEMORY_TYPE
302 {
303  //
304  // Loader Memory
305  //
306  BlLoaderMemory = 0xD0000002,
307  BlLoaderDeviceMemory = 0xD0000004,
308  BlLoaderHeap = 0xD0000005,
309  BlLoaderPageDirectory = 0xD0000006,
310  BlLoaderReferencePage = 0xD0000007,
311  BlLoaderRamDisk = 0xD0000008,
312  BlLoaderArchData = 0xD0000009,
313  BlLoaderData = 0xD000000A,
314  BlLoaderRegistry = 0xD000000B,
315  BlLoaderBlockMemory = 0xD000000C,
316  BlLoaderSelfMap = 0xD000000F,
317 
318  //
319  // Application Memory
320  //
321  BlApplicationReserved = 0xE0000001,
322  BlApplicationData = 0xE0000004,
323 
324  //
325  // System Memory
326  //
327  BlConventionalMemory = 0xF0000001,
328  BlUnusableMemory = 0xF0000002,
329  BlReservedMemory = 0xF0000003,
330  BlEfiBootMemory = 0xF0000004,
333  BlAcpiReclaimMemory = 0xF0000008,
334  BlAcpiNvsMemory = 0xF0000009,
335  BlDeviceIoMemory = 0xF000000A,
336  BlDevicePortMemory = 0xF000000B,
337  BlPalMemory = 0xF000000C,
340 
341 typedef enum _BL_MEMORY_ATTR
342 {
343  //
344  // Memory Caching Attributes
345  //
346  BlMemoryUncached = 0x00000001,
347  BlMemoryWriteCombined = 0x00000002,
348  BlMemoryWriteThrough = 0x00000004,
349  BlMemoryWriteBack = 0x00000008,
353 
354  //
355  // Memory Protection Attributes
356  //
358  BlMemoryReadProtected = 0x00000200,
362 
363  //
364  // Memory Allocation Attributes
365  //
366  BlMemoryLargePages = 0x00010000,
367  BlMemoryKernelRange = 0x00020000,
368  BlMemoryFixed = 0x00040000,
369  BlMemoryBelow1MB = 0x00080000,
372 
373  //
374  // Memory Type Attributes
375  //
376  BlMemoryRuntime = 0x01000000,
377  BlMemoryCoalesced = 0x02000000,
378  BlMemoryUpdate = 0x04000000,
379  BlMemoryNonFirmware = 0x08000000,
380  BlMemoryPersistent = 0x10000000,
381  BlMemorySpecial = 0x20000000,
382  BlMemoryFirmware = 0x80000000,
386 
387 /* CALLBACKS *****************************************************************/
388 
389 struct _BL_FILE_ENTRY;
390 struct _BL_FILE_INFORMATION;
391 typedef
392 NTSTATUS
394  _In_ struct _BL_FILE_ENTRY* Directory,
396  _In_ ULONG Flags,
397  _Out_ struct _BL_FILE_ENTRY** FileEntry
398  );
399 
400 typedef
401 NTSTATUS
403  _In_ struct _BL_FILE_ENTRY* FileEntry
404  );
405 
406 typedef
407 NTSTATUS
409  _In_ struct _BL_FILE_ENTRY* FileEntry,
410  _In_ PVOID Buffer,
411  _In_ ULONG Size,
413  );
414 
415 typedef
416 NTSTATUS
418  VOID
419  );
420 
421 typedef
422 NTSTATUS
424  VOID
425  );
426 
427 typedef
428 NTSTATUS
430  _In_ struct _BL_FILE_ENTRY* FileEntry,
432  );
433 
434 typedef
435 NTSTATUS
437  _In_ struct _BL_FILE_ENTRY* FileEntry,
439  );
440 
441 typedef
442 NTSTATUS
444  VOID
445  );
446 
447 typedef
448 NTSTATUS
450  VOID
451  );
452 
453 typedef
454 NTSTATUS
456  _In_ ULONG DeviceId,
458  _Out_ struct _BL_FILE_ENTRY** FileEntry
459  );
460 
461 typedef
462 NTSTATUS
464  VOID
465  );
466 
467 typedef
468 NTSTATUS
471  );
472 
473 struct _BL_TEXT_CONSOLE;
474 struct _BL_DISPLAY_STATE;
475 struct _BL_DISPLAY_MODE;
476 struct _BL_INPUT_CONSOLE;
477 struct _BL_REMOTE_CONSOLE;
478 struct _BL_GRAPHICS_CONSOLE;
479 typedef
480 VOID
483  );
484 
485 typedef
486 NTSTATUS
489  );
490 
491 typedef
492 NTSTATUS
494  _In_ struct _BL_TEXT_CONSOLE* Console,
495  _Out_ struct _BL_DISPLAY_STATE* TextState
496  );
497 
498 typedef
499 NTSTATUS
501  _In_ struct _BL_TEXT_CONSOLE* Console,
502  _In_ ULONG Flags,
503  _In_ struct _BL_DISPLAY_STATE* TextState
504  );
505 
506 typedef
507 NTSTATUS
509  _In_ struct _BL_TEXT_CONSOLE* Console,
511  );
512 
513 typedef
514 NTSTATUS
516  _In_ struct _BL_TEXT_CONSOLE* Console,
517  _In_ ULONG NewTextResolution,
518  _Out_ PULONG OldTextResolution
519  );
520 
521 typedef
522 NTSTATUS
524  _In_ struct _BL_TEXT_CONSOLE* Console,
525  _In_ BOOLEAN LineOnly
526  );
527 
528 typedef
529 BOOLEAN
532  );
533 
534 typedef
535 NTSTATUS
539  );
540 
541 typedef
542 NTSTATUS
546  );
547 
548 typedef
549 NTSTATUS
553 );
554 
555 typedef
556 NTSTATUS
558  _In_ struct _BL_TEXT_CONSOLE* Console,
559  _In_ PCHAR Text,
560  _In_ ULONG Attribute
561  );
562 
563 typedef
564 BOOLEAN
566  _In_ PVOID Entry,
569  _In_ PVOID Argument3,
571  );
572 
573 typedef
574 NTSTATUS
576  _In_ PVOID Entry,
577  _In_ ULONG EntryIndex
578  );
579 
580 typedef
581 NTSTATUS
584  );
585 
586 typedef
587 NTSTATUS
589  VOID
590  );
591 
592 struct _BL_HASH_ENTRY;
593 typedef
594 BOOLEAN
596  _In_ struct _BL_HASH_ENTRY* Entry1,
597  _In_ struct _BL_HASH_ENTRY* Entry2
598  );
599 
600 typedef
601 ULONG
603  _In_ struct _BL_HASH_ENTRY* Entry,
605  );
606 
607 struct _BL_DEVICE_ENTRY;
608 struct _BL_DEVICE_DESCRIPTOR;
610 
611 typedef
612 NTSTATUS
614  VOID
615  );
616 
617 typedef
618 NTSTATUS
621  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry
622  );
623 
624 typedef
625 NTSTATUS
627  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry
628  );
629 
630 typedef
631 NTSTATUS
633  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry,
634  _In_ PVOID Buffer,
635  _In_ ULONG Size,
637  );
638 
639 typedef
640 NTSTATUS
642  VOID
643  );
644 
645 typedef
646 NTSTATUS
648  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry,
649  _Out_ struct _BL_DEVICE_INFORMATION* DeviceInformation
650  );
651 
652 typedef
653 NTSTATUS
655  _In_ struct _BL_DEVICE_ENTRY* DeviceEntry,
656  _In_ struct _BL_DEVICE_INFORMATION* DeviceInformation
657  );
658 
659 typedef
660 NTSTATUS
662  VOID
663  );
664 
665 typedef
666 NTSTATUS
668  VOID
669  );
670 
671 typedef
672 NTSTATUS
674  VOID
675  );
676 
677 typedef VOID
679  VOID
680  );
681 
682 typedef VOID
684  VOID
685  );
686 
687 typedef NTSTATUS
692  );
693 
694 typedef NTSTATUS
698  );
699 
700 typedef VOID
702  VOID
703  );
704 
705 typedef VOID
708  );
709 
710 typedef VOID
711 (*PBL_MM_FLUSH_TLB) (
712  VOID
713  );
714 
715 typedef NTSTATUS
718  _In_ ULONG Size
719  );
720 
721 typedef NTSTATUS
725  _In_ ULONG Size,
726  _In_ ULONG CacheAttributes
727  );
728 
729 typedef NTSTATUS
733  _In_ ULONG Size,
734  _In_ ULONG CacheAttributes
735  );
736 
737 typedef BOOLEAN
741  _Out_opt_ PULONG CacheAttributes
742  );
743 
744 typedef NTSTATUS
747  _In_ ULONG Parameter1,
748  _In_ ULONG_PTR Parameter2,
749  _In_ ULONG_PTR Parameter3,
750  _In_ ULONG_PTR Parameter4
751  );
752 
753 /* DATA STRUCTURES ***********************************************************/
754 
756 {
766 
767 /* This should eventually go into a more public header */
769 {
770  /* This header tells the library what image we're dealing with */
776 
777  /* Where is the image located */
780 
781  /* Offset to BL_MEMORY_DATA */
783 
784  /* Offset to BL_APPLICATION_ENTRY */
786 
787  /* Offset to BL_DEVICE_DESCRPIPTOR */
789 
790  /* Offset to BL_FIRMWARE_PARAMETERS */
792 
793  /* Offset to BL_RETURN_ARGUMENTS */
796 
797 typedef struct _BL_MEMORY_DATA
798 {
805 
807 {
813 
814 typedef struct _BL_RETURN_ARGUMENTS
815 {
822 
823 typedef struct _BL_MEMORY_DESCRIPTOR
824 {
826  union
827  {
828  struct
829  {
832  };
833  struct
834  {
837  };
838  };
843 
844 typedef struct _BL_BCD_OPTION
845 {
853 
854 typedef struct _BL_APPLICATION_ENTRY
855 {
862 
864 {
869 
870 typedef struct _BL_MENU_STATUS
871 {
872  union
873  {
874  struct
875  {
880  ULONG Exit : 1;
882  };
884  };
888 
890 {
891  Reboot = 1,
892  Recover = 2,
895  NextOs = 5,
896  TryAgain = 6,
900 
901 typedef struct _BL_HARDDISK_DEVICE
902 {
904  union
905  {
906  struct
907  {
909  } Mbr;
910 
911  struct
912  {
914  } Gpt;
915 
916  struct
917  {
919  } Raw;
920  };
922 
923 typedef struct _BL_LOCAL_DEVICE
924 {
926  union
927  {
928  struct
929  {
931  } FloppyDisk;
932 
934 
936 
937  struct
938  {
942  } RamDisk;
943 
944  ULONG File; // unknown for now
945  };
947 
948 typedef struct _BL_DEVICE_DESCRIPTOR
949 {
954  union
955  {
957 
958  struct
959  {
960  ULONG Unknown;
961  } Remote;
962 
963  struct
964  {
965  union
966  {
968  } Mbr;
969 
970  union
971  {
973  } Gpt;
974 
976  } Partition;
977  };
979 
981 {
987 
989 {
996 
997 typedef struct _BL_ARCH_CONTEXT
998 {
1003 
1005 {
1011 
1012 typedef struct _BL_ADDRESS_RANGE
1013 {
1017 
1018 typedef struct _BL_FILE_INFORMATION
1019 {
1025 
1026 typedef struct _BL_FILE_CALLBACKS
1027 {
1036 
1037 typedef struct _BL_FILE_ENTRY
1038 {
1050 
1052 {
1059 
1061 {
1067 
1068 typedef struct _BL_DISPLAY_STATE
1069 {
1076 
1077 typedef struct _BL_DISPLAY_MODE
1078 {
1083 
1085 {
1095 
1097 {
1107 
1108 typedef struct _BL_TEXT_CONSOLE
1109 {
1118 
1120 {
1123  //PCONSOLE_IS_KEY_PENDING IsKeyPending;
1124  //PCONSOLE_READ_INPUT ReadInput;
1125  //PCONSOLE_ERASE_BUFFER EraseBuffer;
1126  //PCONSOLE_FILL_BUFFER FillBuffer;
1128 
1129 typedef struct _BL_INPUT_CONSOLE
1130 {
1137 
1139 {
1143 
1144 typedef struct _BL_GRAPHICS_CONSOLE
1145 {
1162 
1163 typedef struct _BL_REMOTE_CONSOLE
1164 {
1167 
1168 typedef struct _BL_HASH_TABLE
1169 {
1175 
1176 typedef struct _BL_HASH_ENTRY
1177 {
1182 
1183 typedef struct _BL_HASH_VALUE
1184 {
1188 
1189 typedef struct _BL_HASH_NODE
1190 {
1195 
1197 {
1207  struct
1208  {
1209  union
1210  {
1211  struct
1212  {
1214  } Mbr;
1215  struct
1216  {
1218  } Gpt;
1219  };
1220  } Disk;
1222 
1224 {
1226  union
1227  {
1229  };
1231 
1232 typedef struct _BL_BLOCK_DEVICE
1233 {
1239 
1240 typedef struct _BL_PROTOCOL_HANDLE
1241 {
1245 
1246 typedef struct _BL_DEVICE_CALLBACKS
1247 {
1259 
1260 typedef struct _BL_DEVICE_ENTRY
1261 {
1270 
1271 typedef struct _BL_IMG_FILE
1272 {
1274  union
1275  {
1278  };
1282 
1284 {
1289 
1291 {
1296 
1298 {
1304 
1305 #pragma pack(push)
1306 #pragma pack(1)
1307 typedef struct _BMP_HEADER
1308 {
1314 
1315 typedef struct _DIB_HEADER
1316 {
1329 
1330 typedef struct _BITMAP
1331 {
1334 } BITMAP, *PBITMAP;
1335 #pragma pack(pop)
1336 
1337 typedef struct _COORD
1338 {
1341 } COORD, *PCOORD;
1342 
1343 typedef struct _BL_PD_DATA_BLOB
1344 {
1349 
1350 /* INLINE ROUTINES ***********************************************************/
1351 
1353 VOID
1355  _Out_ PBL_LIBRARY_PARAMETERS LibraryParameters
1356  )
1357 {
1358  BL_LIBRARY_PARAMETERS DefaultParameters =
1359  {
1360  0x20,
1361  BlVirtual,
1362  1024,
1363  2 * 1024 * 1024,
1364  0,
1365  NULL,
1366  0,
1367  NULL
1368  };
1369 
1370  /* Copy the defaults */
1371  RtlCopyMemory(LibraryParameters, &DefaultParameters, sizeof(*LibraryParameters));
1372 }
1373 
1375 VOID
1378  )
1379 {
1380  /* Initialize the list */
1381  InitializeListHead(&List->ListHead);
1382  List->First = &List->ListHead;
1383  List->This = NULL;
1384  List->Type = 0;
1385 }
1386 
1388 PVOID
1391 {
1393 }
1394 
1395 /* INITIALIZATION ROUTINES ***************************************************/
1396 
1397 NTSTATUS
1399  _In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootAppParameters,
1400  _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
1401  );
1402 
1403 NTSTATUS
1405  _In_ ULONG Phase
1406  );
1407 
1408 NTSTATUS
1410  _In_ ULONG Phase,
1411  _In_ PBL_FIRMWARE_DESCRIPTOR FirmwareParameters
1412  );
1413 
1414 NTSTATUS
1416  _In_ PBL_MEMORY_DATA MemoryData,
1417  _In_ BL_TRANSLATION_TYPE TranslationType,
1418  _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
1419  );
1420 
1421 NTSTATUS
1423  VOID
1424  );
1425 
1426 NTSTATUS
1428  _In_ PBL_MEMORY_DATA MemoryData,
1429  _In_ ULONG MinimumPages
1430  );
1431 
1432 NTSTATUS
1434  _In_ ULONG Phase,
1435  _In_ PBL_MEMORY_DATA MemoryData,
1436  _In_ BL_TRANSLATION_TYPE TranslationType,
1437  _In_ BL_TRANSLATION_TYPE LibraryTranslationType
1438  );
1439 
1440 NTSTATUS
1443  _In_ ULONG HeapAttributes
1444  );
1445 
1446 VOID
1448  _In_ ULONG Phase,
1449  _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
1450  );
1451 
1452 NTSTATUS
1454  VOID
1455  );
1456 
1457 NTSTATUS
1459  VOID
1460  );
1461 
1462 NTSTATUS
1464  VOID
1465  );
1466 
1467 NTSTATUS
1469  _In_ ULONG Flags
1470  );
1471 
1472 NTSTATUS
1474  VOID
1475  );
1476 
1477 VOID
1479  VOID
1480  );
1481 
1482 NTSTATUS
1483 BcInitialize (
1484  VOID
1485  );
1486 
1487 /* FIRMWARE ROUTINES *********************************************************/
1488 
1489 VOID
1490 EfiPrintf (
1491  _In_ PWCHAR Format,
1492  ...
1493  );
1494 
1495 NTSTATUS
1498  );
1499 
1500 NTSTATUS
1503  );
1504 
1505 NTSTATUS
1507  _In_ ULONG Type,
1508  _In_ ULONG Pages,
1510  );
1511 
1512 NTSTATUS
1513 EfiStall (
1514  _In_ ULONG StallTime
1515  );
1516 
1517 NTSTATUS
1519  VOID
1520  );
1521 
1522 NTSTATUS
1523 EfiConInReset (
1524  VOID
1525  );
1526 
1527 NTSTATUS
1529  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1531  );
1532 
1533 NTSTATUS
1535  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1536  _In_ ULONG Mode,
1537  _In_ UINTN* Columns,
1538  _In_ UINTN* Rows
1539  );
1540 
1541 NTSTATUS
1543  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1544  _In_ ULONG Mode
1545  );
1546 
1547 VOID
1549  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1551  );
1552 
1553 NTSTATUS
1555  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1556  _In_ ULONG Attribute
1557  );
1558 
1559 NTSTATUS
1561  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1562  _In_ ULONG Column,
1563  _In_ ULONG Row
1564  );
1565 
1566 NTSTATUS
1568  _In_ SIMPLE_TEXT_OUTPUT_INTERFACE *TextInterface,
1569  _In_ BOOLEAN Visible
1570  );
1571 
1572 NTSTATUS
1574  _In_ EFI_LOCATE_SEARCH_TYPE SearchType,
1576  _Inout_ PULONG HandleCount,
1578  );
1579 
1580 NTSTATUS
1585  );
1586 
1587 NTSTATUS
1591  );
1592 
1593 NTSTATUS
1595  _In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
1596  _Out_ UINTN* Mode,
1598  );
1599 
1600 NTSTATUS
1601 EfiGopSetMode (
1602  _In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
1603  _In_ ULONG Mode
1604  );
1605 
1606 VOID
1608  _In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
1611  );
1612 
1613 VOID
1615  _In_ EFI_RESET_TYPE ResetType
1616  );
1617 
1620  _In_ EFI_DEVICE_PATH *DevicePath
1621  );
1622 
1625  _In_ EFI_DEVICE_PATH *DevicePath1,
1626  _In_ EFI_DEVICE_PATH *DevicePath2
1627  );
1628 
1629 NTSTATUS
1630 EfipGetRsdt (
1631  _Out_ PPHYSICAL_ADDRESS FoundRsdt
1632  );
1633 
1634 NTSTATUS
1635 EfiFreePages (
1636  _In_ ULONG Pages,
1638  );
1639 
1640 /* PLATFORM TIMER ROUTINES ***************************************************/
1641 
1642 NTSTATUS
1644  VOID
1645  );
1646 
1647 ULONGLONG
1650  );
1651 
1652 ULONGLONG
1654  VOID
1655  );
1656 
1657 /* RESOURCE LOCALE INTERNATIONALIZATION ROUTINES *****************************/
1658 
1659 NTSTATUS
1661  _In_ PWCHAR Locale
1662  );
1663 
1664 /* FONT ROUTINES *************************************************************/
1665 
1666 VOID
1668  _In_ PBL_DEFERRED_FONT_FILE DeferredFontFile
1669  );
1670 
1671 NTSTATUS
1674  _In_ PWCHAR FontPath
1675  );
1676 
1677 NTSTATUS
1679  VOID
1680  );
1681 
1682 NTSTATUS
1683 BfClearScreen (
1685  );
1686 
1687 NTSTATUS
1690  );
1691 
1692 /* FILESYSTEM ROUTINES *******************************************************/
1693 
1694 NTSTATUS
1695 FatInitialize (
1696  VOID
1697  );
1698 
1699 NTSTATUS
1700 FatMount (
1701  _In_ ULONG DeviceId,
1702  _In_ ULONG Unknown,
1703  _Out_ PBL_FILE_ENTRY* FileEntry
1704  );
1705 
1706 NTSTATUS
1708  VOID
1709  );
1710 
1711 NTSTATUS
1712 EtfsMount (
1713  _In_ ULONG DeviceId,
1714  _In_ ULONG Unknown,
1715  _Out_ PBL_FILE_ENTRY* FileEntry
1716  );
1717 
1718 /* DEBUG ROUTINES ************************************************************/
1719 
1720 BOOLEAN
1722  VOID
1723  );
1724 
1725 NTSTATUS
1730  );
1731 
1732 VOID
1733 BlStatusPrint (
1734  _In_ PCWCH Format,
1735  ...
1736  );
1737 
1738 VOID
1739 BlStatusError (
1741  _In_ ULONG Parameter1,
1742  _In_ ULONG_PTR Parameter2,
1743  _In_ ULONG_PTR Parameter3,
1744  _In_ ULONG_PTR Parameter4
1745  );
1746 
1747 /* UTILITY ROUTINES **********************************************************/
1748 
1749 VOID
1750 BlArchCpuId (
1752  _In_ ULONG SubFunction,
1754  );
1755 
1758  VOID
1759  );
1760 
1761 BOOLEAN
1764  );
1765 
1766 VOID
1768  _In_ ULONG Percentage,
1769  _Out_opt_ PBOOLEAN Completed
1770  );
1771 
1772 NTSTATUS
1774  _Out_ PVOID* TableAddress,
1776  );
1777 
1778 NTSTATUS
1780  VOID
1781  );
1782 
1783 NTSTATUS
1785  VOID
1786  );
1787 
1788 ULONG
1789 BlUtlCheckSum (
1790  _In_ ULONG PartialSum,
1791  _In_ PUCHAR Buffer,
1792  _In_ ULONG Length,
1793  _In_ ULONG Flags
1794  );
1795 
1796 NTSTATUS
1798  _Out_ PVOID* ImageBase,
1799  _Out_ PULONG ImageSize
1800  );
1801 
1802 VOID
1805  );
1806 
1807 NTSTATUS
1808 BlPdQueryData (
1809  _In_ const GUID* DataGuid,
1810  _In_ PVOID Unknown,
1811  _Inout_ PBL_PD_DATA_BLOB DataBlob
1812  );
1813 
1814 /* FIRMWARE UTILITY ROUTINES *************************************************/
1815 
1816 EFI_STATUS
1819  );
1820 
1821 NTSTATUS
1823  _In_ EFI_STATUS EfiStatus
1824  );
1825 
1826 VOID
1827 BlFwReboot (
1828  VOID
1829  );
1830 
1831 NTSTATUS
1832 MmFwFreePages (
1833  _In_ ULONG BasePage,
1834  _In_ ULONG PageCount
1835  );
1836 
1837 PGUID
1839  VOID
1840  );
1841 
1842 NTSTATUS
1844  VOID
1845  );
1846 
1847 NTSTATUS
1849  _Out_ PBOOLEAN SecureBootEnabled
1850  );
1851 
1852 NTSTATUS
1854  VOID
1855  );
1856 
1857 /* RESOURCE ROUTINES *********************************************************/
1858 
1859 PWCHAR
1861  _In_ ULONG MsgId
1862  );
1863 
1864 PWCHAR
1866  VOID
1867  );
1868 
1869 NTSTATUS
1871  VOID
1872  );
1873 
1874 /* TABLE ROUTINES ************************************************************/
1875 
1876 NTSTATUS
1877 BlTblMap (
1878  _In_ PVOID *Table,
1879  _In_ ULONG Count,
1880  _In_ PBL_TBL_MAP_ROUTINE MapCallback
1881  );
1882 
1883 PVOID
1885  _In_ PVOID *Table,
1886  _In_ ULONG Count,
1887  _Out_ PULONG EntryIndex,
1891  _In_ PVOID Argument3,
1893  );
1894 
1895 NTSTATUS
1896 BlTblSetEntry (
1897  _Inout_ PVOID** Table,
1899  _In_ PVOID Entry,
1900  _Out_ PULONG EntryIndex,
1902  );
1903 
1904 NTSTATUS
1906  _In_ PVOID Entry
1907  );
1908 
1909 /* HASH TABLE ROUTINES *******************************************************/
1910 
1911 NTSTATUS
1912 BlHtStore (
1913  _In_ ULONG TableId,
1915  _In_ PVOID Data,
1917  );
1918 
1919 NTSTATUS
1920 BlHtDelete (
1921  _In_ ULONG TableId,
1923  );
1924 
1925 NTSTATUS
1926 BlHtLookup (
1927  _In_ ULONG TableId,
1930  );
1931 
1932 NTSTATUS
1933 BlHtCreate (
1934  _In_ ULONG Size,
1935  _In_ PBL_HASH_TABLE_HASH_FUNCTION HashFunction,
1936  _In_ PBL_HASH_TABLE_COMPARE_FUNCTION CompareFunction,
1937  _Out_ PULONG Id
1938  );
1939 
1940 /* BCD OPTION ROUTINES *******************************************************/
1941 
1945  _In_ ULONG Type
1946  );
1947 
1948 ULONG
1950  _In_ PBL_BCD_OPTION BcdOption
1951  );
1952 
1953 ULONG
1955  _In_ PBL_BCD_OPTION BcdOption
1956  );
1957 
1958 NTSTATUS
1961  _In_ ULONG Type,
1962  _Out_ PWCHAR* Value
1963  );
1964 
1965 NTSTATUS
1968  _In_ ULONG Type,
1970  );
1971 
1972 NTSTATUS
1975  _In_ ULONG Type,
1977  );
1978 
1979 NTSTATUS
1982  _In_ ULONG Type,
1985  _In_ BOOLEAN NoCopy
1986  );
1987 
1988 NTSTATUS
1991  _In_ ULONG Type,
1994  );
1995 
1996 NTSTATUS
1999  _In_ ULONG Type,
2000  _Out_ PGUID Value
2001  );
2002 
2003 NTSTATUS
2006  _In_ ULONG Type,
2007  _Out_ PGUID *Value,
2008  _In_ PULONG Count
2009  );
2010 
2011 NTSTATUS
2014  _Out_ PBL_BCD_OPTION *CopiedOptions
2015  );
2016 
2017 NTSTATUS
2020  _In_ ULONG OptionId,
2022  );
2023 
2024 NTSTATUS
2027  _In_ ULONG OptionId,
2029  );
2030 
2031 NTSTATUS
2034  _In_ ULONG OptionId,
2035  _In_ PWCHAR OptionString
2036  );
2037 
2038 NTSTATUS
2042  );
2043 
2044 VOID
2047  _In_ ULONG Type
2048  );
2049 
2050 NTSTATUS
2053  _In_ PBL_BCD_OPTION NewOptions
2054  );
2055 
2056 /* BOOT REGISTRY ROUTINES ****************************************************/
2057 
2058 VOID
2059 BiCloseKey (
2061  );
2062 
2063 NTSTATUS
2064 BiOpenKey(
2065  _In_ HANDLE ParentHandle,
2068  );
2069 
2070 NTSTATUS
2071 BiLoadHive (
2073  _Out_ PHANDLE HiveHandle
2074  );
2075 
2076 NTSTATUS
2080  _In_ ULONG Type,
2081  _Out_ PVOID* Buffer,
2083  );
2084 
2085 NTSTATUS
2088  _Out_ PWCHAR** SubKeyList,
2089  _Out_ PULONG SubKeyCount
2090  );
2091 
2092 NTSTATUS
2093 BiDeleteKey (
2095  );
2096 
2097 VOID
2100  );
2101 
2102 /* CONTEXT ROUTINES **********************************************************/
2103 
2104 VOID
2106  _In_ BL_ARCH_MODE NewMode
2107  );
2108 
2109 VOID
2111  VOID
2112  );
2113 
2114 VOID
2116  VOID
2117  );
2118 
2119 /* MEMORY DESCRIPTOR ROUTINES ************************************************/
2120 
2121 VOID
2123  _In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList,
2124  _In_opt_ ULONG MaxCount
2125 );
2126 
2127 VOID
2129  _In_ PBL_MEMORY_DESCRIPTOR_LIST DescriptorList,
2130  _In_ ULONG Type,
2131  _In_ PLIST_ENTRY ListHead
2132  );
2133 
2136  _In_ ULONG WhichList,
2137  _In_ ULONG Flags,
2139  );
2140 
2144  _In_ ULONG Flags,
2146  );
2147 
2148 NTSTATUS
2149 MmMdCopyList (
2150  _In_ PBL_MEMORY_DESCRIPTOR_LIST DestinationList,
2152  _In_opt_ PBL_MEMORY_DESCRIPTOR ListDescriptor,
2153  _Out_ PULONG ActualCount,
2154  _In_ ULONG Count,
2155  _In_ ULONG Flags
2156  );
2157 
2158 ULONG
2159 MmMdCountList (
2161  );
2162 
2163 VOID
2164 MmMdFreeList(
2166  );
2167 
2170  _In_ ULONG Flags,
2172  _In_ ULONGLONG BasePage,
2173  _In_ ULONGLONG VirtualPage,
2174  _In_ ULONGLONG PageCount
2175  );
2176 
2177 VOID
2179  VOID
2180  );
2181 
2182 NTSTATUS
2186  _In_ ULONG Flags
2187  );
2188 
2189 NTSTATUS
2193  _In_ ULONGLONG BasePage
2194  );
2195 
2196 VOID
2200  );
2201 
2202 BOOLEAN
2206  _In_ ULONGLONG Pages,
2207  _In_ PBL_ADDRESS_RANGE BaseRange,
2208  _In_ PBL_ADDRESS_RANGE VirtualRange,
2209  _In_ BOOLEAN TopDown,
2210  _In_ BL_MEMORY_TYPE MemoryType,
2211  _In_ ULONG Flags,
2213  );
2214 
2215 NTSTATUS
2218  __in ULONG Flags,
2219  __in ULONGLONG BasePage,
2220  __in ULONGLONG PageCount,
2222  );
2223 
2224 NTSTATUS
2227  );
2228 
2229 /* PAGE ALLOCATOR ROUTINES ***************************************************/
2230 
2231 NTSTATUS
2233  _In_ ULONGLONG BasePage
2234  );
2235 
2236 NTSTATUS
2239  _In_ BL_MEMORY_TYPE MemoryType,
2240  _In_ ULONGLONG PageCount,
2243  );
2244 
2245 NTSTATUS
2248  _In_ BL_MEMORY_TYPE MemoryType,
2249  _In_ ULONGLONG Pages,
2254  _In_ ULONG RangeType
2255  );
2256 
2257 NTSTATUS
2260  );
2261 
2262 NTSTATUS
2266  _In_ ULONG PageCount
2267  );
2268 
2269 NTSTATUS
2272  );
2273 
2274 NTSTATUS
2276  _In_ PVOID Address,
2277  _In_ ULONG WhichList
2278  );
2279 
2280 NTSTATUS
2283  _In_ BL_MEMORY_TYPE MemoryType,
2284  _In_ ULONGLONG Pages,
2288  _In_ ULONG Type
2289  );
2290 
2291 NTSTATUS
2294  _In_ ULONG Flags
2295  );
2296 
2297 NTSTATUS
2299  VOID
2300  );
2301 
2302 NTSTATUS
2304  VOID
2305  );
2306 
2307 NTSTATUS
2310  _In_ PBL_BUFFER_DESCRIPTOR MemoryParameters,
2311  _In_ ULONG WhichTypes,
2312  _In_ ULONG Flags
2313  );
2314 
2315 /* VIRTUAL MEMORY ROUTINES ***************************************************/
2316 
2317 NTSTATUS
2319  _Out_ PVOID* MappingAddress,
2320  _In_ PVOID PreferredAddress,
2323  _In_ ULONG Flags,
2325  );
2326 
2327 NTSTATUS
2332  _In_ ULONG CacheAttributes
2333  );
2334 
2335 NTSTATUS
2339  );
2340 
2341 NTSTATUS
2347  );
2348 
2349 NTSTATUS
2353  );
2354 
2355 BOOLEAN
2359  );
2360 
2361 BOOLEAN
2365  _Out_opt_ PULONG CachingFlags
2366  );
2367 
2368 /* BLOCK ALLOCATOR ROUTINES **************************************************/
2369 
2370 NTSTATUS
2372  VOID
2373  );
2374 
2375 /* HEAP ALLOCATOR ROUTINES ***************************************************/
2376 
2377 PVOID
2379  _In_ SIZE_T Size
2380  );
2381 
2382 NTSTATUS
2383 BlMmFreeHeap (
2384  _In_ PVOID Buffer
2385  );
2386 
2387 /* DISPLAY ROUTINES **********************************************************/
2388 
2389 VOID
2391  _Out_ PULONG TextWidth,
2392  _Out_ PULONG TextHeight
2393  );
2394 
2395 NTSTATUS
2397  VOID
2398  );
2399 
2400 NTSTATUS
2402  _Out_ PULONG HRes,
2403  _Out_ PULONG Vres
2404  );
2405 
2406 VOID
2408  VOID
2409  );
2410 
2411 PBITMAP
2415  );
2416 
2417 BOOLEAN
2419  VOID
2420  );
2421 
2422 NTSTATUS
2424  VOID
2425  );
2426 
2427 NTSTATUS
2429  _In_ ULONG Type
2430  );
2431 
2432 /* I/O ROUTINES **************************************************************/
2433 
2434 NTSTATUS
2436  _In_ PBL_IO_DESTROY_ROUTINE DestroyRoutine
2437  );
2438 
2439 NTSTATUS
2440 BlDeviceClose (
2441  _In_ ULONG DeviceId
2442  );
2443 
2444 BOOLEAN
2446  _In_ PBL_DEVICE_DESCRIPTOR InputDevice,
2447  _Outptr_ PBL_DEVICE_DESCRIPTOR* VirtualDevice
2448  );
2449 
2450 NTSTATUS
2451 BlpDeviceOpen (
2453  _In_ ULONG Flags,
2454  _In_ ULONG Unknown,
2455  _Out_ PULONG DeviceId
2456  );
2457 
2458 NTSTATUS
2460  _In_ ULONG DeviceId,
2461  _Out_ PBL_DEVICE_INFORMATION DeviceInformation
2462  );
2463 
2464 NTSTATUS
2466  _In_ ULONG DeviceId,
2467  _In_ PBL_DEVICE_INFORMATION DeviceInformation
2468  );
2469 
2470 NTSTATUS
2472  _In_ ULONG DeviceId,
2473  _In_ ULONG Size,
2475  _In_ PVOID Buffer,
2477  );
2478 
2479 /* IMAGE ROUTINES ************************************************************/
2480 
2481 NTSTATUS
2483  _In_ ULONG DeviceId,
2484  _In_ BL_MEMORY_TYPE MemoryType,
2487  _Inout_ PULONG MappedSize,
2489  _In_ BOOLEAN ShowProgress,
2490  _Out_opt_ PUCHAR* HashBuffer,
2491  _Out_opt_ PULONG HashSize
2492  );
2493 
2496  _In_ PVOID ImageBase,
2497  _In_ ULONG ImageSize
2498  );
2499 
2500 NTSTATUS
2503  _Out_ PULONG AppHandle
2504  );
2505 
2506 NTSTATUS
2508  _In_ ULONG AppHandle,
2509  _Inout_ PBL_RETURN_ARGUMENTS ReturnArguments
2510  );
2511 
2512 NTSTATUS
2514  _In_ ULONG AppHandle
2515  );
2516 
2517 VOID
2519  _In_ PBL_LOADED_APPLICATION_ENTRY ApplicationEntry,
2520  _Out_ PBOOLEAN IntegrityChecksDisabled,
2521  _Out_ PBOOLEAN TestSigning
2522  );
2523 
2524 /* FILE I/O ROUTINES *********************************************************/
2525 
2526 NTSTATUS
2527 BlFileClose (
2528  _In_ ULONG FileId
2529  );
2530 
2531 NTSTATUS
2533  _In_ ULONG FileId,
2534  _In_ ULONG Size,
2536  _In_ PVOID Buffer,
2538  _In_ ULONG Flags
2539  );
2540 
2541 NTSTATUS
2543  _In_ ULONG FileId,
2545  );
2546 
2547 NTSTATUS
2548 BlFileOpen (
2549  _In_ ULONG DeviceId,
2551  _In_ ULONG Flags,
2552  _Out_ PULONG FileId
2553  );
2554 
2555 /* BLOCK I/O ROUTINES *******************************************************/
2556 
2557 NTSTATUS
2561  );
2562 
2563 /* INPUT CONSOLE ROUTINES ****************************************************/
2564 
2565 VOID
2568  );
2569 
2570 NTSTATUS
2573  );
2574 
2575 NTSTATUS
2577  VOID
2578  );
2579 
2580 /* TEXT CONSOLE ROUTINES *****************************************************/
2581 
2582 VOID
2585  );
2586 
2587 NTSTATUS
2590  _In_ BOOLEAN LineOnly
2591  );
2592 
2593 NTSTATUS
2596  _In_ ULONG Color
2597  );
2598 
2599 NTSTATUS
2602  );
2603 
2604 NTSTATUS
2607  _In_ ULONG Mask,
2608  _In_ PBL_DISPLAY_STATE TextState
2609  );
2610 
2611 BOOLEAN
2614  );
2615 
2616 NTSTATUS
2620  );
2621 
2622 NTSTATUS
2626  );
2627 
2628 NTSTATUS
2632  );
2633 
2634 VOID
2636  _In_ struct _BL_TEXT_CONSOLE* Console
2637  );
2638 
2639 NTSTATUS
2641  _In_ struct _BL_TEXT_CONSOLE* Console
2642  );
2643 
2644 NTSTATUS
2646  _In_ struct _BL_TEXT_CONSOLE* Console,
2647  _Out_ PBL_DISPLAY_STATE TextState
2648  );
2649 
2650 NTSTATUS
2652  _In_ struct _BL_TEXT_CONSOLE* Console,
2653  _In_ ULONG Flags,
2654  _In_ PBL_DISPLAY_STATE TextState
2655  );
2656 
2657 NTSTATUS
2659  _In_ struct _BL_TEXT_CONSOLE* Console,
2661  );
2662 
2663 NTSTATUS
2665  _In_ struct _BL_TEXT_CONSOLE* Console,
2666  _In_ ULONG NewTextResolution,
2667  _Out_ PULONG OldTextResolution
2668  );
2669 
2670 NTSTATUS
2672  _In_ struct _BL_TEXT_CONSOLE* Console,
2673  _In_ BOOLEAN LineOnly
2674  );
2675 
2676 NTSTATUS
2678  _In_ struct _BL_TEXT_CONSOLE* Console,
2679  _In_ PCHAR Text,
2680  _In_ ULONG Attribute
2681  );
2682 
2683 NTSTATUS
2685  _In_ PBL_TEXT_CONSOLE TextConsole,
2686  _In_ BOOLEAN Activate
2687  );
2688 
2689 BOOLEAN
2693  _In_ ULONG MaxIndex
2694  );
2695 
2696 NTSTATUS
2699  _In_ BOOLEAN LineOnly
2700  );
2701 
2702 VOID
2704  _In_ PBL_TEXT_CONSOLE TextConsole
2705  );
2706 
2707 NTSTATUS
2709  _In_ PBL_TEXT_CONSOLE TextConsole
2710  );
2711 
2712 NTSTATUS
2714  _In_ PBL_TEXT_CONSOLE TextConsole,
2715  _In_ UCHAR Mask,
2717  );
2718 
2719 NTSTATUS
2721  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2722  );
2723 
2724 NTSTATUS
2726  _In_ PBL_TEXT_CONSOLE* TextConsole
2727  );
2728 
2729 NTSTATUS
2731  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole,
2733  );
2734 
2735 VOID
2737  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2738  );
2739 
2740 VOID
2742  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2743  );
2744 
2745 NTSTATUS
2748  _In_ ULONG Color
2749  );
2750 
2751 NTSTATUS
2753  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2754  );
2755 
2756 NTSTATUS
2758  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2759  );
2760 
2761 VOID
2763  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2764  );
2765 
2766 VOID
2768  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2769  );
2770 
2771 NTSTATUS
2773  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2774  );
2775 
2776 NTSTATUS
2778  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole
2779  );
2780 
2781 NTSTATUS
2783  _In_ PBL_GRAPHICS_CONSOLE GraphicsConsole,
2785  _In_ ULONG DisplayModeCount
2786  );
2787 
2788 NTSTATUS
2790  VOID
2791  );
2792 
2793 NTSTATUS
2796  _In_opt_ PULONG ValueToFill
2797  );
2798 
2799 VOID
2802  _In_ ULONG Width,
2803  _In_ PUCHAR FillColor,
2804  _In_ ULONG Height,
2805  _In_ ULONG ScanlineWidth,
2806  _In_ ULONG PixelDepth
2807  );
2808 
2809 NTSTATUS
2812  _Out_ PUCHAR Pixel
2813  );
2814 
2816 extern ULONG BlpApplicationFlags;
2839 extern WCHAR BlScratchBuffer[8192];
2861 
2862 #endif
struct _BL_ADDRESS_RANGE * PBL_ADDRESS_RANGE
PBL_FILE_GET_NEXT GetNext
Definition: bl.h:1032
PBL_FILE_OPEN Open
Definition: bl.h:1028
BL_BLOCK_DEVICE_INFORMATION
Definition: bl.h:1234
ULONGLONG VirtualAddress
Definition: bl.h:836
ULONG File
Definition: bl.h:944
enum _BL_PATH_TYPE BL_PATH_TYPE
PBL_FILE_CLOSE Close
Definition: bl.h:1029
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:1091
CONST WCHAR * PCWCH
Definition: ntbasedef.h:411
NTSTATUS(* PCONSOLE_SET_TEXT_RESOLUTION)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ ULONG NewTextResolution, _Out_ PULONG OldTextResolution)
Definition: bl.h:515
Definition: bl.h:202
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:1112
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:1173
Definition: bl.h:201
struct _BL_HASH_TABLE * PBL_HASH_TABLE
PHYSICAL_ADDRESS ImageBase
Definition: bl.h:939
VOID BiCloseKey(_In_ HANDLE KeyHandle)
Definition: bootreg.c:141
LIST_ENTRY ListEntry
Definition: bl.h:1191
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:1056
ASMGENDATA Table[]
Definition: genincdata.c:61
VOID BlpArchEnableTranslation(VOID)
Definition: arch.c:189
PULONG Buffer
Definition: bl.h:1132
ULONGLONG Size
Definition: bl.h:1020
ULONG BlGetBootOptionListSize(_In_ PBL_BCD_OPTION BcdOption)
Definition: bcdopt.c:79
ULONG DescriptorSize
Definition: bl.h:802
ULONG BootIndex
Definition: bl.h:885
struct _BL_DEVICE_INFORMATION BL_DEVICE_INFORMATION
PCONSOLE_CLEAR_TEXT ClearText
Definition: bl.h:1092
NTSTATUS BlUtlGetAcpiTable(_Out_ PVOID *TableAddress, _In_ ULONG Signature)
Definition: util.c:34
Definition: bl.h:203
NTSTATUS ConsoleCreateLocalInputConsole(VOID)
Definition: textcons.c:243
struct _BL_DISPLAY_MODE BL_DISPLAY_MODE
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
Definition: bl.h:247
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
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
PBL_FILE_READ Read
Definition: bl.h:1030
struct _BL_PROTOCOL_HANDLE BL_PROTOCOL_HANDLE
NTSTATUS BlDeviceClose(_In_ ULONG DeviceId)
Definition: device.c:2073
PBL_DEVICE_WRITE Write
Definition: bl.h:1252
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:339
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:463
NTSTATUS BlMmMapPhysicalAddressEx(_In_ PVOID *VirtualAddress, _In_ ULONG Attributes, _In_ ULONGLONG Size, _In_ PHYSICAL_ADDRESS PhysicalAddress)
Definition: mm.c:192
#define _In_opt_
Definition: ms_sal.h:309
ULONG Size
Definition: bl.h:1178
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1154
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:1051
Definition: bl.h:208
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
struct _BL_BCD_OPTION * PBL_BCD_OPTION
#define _Inout_
Definition: ms_sal.h:378
_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:641
ULONG FrameBufferSize
Definition: bl.h:1157
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
ULONG DriveNumber
Definition: bl.h:930
struct _BL_TEXT_CONSOLE * PBL_TEXT_CONSOLE
BL_TEXT_CONSOLE TextConsole
Definition: bl.h:1146
struct _Entry Entry
Definition: kefuncs.h:629
ULONG Reserved
Definition: bl.h:881
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:565
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:1147
ULONG HeapAllocationAttributes
Definition: bl.h:761
_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:4711
NTSTATUS EfiStall(_In_ ULONG StallTime)
Definition: firmware.c:1003
VOID BlFwReboot(VOID)
Definition: fwutil.c:14
ULONG PartitionNumber
Definition: bl.h:967
ULONGLONG Unknown2
Definition: bl.h:1046
BL_HASH_VALUE Value
Definition: bl.h:1193
NTSTATUS(* PBL_TBL_SET_ROUTINE)(_In_ PVOID Entry)
Definition: bl.h:582
ULONGLONG BlpTimePerformanceFrequency
Definition: time.c:15
FORCEINLINE VOID MmMdInitializeListHead(_In_ PBL_MEMORY_DESCRIPTOR_LIST List)
Definition: bl.h:1376
BL_HASH_ENTRY Entry
Definition: bl.h:1192
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * EfiConOut
Definition: firmware.c:23
PLIST_ENTRY This
Definition: bl.h:1008
#define _Out_
Definition: ms_sal.h:345
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:46
VOID BlpArchSwitchContext(_In_ BL_ARCH_MODE NewMode)
Definition: arch.c:166
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
VOID BlDisplayGetTextCellResolution(_Out_ PULONG TextWidth, _Out_ PULONG TextHeight)
Definition: display.c:603
NTSTATUS(* PBL_MM_ZERO_VIRTUAL_ADDRESS_RANGE)(_In_ PVOID DestinationAddress, _In_ ULONGLONG Size)
Definition: bl.h:695
UCHAR Path[ANYSIZE_ARRAY]
Definition: bl.h:985
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:1081
_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:816
NTSTATUS BlFwGetParameters(_In_ PBL_FIRMWARE_DESCRIPTOR Parameters)
Definition: firmware.c:2359
struct _BL_HARDDISK_DEVICE BL_HARDDISK_DEVICE
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:124
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
PCSTR ExtraOptions
Definition: setupldr.c:336
BIOS_MEMORY_MAP MemoryMap[32]
Definition: loader.c:11
WCHAR KeyValue
Definition: bl.h:886
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:1156
ULONG DataSize
Definition: bl.h:848
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:1320
EFI_SIMPLE_TEXT_OUTPUT_MODE OldMode
Definition: bl.h:1116
ULONG MmMdCountList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList)
Definition: descriptor.c:205
GUID Guid
Definition: bl.h:858
NTSTATUS(* PBL_MM_UNMAP_VIRTUAL_ADDRESS)(_In_ PVOID VirtualAddress, _In_ ULONG Size)
Definition: bl.h:716
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:1236
NTSTATUS TblDoNotPurgeEntry(_In_ PVOID Entry)
Definition: util.c:495
struct _BL_LOCAL_DEVICE::@122::@125 RamDisk
#define _Outptr_
Definition: ms_sal.h:427
Definition: bl.h:251
PWCHAR FilePath
Definition: bl.h:1039
LONG NTSTATUS
Definition: precomp.h:26
EFI_HANDLE Handle
Definition: bl.h:1242
NTSTATUS MmUnmapVirtualAddress(_Inout_ PVOID *VirtualAddress, _Inout_ PULONGLONG Size)
Definition: mm.c:453
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:683
NTSTATUS(* PCONSOLE_SET_TEXT_STATE)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ ULONG Flags, _In_ struct _BL_DISPLAY_STATE *TextState)
Definition: bl.h:500
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
ULONG AsULong
Definition: bl.h:883
VOID(* PBL_MM_FLUSH_TLB)(VOID)
Definition: bl.h:678
struct _BL_DEFERRED_FONT_FILE BL_DEFERRED_FONT_FILE
NTSTATUS BlDisplayClearScreen(VOID)
Definition: display.c:943
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * EfiConInEx
Definition: firmware.c:25
ULONG PartitionType
Definition: bl.h:903
ULONG DiskNumber
Definition: bl.h:918
PWCHAR FileName
Definition: bl.h:1280
PBL_TEXT_CONSOLE_VTABLE Callbacks
Definition: bl.h:1110
PCONSOLE_DESTRUCT Destruct
Definition: bl.h:1086
_BL_PARTITION_TYPE
Definition: bl.h:272
ULONG NextEntryOffset
Definition: bl.h:850
_BL_LOCAL_DEVICE_TYPE
Definition: bl.h:259
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:1131
PBL_FILE_GET_INFO GetInfo
Definition: bl.h:1033
BOOLEAN Active
Definition: bl.h:1113
Definition: bl.h:200
NTSTATUS MmMdAddDescriptorToList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR MemoryDescriptor, _In_ ULONG Flags)
Definition: descriptor.c:582
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
PCONSOLE_GET_TEXT_STATE GetTextState
Definition: bl.h:1088
NTSTATUS(* PBL_DEVICE_GET_INFORMATION)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry, _Out_ struct _BL_DEVICE_INFORMATION *DeviceInformation)
Definition: bl.h:647
PBL_DEVICE_GET_INFORMATION GetInformation
Definition: bl.h:1253
EFI_GUID EfiUgaDrawProtocol
Definition: firmware.c:29
PVOID Value
Definition: bl.h:1180
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:856
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:940
ULONG DeviceId
Definition: bl.h:1262
NTSTATUS(* PBL_DEVICE_RESET)(VOID)
Definition: bl.h:661
UINT32 UINTN
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
Definition: wdfusb.h:1331
ULONG ReferenceCount
Definition: bl.h:1265
struct _BL_REMOTE_CONSOLE BL_REMOTE_CONSOLE
static COORD TextResolution
Definition: video.c:48
union _BL_DEVICE_DESCRIPTOR::@126::@129::@130 Mbr
ULONG_PTR MmArchTopOfApplicationAddressSpace
Definition: mmx86.c:30
VOID(* PBL_MM_FLUSH_TLB_ENTRY)(_In_ PVOID VirtualAddress)
Definition: bl.h:706
BOOLEAN(* PBL_MM_TRANSLATE_VIRTUAL_ADDRESS)(_In_ PVOID VirtualAddress, _Out_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_opt_ PULONG CacheAttributes)
Definition: bl.h:738
NTSTATUS(* PCONSOLE_SET_GRAPHICAL_RESOLUTION)(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ struct _BL_DISPLAY_MODE DisplayMode)
Definition: bl.h:543
struct _BL_ARCH_CONTEXT * PBL_ARCH_CONTEXT
Definition: bl.h:198
_In_ HFONT _Out_ PUINT Height
Definition: font.h:124
NTSTATUS BlMmFreePhysicalPages(_In_ PHYSICAL_ADDRESS Address)
Definition: pagealloc.c:1187
uint16_t * PWCHAR
Definition: typedefs.h:56
NTSTATUS ConsoleCreateLocalInputCnsole(VOID)
PCONSOLE_DESTRUCT Destruct
Definition: bl.h:1121
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:701
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:933
PBL_DEVICE_READ Read
Definition: bl.h:1251
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)
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1044
ULONG Exit
Definition: bl.h:880
NTSTATUS(* PBL_DEVICE_FLUSH)(VOID)
Definition: bl.h:667
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:1346
NTSTATUS FatInitialize(VOID)
Definition: fat.c:81
PBL_FS_PURGE_CALLBACK Purge
Definition: bl.h:1065
PBL_FS_INIT_CALLBACK Init
Definition: bl.h:1062
BL_TRANSLATION_TYPE TranslationType
Definition: bl.h:1000
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:688
struct _BL_FIRMWARE_DESCRIPTOR * PBL_FIRMWARE_DESCRIPTOR
enum _BL_TRANSLATION_TYPE BL_TRANSLATION_TYPE
ULONG Offset
Definition: bl.h:1312
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:205
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:423
NTSTATUS BlGetBootOptionInteger(_In_ PBL_BCD_OPTION List, _In_ ULONG Type, _Out_ PULONGLONG Value)
Definition: bcdopt.c:467
PCONSOLE_ENABLE Enable
Definition: bl.h:1100
PWCHAR ApplicationBaseDirectory
Definition: bl.h:762
NTSTATUS BlFwEnumerateDevice(_In_ PBL_DEVICE_DESCRIPTOR Device)
Definition: firmware.c:2375
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition: wdfiotarget.h:1039
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Definition: wdfiotarget.h:859
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:1186
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:493
PCWSTR FilePath
NTSTATUS(* PBL_DEVICE_READ)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry, _In_ PVOID Buffer, _In_ ULONG Size, _Out_ PULONG BytesRead)
Definition: bl.h:632
PLIST_ENTRY First
Definition: bl.h:1007
Definition: bl.h:1260
NTSTATUS(* PBL_FILE_CLOSE)(_In_ struct _BL_FILE_ENTRY *FileEntry)
Definition: bl.h:402
NTSTATUS BlockIoEfiCompareDevice(_In_ PBL_DEVICE_DESCRIPTOR Device, _In_ EFI_HANDLE Handle)
Definition: device.c:1268
DWORD Id
Definition: bl.h:212
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:195
ULONG ContextFlags
Definition: bl.h:1001
BL_LOADED_APPLICATION_ENTRY BlpApplicationEntry
Definition: bootlib.c:19
ULONG FgColor
Definition: bl.h:1071
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:1099
LIST_ENTRY ListEntry
Definition: bl.h:1299
uint32_t ULONG_PTR
Definition: typedefs.h:65
PULONG DataEnd
Definition: bl.h:1134
EFI_GRAPHICS_OUTPUT_PROTOCOL * Protocol
Definition: bl.h:1155
Definition: bl.h:231
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:820
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:575
ImageFlags
Definition: gdiplusenums.h:331
ULONG DataOffset
Definition: bl.h:847
ULONG Compression
Definition: bl.h:1322
NTSTATUS BlpMmCreateBlockAllocator(VOID)
Definition: blkalloc.c:213
USHORT BitCount
Definition: bl.h:1321
struct _BL_HARDDISK_DEVICE::@117::@120 Gpt
PBL_FS_MOUNT_CALLBACK Mount
Definition: bl.h:1064
NTSTATUS(* PBL_FS_DESTROY_CALLBACK)(VOID)
Definition: bl.h:449
PBL_MM_ZERO_VIRTUAL_ADDRESS_RANGE BlMmZeroVirtualAddressRange
Definition: arch.c:18
WCHAR LoadOptions[ANYSIZE_ARRAY]
Definition: bl.h:994
BL_PARTITION_TYPE PartitionType
Definition: bl.h:1201
BL_FILE_CALLBACKS Callbacks
Definition: bl.h:1047
BL_MEMORY_TYPE Type
Definition: bl.h:841
ULONG ConsoleGraphicalResolutionListSize
Definition: display.c:28
PBL_DEVICE_ENUMERATE_DEVICE_CLASS EnumerateDeviceClass
Definition: bl.h:1248
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:956
Definition: bl.h:854
VOID MmMdRemoveDescriptorFromList(_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, _In_ PBL_MEMORY_DESCRIPTOR Entry)
Definition: descriptor.c:338
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
struct _BL_HASH_NODE BL_HASH_NODE
NTSTATUS BlDisplaySetCursorType(_In_ ULONG Type)
Definition: display.c:969
BL_MEMORY_DESCRIPTOR_LIST MmMdlCompleteBadMemory
Definition: pagealloc.c:44
NTSTATUS(* PBL_FS_INIT_CALLBACK)(VOID)
Definition: bl.h:443
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:523
NTSTATUS BlBdPullRemoteFile(_In_ PWCHAR FilePath, _Out_ PVOID BaseAddress, _Out_ PULONGLONG FileSize)
Definition: debug.c:34
ULONG OldPixelDepth
Definition: bl.h:1152
NTSTATUS BlpSecureBootEFIIsEnabled(VOID)
Definition: firmware.c:687
EFI_HANDLE ImageHandle
Definition: bl.h:810
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:1098
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:536
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:1043
PBL_BCD_OPTION BcdData
Definition: bl.h:867
ULONG LibraryFlags
Definition: bl.h:757
NTSTATUS ConsoleFirmwareTextOpen(_In_ PBL_TEXT_CONSOLE TextConsole)
Definition: textcons.c:421
BL_LOCAL_DEVICE Disk
Definition: bl.h:975
struct _BL_FILE_INFORMATION * PBL_FILE_INFORMATION
struct _BOOT_APPLICATION_PARAMETER_BLOCK * PBOOT_APPLICATION_PARAMETER_BLOCK
struct _BITMAP * PBITMAP
ULONG OemKey
Definition: bl.h:879
ULONG AdvancedOptions
Definition: bl.h:877
GUID PartitionGuid
Definition: bl.h:972
PBL_HASH_TABLE_COMPARE_FUNCTION CompareFunction
Definition: bl.h:1172
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:859
BL_TRANSLATION_TYPE MmTranslationType
Definition: mm.c:17
BOOLEAN BlDisplayValidOemBitmap(VOID)
Definition: display.c:880
PCONSOLE_GET_GRAPHICAL_RESOLUTION GetGraphicalResolution
Definition: bl.h:1102
PBL_DEVICE_OPEN Open
Definition: bl.h:1249
Definition: bl.h:896
struct _BL_DEVICE_CALLBACKS BL_DEVICE_CALLBACKS
PVOID ImageBase
Definition: bl.h:1286
struct _BL_FILE_CALLBACKS BL_FILE_CALLBACKS
Definition: bl.h:891
_BL_PATH_TYPE
Definition: bl.h:282
struct _BL_HARDDISK_DEVICE::@117::@121 Raw
unsigned char BOOLEAN
NTSTATUS BiLoadHive(_In_ PBL_FILE_PATH_DESCRIPTOR FilePath, _Out_ PHANDLE HiveHandle)
Definition: bootreg.c:363
struct _BL_BLOCK_DEVICE_INFORMATION::@132::@133::@136 Gpt
DEVICE_TYPE DeviceType
Definition: bl.h:950
struct _BL_MENU_STATUS BL_MENU_STATUS
_BL_GRAPHICS_CONSOLE_TYPE
Definition: bl.h:1138
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:723
static WCHAR Address[46]
Definition: ping.c:68
BL_HARDDISK_DEVICE VirtualHardDisk
Definition: bl.h:935
PVOID BlMmAllocateHeap(_In_ SIZE_T Size)
Definition: heapalloc.c:569
Definition: bl.h:239
_In_ ULONG Rows
Definition: haltypes.h:7
NTSTATUS BlImgStartBootApplication(_In_ ULONG AppHandle, _Inout_ PBL_RETURN_ARGUMENTS ReturnArguments)
BL_BLOCK_DEVICE_INFORMATION BlockDeviceInfo
Definition: bl.h:1228
_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
struct _BL_HARDDISK_DEVICE::@117::@119 Mbr
#define _In_
Definition: ms_sal.h:308
enum _BL_GRAPHICS_CONSOLE_TYPE BL_GRAPHICS_CONSOLE_TYPE
Definition: bl.h:207
Definition: bl.h:233
ULONGLONG PageCount
Definition: bl.h:839
NTSTATUS BlpIoRegisterDestroyRoutine(_In_ PBL_IO_DESTROY_ROUTINE DestroyRoutine)
Definition: io.c:21
ULONG Flags
Definition: bl.h:1042
_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:863
struct _BL_INPUT_CONSOLE_VTABLE BL_INPUT_CONSOLE_VTABLE
PFN_NUMBER Page
Definition: section.c:4924
NTSTATUS ConsoleTextLocalConstruct(_In_ PBL_TEXT_CONSOLE TextConsole, _In_ BOOLEAN Activate)
Definition: textcons.c:104
ULONG PixelsPerScanLine
Definition: bl.h:1158
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
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
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2697
USHORT Signature
Definition: bl.h:1309
BL_LOCAL_DEVICE_TYPE Type
Definition: bl.h:1198
NTSTATUS(* PBL_MM_MAP_PHYSICAL_ADDRESS)(_In_ PHYSICAL_ADDRESS PhysicalAddress, _Out_ PVOID VirtualAddress, _In_ ULONG Size, _In_ ULONG CacheAttributes)
Definition: bl.h:730
Definition: bl.h:209
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:721
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:197
static PCWSTR OptionList[]
Definition: tasklist.c:12
_BL_MEMORY_DESCRIPTOR_TYPE
Definition: bl.h:221
struct _BL_FILE_SYSTEM_ENTRY * PBL_FILE_SYSTEM_ENTRY
NTSTATUS BlpDisplayRegisterLocale(_In_ PWCHAR Locale)
Definition: display.c:177
BOOLEAN BlArchIsCpuIdFunctionSupported(_In_ ULONG Function)
Definition: util.c:856
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
PBITMAP BlDisplayGetOemBitmap(_Out_ PCOORD Offset, _Out_opt_ PULONG Flags)
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
Definition: wdfmemory.h:169
Definition: bl.h:250
ULONG X
Definition: bl.h:1339
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
Status
Definition: gdiplustypes.h:24
struct _BL_DEVICE_INFORMATION * PBL_DEVICE_INFORMATION
Definition: bl.h:892
struct _COORD COORD
PBL_DEVICE_DESCRIPTOR Device
Definition: bl.h:1301
#define BL_MM_INCLUDE_NO_FIRMWARE_MEMORY
Definition: bl.h:107
PBL_BCD_OPTION MiscGetBootOption(_In_ PBL_BCD_OPTION List, _In_ ULONG Type)
Definition: bcdopt.c:17
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:990
int Count
Definition: noreturn.cpp:7
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:1165
PCONSOLE_SET_TEXT_STATE SetTextState
Definition: bl.h:1089
ULONG FileSize
Definition: bl.h:1279
LIST_ENTRY ListHead
Definition: bl.h:1006
UCHAR Flags
Definition: bl.h:1273
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3531
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:1015
ULONG(* PBL_HASH_TABLE_HASH_FUNCTION)(_In_ struct _BL_HASH_ENTRY *Entry, _In_ ULONG TableSize)
Definition: bl.h:602
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
InternalIoctlParams Argument4
enum _BL_MEMORY_ATTR BL_MEMORY_ATTR
PVOID DeviceSpecificData
Definition: bl.h:1267
NTSTATUS BlReplaceBootOptions(_In_ PBL_LOADED_APPLICATION_ENTRY AppEntry, _In_ PBL_BCD_OPTION NewOptions)
Definition: bcdopt.c:824
ULONG ClrUsed
Definition: bl.h:1326
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:1170
NTSTATUS MmFwGetMemoryMap(_Out_ PBL_MEMORY_DESCRIPTOR_LIST MemoryMap, _In_ ULONG Flags)
Definition: firmware.c:1845
__wchar_t WCHAR
Definition: xmlstorage.h:180
PBL_FS_DESTROY_CALLBACK Destroy
Definition: bl.h:1063
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:1257
PULONG DataStart
Definition: bl.h:1133
struct _BL_DEVICE_DESCRIPTOR::@126::@128 Remote
Definition: bl.h:230
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:819
uint64_t ULONGLONG
Definition: typedefs.h:67
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:1114
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:1185
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:301
struct _BL_DEVICE_DESCRIPTOR::@126::@129 Partition
PCONSOLE_WRITE_TEXT WriteText
Definition: bl.h:1093
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:575
Type
Definition: Type.h:6
ULONG Flags
Definition: bl.h:1263
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:291
struct _BL_FIRMWARE_DESCRIPTOR BL_FIRMWARE_DESCRIPTOR
Definition: bl.h:211
ULONG ClrImportant
Definition: bl.h:1327
struct _BITMAP BITMAP
FORCEINLINE VOID BlSetupDefaultParameters(_Out_ PBL_LIBRARY_PARAMETERS LibraryParameters)
Definition: bl.h:1354
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:925
ULONG DescriptorOffset
Definition: bl.h:803
NTSTATUS MmPaReserveSelfMapPages(_Inout_ PPHYSICAL_ADDRESS PhysicalAddress, _In_ ULONG Alignment, _In_ ULONG PageCount)
Definition: pagealloc.c:1564
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:530
ULONGLONG TotalBytesRead
Definition: bl.h:1045
EFI_HANDLE Handle
Definition: bl.h:1153
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:846
struct _BL_BCD_OPTION BL_BCD_OPTION
ULONG XPelsPerMeter
Definition: bl.h:1324
NTSTATUS EfipGetRsdt(_Out_ PPHYSICAL_ADDRESS FoundRsdt)
Definition: firmware.c:1635
enum _BL_MEMORY_TYPE BL_MEMORY_TYPE
GUID PartitionSignature
Definition: bl.h:913
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:393
ULONG SizeImage
Definition: bl.h:1323
VOID MmMdFreeGlobalDescriptors(VOID)
Definition: descriptor.c:1332
PCONSOLE_REINITIALIZE Reinitialize
Definition: bl.h:1087
PBL_DEVICE_FLUSH Flush
Definition: bl.h:1256
static VIDEODISPLAYMODE DisplayMode
Definition: pcvideo.c:117
PVOID FrameBuffer
Definition: xboxvideo.c:28
ULONG HRes
Definition: bl.h:1079
ULONG Size
Definition: bl.h:1171
ULONG ActualSize
Definition: bl.h:1293
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:240
Definition: bl.h:199
PBL_FS_INIT_CALLBACK InitCallback
Definition: bl.h:1054
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1098
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:508
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:245
struct _BL_FILE_SYSTEM_REGISTRATION_TABLE BL_FILE_SYSTEM_REGISTRATION_TABLE
char * PBOOLEAN
Definition: retypes.h:11
ULONG BgColor
Definition: bl.h:1070
NTSTATUS BiDeleteKey(_In_ HANDLE KeyHandle)
Definition: bootreg.c:886
ULONG Size
Definition: bl.h:1310
ULONG DeviceId
Definition: bl.h:1040
struct _BL_HASH_VALUE BL_HASH_VALUE
ULONG BlobSize
Definition: bl.h:1347
NTSTATUS BlDisplayGetScreenResolution(_Out_ PULONG HRes, _Out_ PULONG Vres)
Definition: display.c:680
struct _BL_DISPLAY_MODE * PBL_DISPLAY_MODE
ULONG BufferSize
Definition: bl.h:1294
ULONG MinimumHeapSize
Definition: bl.h:760
BL_DISPLAY_STATE State
Definition: bl.h:1111
PVOID DspRemoteInputConsole
Definition: display.c:35
struct _BL_LOCAL_DEVICE::@122::@124 FloppyDisk
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:341
LIST_ENTRY ListEntry
Definition: bl.h:1053
ULONGLONG BaseAddress
Definition: bl.h:835
CPU_VENDORS BlArchGetCpuVendor(VOID)
Definition: util.c:937
#define NTSTATUS
Definition: precomp.h:20
_BL_ARCH_MODE
Definition: bl.h:236
struct _BL_DEFERRED_FONT_FILE * PBL_DEFERRED_FONT_FILE
Definition: bl.h:206
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
#define VOID
Definition: acefi.h:82
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
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
_BL_TRANSLATION_TYPE
Definition: bl.h:228
#define BL_MM_INCLUDE_ONLY_FIRMWARE_MEMORY
Definition: bl.h:117
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
PBL_FS_PURGE_CALLBACK PurgeCallback
Definition: bl.h:1057
ULONG Unknown
Definition: bl.h:1264
struct _BL_PROTOCOL_HANDLE * PBL_PROTOCOL_HANDLE
ULONG Size
Definition: bl.h:1317
PBL_FS_DESTROY_CALLBACK DestroyCallback
Definition: bl.h:1055
Definition: typedefs.h:119
NTSTATUS(* PBL_FILE_WRITE)(VOID)
Definition: bl.h:417
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
BL_MEMORY_DESCRIPTOR_LIST MmMdlUnmappedUnallocated
Definition: pagealloc.c:39
NTSTATUS BlpFileInitialize(VOID)
Definition: file.c:908
ULONG Flags
Definition: bl.h:1179
struct _BL_FILE_ENTRY BL_FILE_ENTRY
Definition: range.c:39
EFI_GUID EfiDevicePathProtocol
Definition: firmware.c:31
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
BOOLEAN(* PBL_HASH_TABLE_COMPARE_FUNCTION)(_In_ struct _BL_HASH_ENTRY *Entry1, _In_ struct _BL_HASH_ENTRY *Entry2)
Definition: bl.h:595
PBL_FILE_SET_INFO SetInfo
Definition: bl.h:1034
Definition: bl.h:1176
processorSet Mask
ULONGLONG Minimum
Definition: bl.h:1014
Definition: bl.h:1337
VOID(* PCONSOLE_DESTRUCT)(_In_ struct _BL_TEXT_CONSOLE *Console)
Definition: bl.h:481
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:1255
struct _BL_ARCH_CONTEXT BL_ARCH_CONTEXT
struct _BL_HASH_VALUE * PBL_HASH_VALUE
ULONG Flags
Definition: bl.h:857
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:908
VOID BlUtlUpdateProgress(_In_ ULONG Percentage, _Out_opt_ PBOOLEAN Completed)
Definition: util.c:181
NTSTATUS BlFileClose(_In_ ULONG FileId)
Definition: file.c:220
GUID Guid
Definition: bl.h:866
BMP_HEADER BmpHeader
Definition: bl.h:1332
NTSTATUS EtfsInitialize(VOID)
Definition: etfs.c:969
struct _BMP_HEADER BMP_HEADER
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:456
NTSTATUS BlpArchInitialize(_In_ ULONG Phase)
Definition: arch.c:235
NTSTATUS ConsoleFirmwareGraphicalClear(_In_ PBL_GRAPHICS_CONSOLE Console, _In_ ULONG Color)
Definition: guicons.c:90
Definition: bl.h:895
PCONSOLE_SET_GRAPHICAL_RESOLUTION SetOriginalResolution
Definition: bl.h:1104
struct _BL_APPLICATION_ENTRY BL_APPLICATION_ENTRY
ULONG TranslationType
Definition: bl.h:758
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
struct _BL_DEVICE_DESCRIPTOR * PBL_DEVICE_DESCRIPTOR
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:80
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:830
struct _FileName FileName
Definition: fatprocs.h:893
NTSTATUS BlpFwInitialize(_In_ ULONG Phase, _In_ PBL_FIRMWARE_DESCRIPTOR FirmwareParameters)
Definition: firmware.c:2290
NTSTATUS MmPaInitialize(_In_ PBL_MEMORY_DATA MemoryData, _In_ ULONG MinimumPages)
Definition: bl.h:210
static const COLUMN_LIST Columns[]
Definition: listview.c:19
ULONG FileId
Definition: bl.h:1041
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
_BL_MENU_POLICY
Definition: bl.h:215
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:408
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
Definition: bl.h:285
EFI_GUID EfiLoadedImageProtocol
Definition: firmware.c:30
PCONSOLE_REINITIALIZE Reinitialize
Definition: bl.h:1122
Definition: bl.h:1037
Definition: bl.h:265
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:889
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:745
ULONG FrameBufferSize
Definition: xboxvideo.c:29
ULONG PixelDepth
Definition: bl.h:1148
VOID MmMdInitialize(_In_ ULONG Phase, _In_ PBL_LIBRARY_PARAMETERS LibraryParameters)
Definition: descriptor.c:1384
ULONG ImageSize
Definition: bl.h:1287
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
ULONG YPelsPerMEter
Definition: bl.h:1325
Definition: bl.h:1330
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:654
ULONG Version
Definition: bl.h:799
BL_MEMORY_DESCRIPTOR_LIST MmMdlMappingTrackers
Definition: pagealloc.c:46
#define FORCEINLINE
Definition: wdftypes.h:67
#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:619
NTSTATUS(* PBL_MM_REMAP_VIRTUAL_ADDRESS)(_In_ PPHYSICAL_ADDRESS PhysicalAddress, _Out_ PVOID VirtualAddress, _In_ ULONG Size, _In_ ULONG CacheAttributes)
Definition: bl.h:722
EFI_GUID EfiGraphicsOutputProtocol
Definition: firmware.c:28
FORCEINLINE PVOID PhysicalAddressToPtr(_In_ PHYSICAL_ADDRESS PhysicalAddress)
Definition: bl.h:1389
NTSTATUS(* PBL_FS_MOUNT_CALLBACK)(_In_ ULONG DeviceId, _In_ ULONG Unknown, _Out_ struct _BL_FILE_ENTRY **FileEntry)
Definition: bl.h:455
#define _Out_opt_
Definition: ms_sal.h:346
LIST_ENTRY ListEntry
Definition: bl.h:825
struct _BL_GRAPHICS_CONSOLE * PBL_GRAPHICS_CONSOLE
ULONG VRes
Definition: bl.h:1080
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
#define NULL
Definition: types.h:112
EFI_GUID EfiRootAcpiTable10Guid
Definition: firmware.c:35
BL_MEMORY_DESCRIPTOR_LIST MmMdlPersistentMemory
Definition: pagealloc.c:43
ULONG Height
Definition: bl.h:1319
struct _BL_TEXT_CONSOLE_VTABLE * PBL_TEXT_CONSOLE_VTABLE
ULONG MdListOffset
Definition: bl.h:800
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:811
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:1072
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:550
PBL_FILE_WRITE Write
Definition: bl.h:1031
NTSTATUS ConsoleEfiGopOpen(_In_ PBL_GRAPHICS_CONSOLE GraphicsConsole)
Definition: gop.c:198
_Must_inspect_result_ _Outptr_result_bytebuffer_ ViewSize PVOID * MappedBase
Definition: mmfuncs.h:492
ULONG Mode
Definition: bl.h:1115
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:1235
NTSTATUS BcInitialize(VOID)
Definition: blkcache.c:73
NTSTATUS(* PBL_DEVICE_ENUMERATE_DEVICE_CLASS)(VOID)
Definition: bl.h:613
VOID BlStatusPrint(_In_ PCWCH Format,...)
Definition: debug.c:75
DIB_HEADER DibHeader
Definition: bl.h:1333
NTSTATUS BiEnumerateSubKeys(_In_ HANDLE KeyHandle, _Out_ PWCHAR **SubKeyList, _Out_ PULONG SubKeyCount)
Definition: bootreg.c:717
ULONG MinimumAllocationCount
Definition: bl.h:759
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:893
PBL_DEVICE_CLOSE Close
Definition: bl.h:1250
struct _BL_TEXT_CONSOLE_VTABLE BL_TEXT_CONSOLE_VTABLE
_In_ HANDLE Handle
Definition: extypes.h:390
#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:542
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:383
struct FileInfo FileInfo
_Must_inspect_result_ typedef _Out_ PULONG TableSize
Definition: iotypes.h:4327
NTSTATUS BfLoadDeferredFontFiles(VOID)
Definition: font.c:99
ULONG Flags
Definition: bl.h:865
PULONG EndBuffer
Definition: bl.h:1135
PVOID FsSpecificData
Definition: bl.h:1048
NTSTATUS EfiConInExReset(VOID)
Definition: firmware.c:825
BL_MEMORY_DESCRIPTOR_LIST MmMdlUnmappedAllocated
Definition: pagealloc.c:38
ULONG Width
Definition: bl.h:1318
NTSTATUS(* PCONSOLE_WRITE_TEXT)(_In_ struct _BL_TEXT_CONSOLE *Console, _In_ PCHAR Text, _In_ ULONG Attribute)
Definition: bl.h:557
struct _BL_FILE_ENTRY * PBL_FILE_ENTRY
NTSTATUS BlDisplaySetScreenResolution(VOID)
Definition: display.c:646
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:1073
union _BL_DEVICE_DESCRIPTOR::@126::@129::@131 Gpt
ULONG ImageOffset
Definition: bl.h:941
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:1268
VOID BlArchCpuId(_In_ ULONG Function, _In_ ULONG SubFunction, _Out_ PCPU_INFO Result)
Definition: util.c:924
ULONG ListOffset
Definition: bl.h:849
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
NTSTATUS(* PBL_DEVICE_CLOSE)(_In_ struct _BL_DEVICE_ENTRY *DeviceEntry)
Definition: bl.h:626
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:1021
NTSTATUS(* PBL_FILE_DESTROY_CALLBACK)(_In_ PVOID Entry)
Definition: bl.h:469
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:876
Definition: bl.h:1283
struct _BL_INPUT_CONSOLE BL_INPUT_CONSOLE
struct _BL_BLOCK_DEVICE_INFORMATION::@132::@133::@135 Mbr
BL_ARCH_MODE Mode
Definition: bl.h:999
PCONSOLE_GET_GRAPHICAL_RESOLUTION GetOriginalResolution
Definition: bl.h:1103
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:1127
NTSTATUS(* PBL_FILE_SET_INFO)(_In_ struct _BL_FILE_ENTRY *FileEntry, _In_ struct _BL_FILE_INFORMATION *FileInfo)
Definition: bl.h:436
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:851
ULONGLONG VirtualPage
Definition: bl.h:831
struct _BL_MEMORY_DATA * PBL_MEMORY_DATA
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:1225
_In_ BOOLEAN _In_ USHORT Directory
Definition: rtlfuncs.h:3885
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:1266
NTSTATUS EfiGetNtStatusCode(_In_ EFI_STATUS EfiStatus)
Definition: firmware.c:2539
ULONG Y
Definition: bl.h:1340
BL_DISPLAY_MODE OldDisplayMode
Definition: bl.h:1151
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:1127
struct _BL_DEVICE_ENTRY BL_DEVICE_ENTRY
PWCHAR FontBaseDirectory
Definition: bl.h:764
NTSTATUS(* PBL_DEVICE_CREATE)(VOID)
Definition: bl.h:673
EFI_HANDLE Handle
Definition: bl.h:1237
BL_MEMORY_DESCRIPTOR_LIST MmMdlFreeVirtual
Definition: pagealloc.c:45
PWCHAR BlResourceFindHtml(VOID)
Definition: resource.c:305
ULONG BootOptions
Definition: bl.h:878
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:1022
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:1285
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
BL_GRAPHICS_CONSOLE_TYPE Type
Definition: bl.h:1154
Definition: bl.h:204
PVOID Data
Definition: bl.h:1345
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:817
Definition: bl.h:232
ULONG MmDescriptorCallTreeCount
Definition: mm.c:19
base of all file and directory entries
Definition: entries.h:82
struct _BL_TEXT_CONSOLE BL_TEXT_CONSOLE
ULONG Unknown
Definition: bl.h:1044
enum _BL_BOOT_ERROR_STATUS BL_BOOT_ERROR_STATUS
PBL_DEVICE_SET_INFORMATION SetInformation
Definition: bl.h:1254
ULONG DescriptorCount
Definition: bl.h:763
PVOID BaseAddress
Definition: bl.h:1276
ULONG FileId
Definition: bl.h:1277
PVOID Interface
Definition: bl.h:1243
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:429
LONGLONG QuadPart
Definition: typedefs.h:114
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:725
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:1074
BL_BCD_OPTION BcdData
Definition: bl.h:860
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
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:487
PCONSOLE_GET_TEXT_RESOLUTION GetTextResolution
Definition: bl.h:1090
struct _BL_RETURN_ARGUMENTS * PBL_RETURN_ARGUMENTS
NTSTATUS(* PBL_IO_DESTROY_ROUTINE)(VOID)
Definition: bl.h:588
struct _BL_FILE_INFORMATION BL_FILE_INFORMATION
enum _BL_COLOR * PBL_COLOR
ULONG DescriptorCount
Definition: bl.h:801
NTSTATUS ConsoleGraphicalEnable(_In_ struct _BL_GRAPHICS_CONSOLE *Console, _In_ BOOLEAN Enable)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
Definition: wdfregistry.h:271
struct _BL_BLOCK_DEVICE_INFORMATION::@132 Disk