| #ifndef BIOS_E820_H |
| #define BIOS_E820_H |
| |
| #define SMAP 0x534d4150 /* ASCII "SMAP" */ |
| |
| #define E820_RAM 1 |
| #define E820_RESERVED 2 |
| #define E820_ACPI 3 |
| #define E820_NVS 4 |
| #define E820_UNUSABLE 5 |
| |
| |
| /* |
| * reserved RAM used by kernel itself |
| * if CONFIG_INTEL_TXT is enabled, memory of this type will be |
| * included in the S3 integrity calculation and so should not include |
| * any memory that BIOS might alter over the S3 transition |
| */ |
| #define E820_RESERVED_KERN 128 |
| |
| struct e820entry { |
| uint64_t addr; /* start of memory segment */ |
| uint64_t size; /* size of memory segment */ |
| uint32_t type; /* type of memory segment */ |
| } __attribute__((packed)); |
| |
| struct e820map { |
| uint32_t nr_map; |
| struct e820entry map[]; |
| }; |
| |
| extern struct e820map *e820; |
| |
| #define ISA_START_ADDRESS 0xa0000 |
| #define ISA_END_ADDRESS 0x100000 |
| |
| #define BIOS_BEGIN 0x000a0000 |
| #define BIOS_END 0x00100000 |
| |
| #define BIOS_ROM_BASE 0xffe00000 |
| #define BIOS_ROM_END 0xffffffff |
| |
| |
| #endif /* BIOS_E820_H */ |