/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_E820_TYPES_H #define _ASM_E820_TYPES_H #include <uapi/asm/bootparam.h> /* * These are the E820 types known to the kernel: */ enum e820_type { … }; /* * A single E820 map entry, describing a memory range of [addr...addr+size-1], * of 'type' memory type: * * (We pack it because there can be thousands of them on large systems.) */ struct e820_entry { … } __attribute__((packed)); /* * The legacy E820 BIOS limits us to 128 (E820_MAX_ENTRIES_ZEROPAGE) nodes * due to the constrained space in the zeropage. * * On large systems we can easily have thousands of nodes with RAM, * which cannot be fit into so few entries - so we have a mechanism * to extend the e820 table size at build-time, via the E820_MAX_ENTRIES * define below. * * ( Those extra entries are enumerated via the EFI memory map, not * via the legacy zeropage mechanism. ) * * Size our internal memory map tables to have room for these additional * entries, based on a heuristic calculation: up to three entries per * NUMA node, plus E820_MAX_ENTRIES_ZEROPAGE for some extra space. * * This allows for bootstrap/firmware quirks such as possible duplicate * E820 entries that might need room in the same arrays, prior to the * call to e820__update_table() to remove duplicates. The allowance * of three memory map entries per node is "enough" entries for * the initial hardware platform motivating this mechanism to make * use of additional EFI map entries. Future platforms may want * to allow more than three entries per node or otherwise refine * this size. */ #include <linux/numa.h> #define E820_MAX_ENTRIES … /* * The whole array of E820 entries: */ struct e820_table { … }; /* * Various well-known legacy memory ranges in physical memory: */ #define ISA_START_ADDRESS … #define ISA_END_ADDRESS … #define BIOS_BEGIN … #define BIOS_END … #define HIGH_MEMORY … #define BIOS_ROM_BASE … #define BIOS_ROM_END … #endif /* _ASM_E820_TYPES_H */