Files
nt-lite/code/kernel/boot_info.h
T

46 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; /* where it was mapped */
size_t ImageSize;
} 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 */
uint32_t _pad0;
/* 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;
uint32_t _pad2;
} BOOT_INFO;