aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/fbos/image.h23
-rw-r--r--include/fbos/mm.h3
2 files changed, 25 insertions, 1 deletions
diff --git a/include/fbos/image.h b/include/fbos/image.h
new file mode 100644
index 0000000..c217c36
--- /dev/null
+++ b/include/fbos/image.h
@@ -0,0 +1,23 @@
+#ifndef __FBOS_IMAGE_H
+#define __FBOS_IMAGE_H
+
+/*
+ * General definitions for building up an image that is suitable on real
+ * hardware that expect a Linux kernel header.
+ */
+
+// Deprecated image magic.
+#define RISCV_IMAGE_MAGIC "RISCV\0\0\0"
+
+// Image magic that the bootloader expects. It's placed at the same position as
+// ARM64, which is why the previous 'RISCV_IMAGE_MAGIC' has been deprecated in
+// favour of this one.
+#define RISCV_IMAGE_MAGIC2 "RSC\x05"
+
+// Image header version as defined by Linux in the format of
+// u32: MSB| u16: major | u16: minor |LSB
+#define RISCV_HEADER_VERSION_MAJOR 0
+#define RISCV_HEADER_VERSION_MINOR 2
+#define RISCV_HEADER_VERSION (RISCV_HEADER_VERSION_MAJOR << 16 | RISCV_HEADER_VERSION_MINOR)
+
+#endif /* __FBOS_IMAGE */
diff --git a/include/fbos/mm.h b/include/fbos/mm.h
index 25d18ce..e913fa7 100644
--- a/include/fbos/mm.h
+++ b/include/fbos/mm.h
@@ -17,7 +17,8 @@
* The code will be linked to start at the first page, which will have a given
* offset.
*/
+
#define PAGE_OFFSET 0x80200000
-#define LINK_ADDR PAGE_OFFSET
+#define LOAD_OFFSET PAGE_OFFSET
#endif /* __FBOS_MM_H */