support non-debug-mode (#1347)

This commit is contained in:
water111
2022-04-30 14:55:13 -04:00
committed by GitHub
parent 3ed009924f
commit 347572d9df
14 changed files with 88 additions and 33 deletions
+4 -4
View File
@@ -40,7 +40,7 @@ char DebugBootMessage[64];
MasterConfig masterConfig;
// Set to 1 to kill GOAL kernel
u32 MasterExit;
RuntimeExitStatus MasterExit;
// Set to 1 to enable debug heap
u32 MasterDebug;
@@ -57,7 +57,7 @@ void kboot_init_globals() {
strcpy(DebugBootLevel, "#f"); // no specified level
strcpy(DebugBootMessage, "play"); // play mode, the default retail mode
MasterExit = 0;
MasterExit = RuntimeExitStatus::RUNNING;
MasterDebug = 1;
MasterUseKernel = 1;
DebugSegment = 1;
@@ -144,7 +144,7 @@ s32 goal_main(int argc, const char* const* argv) {
void KernelCheckAndDispatch() {
u64 goal_stack = u64(g_ee_main_mem) + EE_MAIN_MEM_SIZE - 8;
while (!MasterExit) {
while (MasterExit == RuntimeExitStatus::RUNNING) {
// try to get a message from the listener, and process it if needed
Ptr<char> new_message = WaitForMessageAndAck();
if (new_message.offset) {
@@ -198,5 +198,5 @@ void KernelCheckAndDispatch() {
* DONE, EXACT
*/
void KernelShutdown() {
MasterExit = 2; // GOAL Kernel Dispatch loop will stop now.
MasterExit = RuntimeExitStatus::EXIT; // GOAL Kernel Dispatch loop will stop now.
}