1 /* 2 * COPYRIGHT: See COPYING.ARM in the top level directory 3 * PROJECT: ReactOS UEFI Boot Manager 4 * FILE: boot/environ/app/bootmgr/bootmgr.h 5 * PURPOSE: Main Boot Manager Header 6 * PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org) 7 */ 8 9 #ifndef _BOOTMGR_H 10 #define _BOOTMGR_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 <initguid.h> 21 #include <ntifs.h> 22 23 /* UEFI Headers */ 24 #include <Uefi.h> 25 26 /* Boot Library Headers */ 27 #include <bl.h> 28 29 /* BCD Headers */ 30 #include <bcd.h> 31 32 /* Message Header */ 33 #include <bootmsg.h> 34 35 /* STRUCTURES ****************************************************************/ 36 37 typedef struct _BL_BOOT_ERROR 38 { 39 ULONG ErrorCode; 40 NTSTATUS ErrorStatus; 41 ULONG Unknown1; 42 PWCHAR ErrorString; 43 PWCHAR FileName; 44 ULONG HelpMsgId; 45 ULONG Unknown2; 46 } BL_BOOT_ERROR, *PBL_BOOT_ERROR; 47 48 typedef struct _BL_PACKED_BOOT_ERROR 49 { 50 PBL_BOOT_ERROR BootError; 51 ULONG Unknown; 52 ULONG Size; 53 } BL_PACKED_BOOT_ERROR, *PBL_PACKED_BOOT_ERROR; 54 55 #define BL_FATAL_ERROR_BCD_READ 0x01 56 #define BL_FATAL_ERROR_APP_LOAD 0x02 57 #define BL_FATAL_ERROR_BCD_ENTRIES 0x03 58 #define BL_FATAL_ERROR_GENERIC 0x04 59 #define BL_FATAL_ERROR_BCD_PARSE 0x07 60 #define BL_FATAL_ERROR_NO_PAE 0x0B 61 62 /* FUNCTIONS *****************************************************************/ 63 64 NTSTATUS 65 NTAPI 66 BmMain ( 67 _In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootParameters 68 ); 69 70 NTSTATUS 71 BmpLaunchBootEntry ( 72 _In_ PBL_LOADED_APPLICATION_ENTRY BootEntry, 73 _Out_ PULONG EntryIndex, 74 _In_ ULONG LaunchCode, 75 _In_ BOOLEAN LaunchWinRe 76 ); 77 78 #endif 79