aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/setup.c b/setup.c
index 0fd3522..b7acf60 100644
--- a/setup.c
+++ b/setup.c
@@ -74,6 +74,12 @@ void setup(uint32_t r0, uint32_t machine_type,
puts("Couldn't determine available memory - assuming 192MB");
memory_size = 192 * POWER_OF_2(20);
}
+
+ if (memory_size < UNPRIVILEGED_MEMORY_END)
+ {
+ puts("Not enough memory to continue");
+ while (1);
+ }
// prints some info
demo_paging_support();
@@ -81,6 +87,8 @@ void setup(uint32_t r0, uint32_t machine_type,
// prints some info
demo_current_mode();
+ setup_pager_structures(memory_size);
+
// prints some info and sets upp translation table, turns on MMU
setup_flat_map();