2015-09-04 14:16:56 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING.ARM in the top level directory
|
|
|
|
* PROJECT: ReactOS UEFI Boot Manager
|
2015-09-26 16:31:49 +00:00
|
|
|
* FILE: boot/environ/app/bootmgr/bootmgr.h
|
2015-09-04 14:16:56 +00:00
|
|
|
* PURPOSE: Main Boot Manager Header
|
|
|
|
* PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BOOTMGR_H
|
|
|
|
#define _BOOTMGR_H
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
|
|
|
/* C Headers */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <wchar.h>
|
|
|
|
|
|
|
|
/* NT Base Headers */
|
2015-09-09 18:09:04 +00:00
|
|
|
#include <initguid.h>
|
2015-09-04 14:16:56 +00:00
|
|
|
#include <ntifs.h>
|
|
|
|
|
|
|
|
/* UEFI Headers */
|
|
|
|
#include <Uefi.h>
|
|
|
|
|
|
|
|
/* Boot Library Headers */
|
|
|
|
#include <bl.h>
|
|
|
|
|
2015-09-09 18:09:04 +00:00
|
|
|
/* BCD Headers */
|
|
|
|
#include <bcd.h>
|
|
|
|
|
2016-01-06 04:43:23 +00:00
|
|
|
/* Message Header */
|
|
|
|
#include <bootmsg.h>
|
|
|
|
|
[BOOTLIB]:
- WIP work to begin reading, parsing, mounting and loading the BCD hive into a data store. Untested, has missing pieces.
- Implement BlFileSet/GetInformation, BlFileReadEx, BlFileReadAtOffsetEx and helper structures/functions. Document multiple previously unknown/magic flags.
- Implement BlMmAllocatePhysicalPages. Stub BlMmFreePhysicalPages.
- Implement MmUnmapVirtualAddress, BlMmUnmapVirtualAddressEx when operating in real mode.
- Implement ImgpGetFileSize, ImgpReadFileAtOffset, ImgpOpenFile, ImgpCloseFile, BlImgAllocateImageBuffer, BlImgLoadImageWithProgress2.
- Implement BdDebuggerInitialized, BlBdDebuggerEnabled, BlStatusPrint, BlStatuserror. Stub BlBdPullRemoteFile.
- Implement BlGetBootOptionDevice.
- Implement BiReferenceHive, BiDereferenceHive, BiCloseKey, BiOpenKey. Stub BiFlushKey, BiLoadHive.
- Implement BiAddStoreFromFile, BcdOpenStoreFromFile.
- Stub BlUtlUpdateProcess and BlResourceFindMessage.
- Other misc. cleanups.
[BOOTMGR]:
- Implement BmpFatalErrorMessageFilter, BmErrorPurge, BmpErrorLog, BmFatalErrorEx.
- Implement BmpFwGetFullPath.
- Implement BmOpenDataStore.
- Stub BmOpenBootIni
svn path=/trunk/; revision=69447
2015-10-04 21:07:12 +00:00
|
|
|
/* STRUCTURES ****************************************************************/
|
|
|
|
|
|
|
|
typedef struct _BL_BOOT_ERROR
|
|
|
|
{
|
|
|
|
ULONG ErrorCode;
|
|
|
|
NTSTATUS ErrorStatus;
|
|
|
|
ULONG Unknown1;
|
|
|
|
PWCHAR ErrorString;
|
|
|
|
PWCHAR FileName;
|
|
|
|
ULONG HelpMsgId;
|
|
|
|
ULONG Unknown2;
|
|
|
|
} BL_BOOT_ERROR, *PBL_BOOT_ERROR;
|
|
|
|
|
|
|
|
typedef struct _BL_PACKED_BOOT_ERROR
|
|
|
|
{
|
|
|
|
PBL_BOOT_ERROR BootError;
|
|
|
|
ULONG Unknown;
|
|
|
|
ULONG Size;
|
|
|
|
} BL_PACKED_BOOT_ERROR, *PBL_PACKED_BOOT_ERROR;
|
|
|
|
|
2016-01-05 06:09:22 +00:00
|
|
|
#define BL_FATAL_ERROR_BCD_READ 0x01
|
2016-01-20 02:58:39 +00:00
|
|
|
#define BL_FATAL_ERROR_APP_LOAD 0x02
|
2016-01-17 21:48:00 +00:00
|
|
|
#define BL_FATAL_ERROR_BCD_ENTRIES 0x03
|
2016-01-05 06:09:22 +00:00
|
|
|
#define BL_FATAL_ERROR_GENERIC 0x04
|
|
|
|
#define BL_FATAL_ERROR_BCD_PARSE 0x07
|
2016-01-20 02:58:39 +00:00
|
|
|
#define BL_FATAL_ERROR_NO_PAE 0x0B
|
[BOOTLIB]:
- WIP work to begin reading, parsing, mounting and loading the BCD hive into a data store. Untested, has missing pieces.
- Implement BlFileSet/GetInformation, BlFileReadEx, BlFileReadAtOffsetEx and helper structures/functions. Document multiple previously unknown/magic flags.
- Implement BlMmAllocatePhysicalPages. Stub BlMmFreePhysicalPages.
- Implement MmUnmapVirtualAddress, BlMmUnmapVirtualAddressEx when operating in real mode.
- Implement ImgpGetFileSize, ImgpReadFileAtOffset, ImgpOpenFile, ImgpCloseFile, BlImgAllocateImageBuffer, BlImgLoadImageWithProgress2.
- Implement BdDebuggerInitialized, BlBdDebuggerEnabled, BlStatusPrint, BlStatuserror. Stub BlBdPullRemoteFile.
- Implement BlGetBootOptionDevice.
- Implement BiReferenceHive, BiDereferenceHive, BiCloseKey, BiOpenKey. Stub BiFlushKey, BiLoadHive.
- Implement BiAddStoreFromFile, BcdOpenStoreFromFile.
- Stub BlUtlUpdateProcess and BlResourceFindMessage.
- Other misc. cleanups.
[BOOTMGR]:
- Implement BmpFatalErrorMessageFilter, BmErrorPurge, BmpErrorLog, BmFatalErrorEx.
- Implement BmpFwGetFullPath.
- Implement BmOpenDataStore.
- Stub BmOpenBootIni
svn path=/trunk/; revision=69447
2015-10-04 21:07:12 +00:00
|
|
|
|
2015-09-04 14:16:56 +00:00
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
NTSTATUS
|
2016-02-03 19:12:34 +00:00
|
|
|
NTAPI
|
2015-09-04 14:16:56 +00:00
|
|
|
BmMain (
|
|
|
|
_In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootParameters
|
|
|
|
);
|
|
|
|
|
2016-01-20 02:58:39 +00:00
|
|
|
NTSTATUS
|
|
|
|
BmpLaunchBootEntry (
|
|
|
|
_In_ PBL_LOADED_APPLICATION_ENTRY BootEntry,
|
|
|
|
_Out_ PULONG EntryIndex,
|
|
|
|
_In_ ULONG LaunchCode,
|
|
|
|
_In_ BOOLEAN LaunchWinRe
|
|
|
|
);
|
|
|
|
|
2015-09-04 14:16:56 +00:00
|
|
|
#endif
|