diff options
author | Andre Przywara <andre.przywara@arm.com> | 2019-07-15 09:04:27 +0100 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2019-09-25 11:45:35 +0100 |
commit | 882c0ff6ba65800046a851735cc848b76810196a (patch) | |
tree | 80e452bc59fdcac0789260dd91a659773626cad1 /plat/rpi/rpi4/rpi4_bl31_setup.c | |
parent | 2b19e2f361ac9be69f0f19ed7a25b1a038d91fc3 (diff) | |
download | trusted-firmware-a-882c0ff6ba65800046a851735cc848b76810196a.tar.gz |
rpi4: Cleanup memory regions, move pens to first page
Now that we have the SMP pens in the first page of DRAM, we can get rid
of all the fancy RPi3 memory regions that our RPi4 port does not really
need. This avoids using up memory all over the place, restricting ATF
to just run in the first 512KB of DRAM.
Remove the now unused regions. This also moves the SMP pens into our
first memory page (holding the firmware magic), where the original
firmware put them, but where there is also enough space for them.
Since the pens will require code execution privileges, we amend the
memory attributes used for that page to include write and execution
rights.
Change-Id: I131633abeb4a4d7b9057e737b9b0d163b73e47c6
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'plat/rpi/rpi4/rpi4_bl31_setup.c')
-rw-r--r-- | plat/rpi/rpi4/rpi4_bl31_setup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plat/rpi/rpi4/rpi4_bl31_setup.c b/plat/rpi/rpi4/rpi4_bl31_setup.c index 8dfadf7306..f8bc259f23 100644 --- a/plat/rpi/rpi4/rpi4_bl31_setup.c +++ b/plat/rpi/rpi4/rpi4_bl31_setup.c @@ -197,10 +197,9 @@ void bl31_plat_arch_setup(void) /* * Add the first page of memory, which holds the stub magic, * the kernel and the DT address. - * This is read-only, as the GPU already populated the header, - * we just need to read it. + * This also holds the secondary CPU's entrypoints and mailboxes. */ - mmap_add_region(0, 0, 4096, MT_MEMORY | MT_RO | MT_SECURE); + mmap_add_region(0, 0, 4096, MT_NON_CACHEABLE | MT_RW | MT_SECURE); rpi3_setup_page_tables(BL31_BASE, BL31_END - BL31_BASE, BL_CODE_BASE, BL_CODE_END, |