aboutsummaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-31 17:36:50 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-31 17:36:50 +0100
commit030cc96003d4518463b40f20d4194e51b1745c86 (patch)
treebe5b70d67c35e9328f450bde48f335536052c1ce /setup.c
parentb77ef684b07bcd91c168b15f71611786dd5a3377 (diff)
downloadrpi-MMU-example-030cc96003d4518463b40f20d4194e51b1745c86.tar.gz
rpi-MMU-example-030cc96003d4518463b40f20d4194e51b1745c86.zip
don't statically define the unprivileged section (we're going to have many dynamically-claimed unprivileged sections)
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);