summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/e820.h
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2019-10-30 14:21:52 +0800
committerIru Cai <mytbk920423@gmail.com>2019-10-30 14:48:38 +0800
commitae51f41d14f548d494ac41e0d21137c5a4c3f59c (patch)
tree6ddb9d1aaa7bd5bad5bbf8497edc2e08ff208d79 /arch/x86/include/asm/e820.h
downloaduext4-ae51f41d14f548d494ac41e0d21137c5a4c3f59c.tar.xz
import the U-Boot code and make it compile
Diffstat (limited to 'arch/x86/include/asm/e820.h')
-rw-r--r--arch/x86/include/asm/e820.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
new file mode 100644
index 0000000..9d29f82
--- /dev/null
+++ b/arch/x86/include/asm/e820.h
@@ -0,0 +1,30 @@
+#ifndef _ASM_X86_E820_H
+#define _ASM_X86_E820_H
+
+#define E820MAX 128 /* number of entries in E820MAP */
+
+#define E820_RAM 1
+#define E820_RESERVED 2
+#define E820_ACPI 3
+#define E820_NVS 4
+#define E820_UNUSABLE 5
+
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+
+struct e820_entry {
+ __u64 addr; /* start of memory segment */
+ __u64 size; /* size of memory segment */
+ __u32 type; /* type of memory segment */
+} __attribute__((packed));
+
+#define ISA_START_ADDRESS 0xa0000
+#define ISA_END_ADDRESS 0x100000
+
+#endif /* __ASSEMBLY__ */
+
+/* Implementation defined function to install an e820 map */
+unsigned int install_e820_map(unsigned int max_entries,
+ struct e820_entry *);
+
+#endif /* _ASM_X86_E820_H */