i think it works
This commit is contained in:
commit
0e1479b168
167 files changed
+27008
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
// memory_map.h - shared between bootx64.efi and kernel.exe
|
||||
// Describes physical memory layout passed from bootloader to kernel.
|
||||
#include <stdint.h>
|
||||
|
||||
#define MEMORY_MAP_MAGIC 0x4D454D4D41500000ULL /* 'MEMMAP\0\0' */
|
||||
#define MEMORY_MAX_REGIONS 256
|
||||
|
||||
typedef enum MEMORY_TYPE {
|
||||
MemoryUsable = 0, /* free RAM, available to the PMM */
|
||||
MemoryReserved = 1, /* firmware-reserved, do not touch */
|
||||
MemoryMappedIO = 2, /* device MMIO regions */
|
||||
MemoryFramebuffer = 3, /* GOP framebuffer */
|
||||
MemoryBootloader = 4, /* bootloader code/data (reclaimable) */
|
||||
MemoryKernel = 5, /* kernel + HAL + drivers image pages */
|
||||
} MEMORY_TYPE;
|
||||
|
||||
typedef struct MEMORY_REGION {
|
||||
uint64_t Base;
|
||||
uint64_t Length; /* in bytes, always page-aligned */
|
||||
MEMORY_TYPE Type;
|
||||
uint32_t _pad;
|
||||
} MEMORY_REGION;
|
||||
|
||||
typedef struct MEMORY_MAP {
|
||||
uint64_t Magic;
|
||||
uint32_t RegionCount;
|
||||
uint32_t _pad;
|
||||
MEMORY_REGION Regions[MEMORY_MAX_REGIONS];
|
||||
} MEMORY_MAP;
|
||||
Reference in new issue
Block a user