mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-07 09:54:47 -04:00
thermosphere: fix x18 init, etc.
This commit is contained in:
parent
3fa9133814
commit
a11b0b6e0e
5 changed files with 35 additions and 26 deletions
|
@ -16,9 +16,23 @@
|
|||
|
||||
#include "core_ctx.h"
|
||||
|
||||
// start.s
|
||||
extern uintptr_t g_initialKernelEntrypoint;
|
||||
|
||||
// Prevents it from being put in BSS
|
||||
CoreCtx g_coreCtxs[4] = {
|
||||
{ .coreId = 0 },
|
||||
{ .coreId = 1 },
|
||||
{ .coreId = 2 },
|
||||
{ .coreId = 3 },
|
||||
};
|
||||
|
||||
void coreCtxInit(u32 coreId, bool isColdbootCore, u64 argument)
|
||||
{
|
||||
currentCoreCtx = &g_coreCtxs[coreId];
|
||||
currentCoreCtx->isColdbootCore = isColdbootCore;
|
||||
currentCoreCtx->kernelArgument = argument;
|
||||
if (isColdbootCore) {
|
||||
currentCoreCtx->kernelEntrypoint = g_initialKernelEntrypoint;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue