kern: simplify global rng initialization

This commit is contained in:
Michael Scire authored and SciresM committed 2021-04-11 03:42:16 -07:00
1 parent 0f8b7be2d2
commit 8e4be9aef9
2 files changed
+30 -14

No files matched your search

@@ -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. */