aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv64/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv64/config.h')
-rw-r--r--arch/riscv64/config.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/riscv64/config.h b/arch/riscv64/config.h
index 0421341..5ea5482 100644
--- a/arch/riscv64/config.h
+++ b/arch/riscv64/config.h
@@ -27,13 +27,19 @@
/* don't touch >:( */
-/** Physical address to where the kernel proper will be relocated. */
-#define PM_KERN_BASE (RAM_BASE + SZ_512K)
+/**
+ * How much space to reserve for possible firmware region.
+ * Assumed to be at start of RAM.
+ */
+#define FW_MAX_SIZE (SZ_2M)
/** Maximum size of the kernel proper. Largely arbitrary. */
/** \todo UBSAN is getting pretty close to this limit, should it be raised? */
#define PM_KERN_SIZE (SZ_256K)
+/** Physical address to where the kernel proper will be relocated. */
+#define PM_KERN_BASE (RAM_BASE + FW_MAX_SIZE + PM_KERN_SIZE)
+
/** Highest allowed physical address where kernel stuff may lie. */
#define PM_KERN_TOP (PM_KERN_BASE + PM_KERN_SIZE)
@@ -53,7 +59,7 @@
#define VM_DMAP (0xffffffc000000000) /* testing for now */
/** Virtual address of kernel proper inside direct mapping. */
-#define VM_KERN (VM_DMAP + SZ_256K)
+#define VM_KERN (VM_DMAP + FW_MAX_SIZE)
/** Page reserved for kernel I/O. */
#define IO_PAGE 511UL