mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 06:34:23 -04:00
kern: simplify global rng initialization
This commit is contained in:
parent
0f8b7be2d2
commit
8e4be9aef9
2 changed files with 30 additions and 14 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue