aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index b7acf60..63ca054 100644
--- a/setup.c
+++ b/setup.c
@@ -75,7 +75,8 @@ void setup(uint32_t r0, uint32_t machine_type,
memory_size = 192 * POWER_OF_2(20);
}
- if (memory_size < UNPRIVILEGED_MEMORY_END)
+ // assume we need at least one section for PL0
+ if (memory_size < PRIVILEGED_MEMORY_END + SECTION_SIZE)
{
puts("Not enough memory to continue");
while (1);