aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/uapi/asm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-01-28 17:01:06 +0100
committerIngo Molnar <mingo@kernel.org>2017-01-28 17:02:56 +0100
commit09c5151339caea3a5752e577c66521f6e7443fe5 (patch)
treeffbd7517061d05a479f546e7a1cfb5c612527a5f /arch/x86/include/uapi/asm
parent7ad1ed8abc50eb44dd628bda23313599503aee87 (diff)
x86/boot/e820: Use 'enum e820_type' in 'struct e820_entry'
Use a stricter type for struct e820_entry. Add a build-time check to make sure the compiler won't ever pack the enum into a field smaller than 'int'. No change in functionality. Cc: Alex Thorlton <athorlton@sgi.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Huang, Ying <ying.huang@intel.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Juergen Gross <jgross@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul Jackson <pj@sgi.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Tejun Heo <tj@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Wei Yang <richard.weiyang@gmail.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/uapi/asm')
-rw-r--r--arch/x86/include/uapi/asm/e820/types.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/arch/x86/include/uapi/asm/e820/types.h b/arch/x86/include/uapi/asm/e820/types.h
index 54b812e80bac..65c7a1beab22 100644
--- a/arch/x86/include/uapi/asm/e820/types.h
+++ b/arch/x86/include/uapi/asm/e820/types.h
@@ -6,14 +6,45 @@
#ifndef __ASSEMBLY__
+enum e820_type {
+ E820_RAM = 1,
+ E820_RESERVED = 2,
+ E820_ACPI = 3,
+ E820_NVS = 4,
+ E820_UNUSABLE = 5,
+ E820_PMEM = 7,
+
+ /*
+ * This is a non-standardized way to represent ADR or
+ * NVDIMM regions that persist over a reboot.
+ *
+ * The kernel will ignore their special capabilities
+ * unless the CONFIG_X86_PMEM_LEGACY=y option is set.
+ *
+ * ( Note that older platforms also used 6 for the same
+ * type of memory, but newer versions switched to 12 as
+ * 6 was assigned differently. Some time they will learn... )
+ */
+ E820_PRAM = 12,
+
+ /*
+ * Reserved RAM used by the kernel itself if
+ * CONFIG_INTEL_TXT=y is enabled, memory of this type
+ * will be included in the S3 integrity calculation
+ * and so should not include any memory that the BIOS
+ * might alter over the S3 transition:
+ */
+ E820_RESERVED_KERN = 128,
+};
+
/*
* A single E820 map entry, describing a memory range of [addr...addr+size-1],
* of 'type' memory type:
*/
struct e820_entry {
- __u64 addr;
- __u64 size;
- __u32 type;
+ __u64 addr;
+ __u64 size;
+ enum e820_type type;
} __attribute__((packed));
#endif /* __ASSEMBLY__ */

Privacy Policy