diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 13:50:55 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-31 13:50:55 +0100 |
commit | 532559dc491d82c41de7f348b3c165d37356be73 (patch) | |
tree | 6ea8977830d1f5c3884e7a3a8161860ccae0f226 /setup.c | |
parent | 7dcea5fdafe66d8bcf1eeacbaf3f3f3b1c258dfc (diff) | |
download | rpi-MMU-example-532559dc491d82c41de7f348b3c165d37356be73.tar.gz rpi-MMU-example-532559dc491d82c41de7f348b3c165d37356be73.zip |
use just implemented basic memory section allocation for processes
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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(); |