kern/kldr: fix bugs in physical randomization

This commit is contained in:
Michael Scire 2020-04-22 03:45:21 -07:00
parent 4f50f57bb7
commit 6ad0f0e7f2
2 changed files with 5 additions and 4 deletions

View file

@ -307,6 +307,7 @@ namespace ams::kern::init::loader {
/* On 10.0.0+, Physically randomize the kernel region. */
if (kern::GetTargetFirmware() >= kern::TargetFirmware_10_0_0) {
ttbr1_table.PhysicallyRandomize(virtual_base_address + rx_offset, bss_end_offset - rx_offset, true);
cpu::StoreEntireCacheForInit();
}
/* Clear kernel .bss. */