From cf923dc0feb6cf319601743743fbe31e66d7f25a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 12 May 2020 01:18:10 -0700 Subject: [PATCH] exo2: implement main through sync-for-pk21-load --- .../include/exosphere/secmon/secmon_memory_layout.hpp | 6 +++++- libexosphere/include/exosphere/tegra/tegra_sysctr0.hpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libexosphere/include/exosphere/secmon/secmon_memory_layout.hpp b/libexosphere/include/exosphere/secmon/secmon_memory_layout.hpp index 1e25108c..d521efad 100644 --- a/libexosphere/include/exosphere/secmon/secmon_memory_layout.hpp +++ b/libexosphere/include/exosphere/secmon/secmon_memory_layout.hpp @@ -74,6 +74,9 @@ namespace ams::secmon { constexpr inline const MemoryRegion MemoryRegionPhysical = MemoryRegion(UINT64_C( 0x40000000), 1_GB); constexpr inline const MemoryRegion MemoryRegionDram = MemoryRegion(UINT64_C( 0x80000000), 2_GB); + constexpr inline const MemoryRegion MemoryRegionDramGpuCarveout = MemoryRegion(UINT64_C(0x80020000), UINT64_C(0x40000)); + static_assert(MemoryRegionDram.Contains(MemoryRegionDramGpuCarveout)); + constexpr inline const MemoryRegion MemoryRegionDramDefaultKernelCarveout = MemoryRegion(UINT64_C(0x80060000), UINT64_C(0x1FFE0000)); static_assert(MemoryRegionDram.Contains(MemoryRegionDramDefaultKernelCarveout)); @@ -274,6 +277,7 @@ namespace ams::secmon { constexpr inline const MemoryRegion MemoryRegionPhysicalTzramFullProgramImage = MemoryRegion(UINT64_C(0x7C010800), 0xD800); constexpr inline const MemoryRegion MemoryRegionPhysicalIramBootCodeImage = MemoryRegion(UINT64_C(0x40032000), 0xC000); - constexpr inline const MemoryRegion MemoryRegionPhysicalIramBootConfig = MemoryRegion(UINT64_C(0x4003F800), 0x400); + constexpr inline const MemoryRegion MemoryRegionPhysicalIramWarmbootBin = MemoryRegion(UINT64_C(0x4003E000), 0x17F0); + constexpr inline const MemoryRegion MemoryRegionPhysicalIramBootConfig = MemoryRegion(UINT64_C(0x4003F800), 0x400); } diff --git a/libexosphere/include/exosphere/tegra/tegra_sysctr0.hpp b/libexosphere/include/exosphere/tegra/tegra_sysctr0.hpp index d7e7fd49..650067eb 100644 --- a/libexosphere/include/exosphere/tegra/tegra_sysctr0.hpp +++ b/libexosphere/include/exosphere/tegra/tegra_sysctr0.hpp @@ -16,7 +16,7 @@ #pragma once #include -#define SYSCTR0_CNTCR (0x00C) +#define SYSCTR0_CNTCR (0x000) #define SYSCTR0_CNTCV0 (0x008) #define SYSCTR0_CNTCV1 (0x00C) #define SYSCTR0_CNTFID0 (0x020)