/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _UAPI_ASM_X86_E820_H2#define _UAPI_ASM_X86_E820_H3#define E820MAP 0x2d0 /* our map */4#define E820MAX 128 /* number of entries in E820MAP */56/*7* Legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the8* constrained space in the zeropage. If we have more nodes than9* that, and if we've booted off EFI firmware, then the EFI tables10* passed us from the EFI firmware can list more nodes. Size our11* internal memory map tables to have room for these additional12* nodes, based on up to three entries per node for which the13* kernel was built: MAX_NUMNODES == (1 << CONFIG_NODES_SHIFT),14* plus E820MAX, allowing space for the possible duplicate E82015* entries that might need room in the same arrays, prior to the16* call to sanitize_e820_map() to remove duplicates. The allowance17* of three memory map entries per node is "enough" entries for18* the initial hardware platform motivating this mechanism to make19* use of additional EFI map entries. Future platforms may want20* to allow more than three entries per node or otherwise refine21* this size.22*/2324#ifndef __KERNEL__25#define E820_X_MAX E820MAX26#endif2728#define E820NR 0x1e8 /* # entries in E820MAP */2930#define E820_RAM 131#define E820_RESERVED 232#define E820_ACPI 333#define E820_NVS 434#define E820_UNUSABLE 535#define E820_PMEM 73637/*38* This is a non-standardized way to represent ADR or NVDIMM regions that39* persist over a reboot. The kernel will ignore their special capabilities40* unless the CONFIG_X86_PMEM_LEGACY option is set.41*42* ( Note that older platforms also used 6 for the same type of memory,43* but newer versions switched to 12 as 6 was assigned differently. Some44* time they will learn... )45*/46#define E820_PRAM 124748/*49* reserved RAM used by kernel itself50* if CONFIG_INTEL_TXT is enabled, memory of this type will be51* included in the S3 integrity calculation and so should not include52* any memory that BIOS might alter over the S3 transition53*/54#define E820_RESERVED_KERN 1285556#ifndef __ASSEMBLER__57#include <linux/types.h>58struct e820entry {59__u64 addr; /* start of memory segment */60__u64 size; /* size of memory segment */61__u32 type; /* type of memory segment */62} __attribute__((packed));6364struct e820map {65__u32 nr_map;66struct e820entry map[E820_X_MAX];67};6869#define ISA_START_ADDRESS 0xa000070#define ISA_END_ADDRESS 0x1000007172#define BIOS_BEGIN 0x000a000073#define BIOS_END 0x001000007475#define BIOS_ROM_BASE 0xffe0000076#define BIOS_ROM_END 0xffffffff7778#endif /* __ASSEMBLER__ */798081#endif /* _UAPI_ASM_X86_E820_H */828384