From 030cc96003d4518463b40f20d4194e51b1745c86 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 31 Dec 2019 17:36:50 +0100 Subject: don't statically define the unprivileged section (we're going to have many dynamically-claimed unprivileged sections) --- setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setup.c') 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); -- cgit v1.2.3