aboutsummaryrefslogtreecommitdiffstats
path: root/roms/qboot/include/e820.h
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/qboot/include/e820.h
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/qboot/include/e820.h')
-rw-r--r--roms/qboot/include/e820.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/roms/qboot/include/e820.h b/roms/qboot/include/e820.h
new file mode 100644
index 000000000..09b8f0138
--- /dev/null
+++ b/roms/qboot/include/e820.h
@@ -0,0 +1,44 @@
+#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 */