45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
#pragma once
|
|
// boot_info.h - shared between bootx64.efi and kernel.exe
|
|
// The bootloader fills this structure and passes a pointer to KernelMain.
|
|
#include <stdint.h>
|
|
#include <memory_map.h>
|
|
|
|
#define BOOT_INFO_MAGIC 0x424F4F54494E464FULL /* 'BOOTINFO' */
|
|
#define MAX_BOOT_MODULES 32
|
|
|
|
typedef struct BOOT_MODULE {
|
|
char Name[32]; /* e.g. "hal.dll", "ide.sys" */
|
|
uintptr_t VirtBase; /* Virtual address (mapped) */
|
|
uintptr_t PhysBase; /* Raw physical address (file) */
|
|
size_t ImageSize; /* File size / Image size */
|
|
} BOOT_MODULE;
|
|
|
|
typedef struct BOOT_INFO {
|
|
uint64_t Magic;
|
|
|
|
/* Physical memory. */
|
|
MEMORY_MAP MemoryMap;
|
|
|
|
/* GOP framebuffer. */
|
|
uintptr_t FramebufferBase;
|
|
uint32_t FramebufferWidth;
|
|
uint32_t FramebufferHeight;
|
|
uint32_t FramebufferStride; /* pixels per row */
|
|
|
|
/* Loaded modules. */
|
|
BOOT_MODULE Modules[MAX_BOOT_MODULES];
|
|
uint32_t ModuleCount;
|
|
uint32_t _pad1;
|
|
|
|
char CommandLine[64];
|
|
|
|
/* ACPI RSDP physical address (for APIC, HPET). */
|
|
uintptr_t RsdpPhysical;
|
|
|
|
/* Direct physical window base - always 0xFFFF880000000000. */
|
|
uintptr_t PhysicalMapBase;
|
|
|
|
/* From boot.ini */
|
|
uint32_t DebugEnabled;
|
|
} BOOT_INFO;
|