kern: simplify global rng initialization

This commit is contained in:
Michael Scire 2021-04-07 12:42:35 -07:00 committed by SciresM
parent 0f8b7be2d2
commit 8e4be9aef9
2 changed files with 30 additions and 14 deletions

View file

@ -49,6 +49,9 @@ namespace ams::kern {
/* Initialize the carveout and the system resource limit. */
KSystemControl::InitializePhase1();
/* Synchronize all cores before proceeding, to ensure access to the global rng is consistent. */
cpu::SynchronizeAllCores();
/* Initialize the memory manager and the KPageBuffer slabheap. */
{
const auto &management_region = KMemoryLayout::GetPoolManagementRegion();
@ -74,6 +77,9 @@ namespace ams::kern {
Kernel::InitializeResourceManagers(pt_heap_region.GetAddress(), pt_heap_region.GetSize());
}
} else {
/* Synchronize all cores before proceeding, to ensure access to the global rng is consistent. */
cpu::SynchronizeAllCores();
}
/* Initialize the supervisor page table for each core. */