mirror of
https://github.com/Metabolix/HackBGRT.git
synced 2025-12-07 09:36:10 -08:00
Initial release to GitHub
This commit is contained in:
54
src/types.h
Normal file
54
src/types.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
/** RSDP (Root System Description Pointer) */
|
||||
typedef struct {
|
||||
CHAR8 signature[8];
|
||||
UINT8 checksum;
|
||||
CHAR8 oem_id[6];
|
||||
UINT8 revision;
|
||||
UINT32 rsdt_address;
|
||||
UINT32 length;
|
||||
UINT64 xsdt_address;
|
||||
UINT8 extended_checksum;
|
||||
UINT8 reserved[3];
|
||||
} ACPI_20_RSDP;
|
||||
|
||||
/** SDT (System Description Table) entry header */
|
||||
typedef struct {
|
||||
CHAR8 signature[4];
|
||||
UINT32 length;
|
||||
UINT8 revision;
|
||||
UINT8 checksum;
|
||||
CHAR8 oem_id[6];
|
||||
CHAR8 oem_table_id[8];
|
||||
UINT32 oem_revision;
|
||||
UINT32 asl_compiler_id;
|
||||
UINT32 asl_compiler_revision;
|
||||
} ACPI_SDT_HEADER;
|
||||
|
||||
/** BGRT structure */
|
||||
typedef struct {
|
||||
ACPI_SDT_HEADER header;
|
||||
UINT16 version;
|
||||
UINT8 status;
|
||||
UINT8 image_type;
|
||||
UINT64 image_address;
|
||||
UINT32 image_offset_x;
|
||||
UINT32 image_offset_y;
|
||||
} ACPI_BGRT;
|
||||
|
||||
/** Bitmap file header */
|
||||
typedef struct {
|
||||
UINT8 magic_BM[2];
|
||||
UINT32 file_size;
|
||||
UINT8 unused_0x06[4];
|
||||
UINT32 pixel_data_offset;
|
||||
UINT32 dib_header_size;
|
||||
UINT32 width;
|
||||
UINT32 height;
|
||||
UINT16 planes;
|
||||
UINT16 bpp;
|
||||
} BMP;
|
||||
#pragma pack(pop)
|
||||
Reference in New Issue
Block a user