| 22 | namespace 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 | } |
no test coverage detected