mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-18 16:32:05 +00:00
thermosphere: pause at start, some cleanup, etc.
This commit is contained in:
parent
7a774adbc3
commit
66ba05b302
4 changed files with 7 additions and 13 deletions
|
@ -79,6 +79,7 @@ void debugManagerInit(TransportInterfaceType gdbIfaceType, u32 gdbIfaceId, u32 g
|
||||||
{
|
{
|
||||||
memset(&g_debugManager, 0, sizeof(DebugManager));
|
memset(&g_debugManager, 0, sizeof(DebugManager));
|
||||||
GDB_InitializeContext(&g_gdbContext, gdbIfaceType, gdbIfaceId, gdbIfaceFlags);
|
GDB_InitializeContext(&g_gdbContext, gdbIfaceType, gdbIfaceId, gdbIfaceFlags);
|
||||||
|
GDB_MigrateRxIrq(&g_gdbContext, BIT(currentCoreCtx->coreId));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool debugManagerHandlePause(void)
|
bool debugManagerHandlePause(void)
|
||||||
|
@ -95,8 +96,7 @@ bool debugManagerHandlePause(void)
|
||||||
|
|
||||||
if (!g_debugManager.debugEventInfos[coreId].handled) {
|
if (!g_debugManager.debugEventInfos[coreId].handled) {
|
||||||
// Do we still have an unhandled debug event?
|
// Do we still have an unhandled debug event?
|
||||||
// TODO build
|
GDB_TrySignalDebugEvent(&g_gdbContext, &g_debugManager.debugEventInfos[coreId]);
|
||||||
//GDB_TrySignalDebugEvent(&g_gdbContext, &g_debugManager.debugEventInfos[coreId]);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ void debugManagerReportEvent(DebugEventType type, ...)
|
||||||
exceptionEnterInterruptibleHypervisorCode();
|
exceptionEnterInterruptibleHypervisorCode();
|
||||||
unmaskIrq();
|
unmaskIrq();
|
||||||
|
|
||||||
// TODO GDB_TrySignalDebugEvent(&g_gdbContext, info);
|
GDB_TrySignalDebugEvent(&g_gdbContext, info);
|
||||||
|
|
||||||
restoreInterruptFlags(flags);
|
restoreInterruptFlags(flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,13 +108,6 @@ static int GDB_ProcessPacket(GDBContext *ctx, size_t len)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((oldFlags & GDB_FLAG_CONTINUING) && !(ctx->flags & GDB_FLAG_CONTINUING)) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
else if (!(oldFlags & GDB_FLAG_CONTINUING) && (ctx->flags & GDB_FLAG_CONTINUING)) {
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +138,6 @@ static void GDB_Disconnect(GDBContext *ctx)
|
||||||
ctx->processExited = false;
|
ctx->processExited = false;
|
||||||
|
|
||||||
ctx->noAckSent = false;
|
ctx->noAckSent = false;
|
||||||
// TODO memset(&ctx->latestDebugEvent, 0, sizeof(DebugEventInfo));
|
|
||||||
|
|
||||||
ctx->currentHioRequestTargetAddr = 0;
|
ctx->currentHioRequestTargetAddr = 0;
|
||||||
memset(&ctx->currentHioRequest, 0, sizeof(PackedGdbHioRequest));
|
memset(&ctx->currentHioRequest, 0, sizeof(PackedGdbHioRequest));
|
||||||
|
|
|
@ -88,7 +88,7 @@ GDB_DECLARE_QUERY_HANDLER(Supported)
|
||||||
// TODO!
|
// TODO!
|
||||||
return GDB_SendFormattedPacket(ctx,
|
return GDB_SendFormattedPacket(ctx,
|
||||||
"PacketSize=%x;"
|
"PacketSize=%x;"
|
||||||
"qXfer:features:read+;qXfer:osdata:read+;"
|
"qXfer:features:read+;"
|
||||||
"QStartNoAckMode+;QThreadEvents+"
|
"QStartNoAckMode+;QThreadEvents+"
|
||||||
"vContSupported+;swbreak+;hwbreak+",
|
"vContSupported+;swbreak+;hwbreak+",
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ void thermosphereMain(ExceptionStackFrame *frame, u64 pct)
|
||||||
if (currentCoreCtx->isBootCore) {
|
if (currentCoreCtx->isBootCore) {
|
||||||
transportInterfaceInitLayer();
|
transportInterfaceInitLayer();
|
||||||
debugLogInit();
|
debugLogInit();
|
||||||
test();
|
//test();
|
||||||
debugManagerInit(TRANSPORT_INTERFACE_TYPE_UART, DEFAULT_UART, DEFAULT_UART_FLAGS);
|
debugManagerInit(TRANSPORT_INTERFACE_TYPE_UART, DEFAULT_UART, DEFAULT_UART_FLAGS);
|
||||||
DEBUG("EL2: core %u reached main first!\n", currentCoreCtx->coreId);
|
DEBUG("EL2: core %u reached main first!\n", currentCoreCtx->coreId);
|
||||||
}
|
}
|
||||||
|
@ -136,5 +136,7 @@ void thermosphereMain(ExceptionStackFrame *frame, u64 pct)
|
||||||
|
|
||||||
if (!currentCoreCtx->isBootCore) {
|
if (!currentCoreCtx->isBootCore) {
|
||||||
debugManagerReportEvent(DBGEVENT_CORE_ON);
|
debugManagerReportEvent(DBGEVENT_CORE_ON);
|
||||||
|
} else {
|
||||||
|
debugManagerPauseCores(BIT(currentCoreCtx->coreId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue