[BOOT:BOOTMGR] Add device definitions to bootmgr.h
This commit is contained in:
parent
a6aa028e5c
commit
9b66f166d6
@ -67,18 +67,29 @@ typedef struct {
|
||||
ULONG BootDeviceOffset;
|
||||
ULONG FirmwareDataOffset;
|
||||
ULONG ReturnDataOffset;
|
||||
|
||||
ULONG PlatformDataOffset;
|
||||
} BOOT_INPUT_PARAMETERS, *PBOOT_INPUT_PARAMETERS;
|
||||
|
||||
typedef struct {
|
||||
ULONG Type;
|
||||
ULONG DataOffset;
|
||||
ULONG DataSize;
|
||||
ULONG OtherOptionsOffset;
|
||||
ULONG NextOptionOffset;
|
||||
BOOLEAN IsInvalid;
|
||||
UCHAR Unknown[3];
|
||||
} BOOT_APPLICATION_ENTRY_OPTION, *PBOOT_APPLICATION_ENTRY_OPTION;
|
||||
|
||||
#define BOOT_APPLICATION_ENTRY_SIGNATURE 0x544e4550415442 /* "BTAPENT" */
|
||||
|
||||
#define BOOT_APPLICATION_ENTRY_BCD_IDENTIFIER_NOT_SET 0x01
|
||||
#define BOOT_APPLICATION_ENTRY_NO_BCD_IDENTIFIER 0x01
|
||||
|
||||
typedef struct {
|
||||
ULONGLONG Signature;
|
||||
ULONG Attributes;
|
||||
GUID BcdIdentifier;
|
||||
UCHAR Unknown[16];
|
||||
BOOT_APPLICATION_ENTRY_OPTION Options;
|
||||
} BOOT_APPLICATION_ENTRY, *PBOOT_APPLICATION_ENTRY;
|
||||
|
||||
#define BOOT_MEMORY_INFO_VERSION 1
|
||||
@ -123,9 +134,115 @@ typedef struct {
|
||||
} BOOT_RETURN_DATA, *PBOOT_RETURN_DATA;
|
||||
|
||||
typedef struct {
|
||||
LARGE_INTEGER ImageBase;
|
||||
ULONG ImageSize;
|
||||
ULONG ImageOffset;
|
||||
} BOOT_RAMDISK_IDENTIFIER, *PBOOT_RAMDISK_IDENTIFIER;
|
||||
|
||||
#define BOOT_HARDDRIVE_PARTITION_TYPE_GPT 0x00
|
||||
#define BOOT_HARDDRIVE_PARTITION_TYPE_MBR 0x01
|
||||
#define BOOT_HARDDRIVE_PARTITION_TYPE_RAW 0x02
|
||||
|
||||
typedef struct {
|
||||
ULONG PartitionType;
|
||||
|
||||
union {
|
||||
struct {
|
||||
ULONG Signature;
|
||||
} Mbr;
|
||||
|
||||
struct {
|
||||
GUID Signature;
|
||||
} Gpt;
|
||||
|
||||
struct {
|
||||
ULONG DriveNumber;
|
||||
} Raw;
|
||||
};
|
||||
} BOOT_HARDDRIVE_IDENTIFIER, *PBOOT_HARDDRIVE_IDENTIFIER;
|
||||
|
||||
typedef struct {
|
||||
ULONG DriveNumber;
|
||||
} BOOT_CDROM_IDENTIFIER, *PBOOT_CDROM_IDENTIFIER;
|
||||
|
||||
#define BOOT_BLOCK_DEVICE_TYPE_HARDDRIVE 0x00
|
||||
#define BOOT_BLOCK_DEVICE_TYPE_CDROM 0x02
|
||||
#define BOOT_BLOCK_DEVICE_TYPE_RAMDISK 0x03
|
||||
|
||||
typedef struct {
|
||||
ULONG Type;
|
||||
|
||||
union {
|
||||
BOOT_RAMDISK_IDENTIFIER Ramdisk;
|
||||
BOOT_HARDDRIVE_IDENTIFIER Harddrive;
|
||||
BOOT_CDROM_IDENTIFIER Cdrom;
|
||||
};
|
||||
} BOOT_BLOCK_IDENTIFIER, *PBOOT_BLOCK_IDENTIFIER;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
struct {
|
||||
ULONG PartitionNumber;
|
||||
} Mbr;
|
||||
|
||||
struct {
|
||||
GUID PartitionIdentifier;
|
||||
} Gpt;
|
||||
|
||||
struct {
|
||||
ULONG BootEntry;
|
||||
} ElTorito;
|
||||
};
|
||||
|
||||
BOOT_BLOCK_IDENTIFIER Parent;
|
||||
} BOOT_PARTITION_IDENTIFIER, *PBOOT_PARTITION_IDENTIFIER;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
struct {
|
||||
PVOID PartitionOffset;
|
||||
} Mbr;
|
||||
|
||||
struct {
|
||||
GUID PartitionIdentifier;
|
||||
} Gpt;
|
||||
|
||||
struct {
|
||||
ULONG BootEntry;
|
||||
} ElTorito;
|
||||
};
|
||||
|
||||
BOOT_BLOCK_IDENTIFIER Parent;
|
||||
} BOOT_PARTITION_IDENTIFIER_EX, *PBOOT_PARTITION_IDENTIFIER_EX;
|
||||
|
||||
#define BOOT_DEVICE_TYPE_BLOCK 0x00
|
||||
#define BOOT_DEVICE_TYPE_PARTITION 0x02
|
||||
#define BOOT_DEVICE_TYPE_PARTITION_EX 0x06
|
||||
|
||||
#define BOOT_DEVICE_ATTRIBUTE_NO_PARENT_SIGNATURE 0x04
|
||||
|
||||
typedef struct {
|
||||
ULONG Type;
|
||||
ULONG Attributes;
|
||||
ULONG Size;
|
||||
ULONG Pad;
|
||||
|
||||
union {
|
||||
BOOT_BLOCK_IDENTIFIER Block;
|
||||
BOOT_PARTITION_IDENTIFIER Partition;
|
||||
BOOT_PARTITION_IDENTIFIER_EX PartitionEx;
|
||||
};
|
||||
} BOOT_DEVICE, *PBOOT_DEVICE;
|
||||
|
||||
typedef enum {
|
||||
BCDE_DATA_TYPE_APPLICATION_DEVICE = 0x11000001
|
||||
} BCDE_DATA_TYPE;
|
||||
|
||||
typedef struct {
|
||||
GUID OtherOptions;
|
||||
BOOT_DEVICE Device;
|
||||
} BCDE_DEVICE, *PBCDE_DEVICE;
|
||||
|
||||
NTSTATUS
|
||||
BmMain (
|
||||
IN PBOOT_INPUT_PARAMETERS InputParameters
|
||||
|
Loading…
Reference in New Issue
Block a user