MCPcopy Create free account
hub / github.com/Atmosphere-NX/Atmosphere / Initialize

Function Initialize

exosphere/program/source/boot/secmon_crt0_cpp.cpp:24–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace ams::secmon::boot {
23
24 void Initialize(uintptr_t bss_start, size_t bss_end, uintptr_t boot_bss_start, uintptr_t boot_bss_end) {
25 /* Set our start time. */
26 auto &secmon_params = *MemoryRegionPhysicalDeviceBootloaderParams.GetPointer<pkg1::SecureMonitorParameters>();
27 secmon_params.secmon_start_time = *reinterpret_cast<volatile u32 *>(MemoryRegionPhysicalDeviceTimer.GetAddress() + 0x10);
28
29 /* Setup DMA controllers. */
30 SetupSocDmaControllers();
31
32 /* Make the page table. */
33 MakePageTable();
34
35 /* Setup memory controllers the MMU. */
36 SetupCpuMemoryControllersEnableMmu();
37
38 /* Clear bss. */
39 std::memset(reinterpret_cast<void *>(bss_start), 0, bss_end - bss_start);
40 std::memset(reinterpret_cast<void *>(boot_bss_start), 0, boot_bss_end - boot_bss_start);
41
42 /* Call init array. */
43 __libc_init_array();
44 }
45
46}

Callers 10

PowerOffFunction · 0.50
PerformUserRebootByPmicFunction · 0.50
PerformUserShutDownFunction · 0.50
ExitChargerHiZModeFunction · 0.50
SetupLogForBootFunction · 0.50
Setup1Function · 0.50
Setup1ForWarmbootFunction · 0.50
SuspendCpuImplFunction · 0.50
DisableCrailFunction · 0.50

Calls 6

SetupSocDmaControllersFunction · 0.85
MakePageTableFunction · 0.85
memsetFunction · 0.85
__libc_init_arrayFunction · 0.85
GetAddressMethod · 0.45

Tested by

no test coverage detected