mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-22 02:12:06 +00:00
thermosphere: I wish ld wasn't dumb (also, bugfix). This saves 4K
This commit is contained in:
parent
e4d189eee3
commit
edf2bbc30e
2 changed files with 4 additions and 5 deletions
|
@ -28,7 +28,6 @@
|
|||
static TEMPORARY ALIGN(0x1000) u64 g_vttbl[BIT(ADDRSPACESZ2 - 30)] = {0};
|
||||
static TEMPORARY ALIGN(0x1000) u64 g_vttbl_l2_mmio_0_0[512] = {0};
|
||||
static TEMPORARY ALIGN(0x1000) u64 g_vttbl_l3_0[512] = {0};
|
||||
static TEMPORARY uintptr_t g_vttblPaddr;
|
||||
|
||||
static inline void identityMapL1(u64 *tbl, uintptr_t addr, size_t size, u64 attribs)
|
||||
{
|
||||
|
@ -51,8 +50,9 @@ uintptr_t stage2Configure(u32 *addrSpaceSize)
|
|||
static const u64 devattrs = 0 | MMU_S2AP_RW | MMU_MEMATTR_DEVICE_NGNRE;
|
||||
static const u64 unchanged = MMU_S2AP_RW | MMU_MEMATTR_NORMAL_CACHEABLE_OR_UNCHANGED;
|
||||
|
||||
uintptr_t g_vttblPaddr = va2pa(g_vttbl);
|
||||
|
||||
if (currentCoreCtx->isBootCore) {
|
||||
g_vttblPaddr = va2pa(g_vttbl);
|
||||
uintptr_t *l2pa = (uintptr_t *)va2pa(g_vttbl_l2_mmio_0_0);
|
||||
uintptr_t *l3pa = (uintptr_t *)va2pa(g_vttbl_l3_0);
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
static TEMPORARY ALIGN(0x1000) u64 g_vttbl[BIT(ADDRSPACESZ2 - 30)] = {0};
|
||||
static TEMPORARY ALIGN(0x1000) u64 g_vttbl_l2_mmio_0[512] = {0};
|
||||
static TEMPORARY ALIGN(0x1000) u64 g_vttbl_l3_0[512] = {0};
|
||||
static TEMPORARY uintptr_t g_vttblPaddr;
|
||||
|
||||
static inline void identityMapL1(u64 *tbl, uintptr_t addr, size_t size, u64 attribs)
|
||||
{
|
||||
|
@ -48,8 +47,8 @@ uintptr_t stage2Configure(u32 *addrSpaceSize)
|
|||
*addrSpaceSize = ADDRSPACESZ2;
|
||||
static const u64 devattrs = MMU_PTE_BLOCK_XN | MMU_S2AP_RW | MMU_MEMATTR_DEVICE_NGNRE;
|
||||
static const u64 unchanged = MMU_S2AP_RW | MMU_MEMATTR_NORMAL_CACHEABLE_OR_UNCHANGED;
|
||||
uintptr_t g_vttblPaddr = va2pa(g_vttbl);
|
||||
if (currentCoreCtx->isBootCore) {
|
||||
g_vttblPaddr = va2pa(g_vttbl);
|
||||
uintptr_t *l2pa = (uintptr_t *)va2pa(g_vttbl_l2_mmio_0);
|
||||
uintptr_t *l3pa = (uintptr_t *)va2pa(g_vttbl_l3_0);
|
||||
|
||||
|
@ -69,5 +68,5 @@ uintptr_t stage2Configure(u32 *addrSpaceSize)
|
|||
mmu_map_page_range(g_vttbl_l3_0, MEMORY_MAP_PA_GICC, MEMORY_MAP_PA_GICD, 0x2000ull, devattrs);
|
||||
}
|
||||
|
||||
return (uintptr_t)g_vttbl;
|
||||
return g_vttblPaddr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue