revert the memory map to the old one (mostly)

This commit is contained in:
TuxSH
2020-05-18 22:15:34 +01:00
parent 905837468c
commit 704e08dc23
4 changed files with 9 additions and 7 deletions

View File

@@ -288,10 +288,7 @@ void main(FcramLayout *layout, KCoreContext *ctxs)
kextBasePa = p->basePA;
stolenSystemMemRegionSize = p->stolenSystemMemRegionSize;
u32 kextSize = (u32)(__end__ - __start__);
layout->systemSize -= stolenSystemMemRegionSize;
layout->baseAddr = layout->baseAddr - stolenSystemMemRegionSize + kextSize;
layout->baseSize = layout->baseSize + stolenSystemMemRegionSize - kextSize;
fcramLayout = *layout;
coreCtxs = ctxs;
@@ -313,4 +310,8 @@ void main(FcramLayout *layout, KCoreContext *ctxs)
rosalinaState = 0;
hasStartedRosalinaNetworkFuncsOnce = false;
// DSB, Flush Prefetch Buffer (more or less "isb")
__asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" :: "r" (0) : "memory");
__asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" :: "r" (0) : "memory");
}