Update files

This commit is contained in:
Alex 2022-10-27 03:24:08 +03:00
parent 305168a593
commit 33f95cb427
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
6 changed files with 10 additions and 13 deletions

View File

@ -6,6 +6,5 @@
EXTERNC void arm64Entry(uint64_t dtb_ptr32, uint64_t x1, uint64_t x2, uint64_t x3) EXTERNC void arm64Entry(uint64_t dtb_ptr32, uint64_t x1, uint64_t x2, uint64_t x3)
{ {
trace("Hello, World!"); trace("Hello, World!");
while (1) CPU::Halt(true);
CPU::Halt();
} }

View File

@ -46,8 +46,7 @@ extern "C" void StartCPU()
CPU::Interrupts(CPU::Enable); CPU::Interrupts(CPU::Enable);
KPrint("\e058C19CPU \e8888FF%d \e058C19is online", CoreID); KPrint("\e058C19CPU \e8888FF%d \e058C19is online", CoreID);
CPUEnabled = true; CPUEnabled = true;
while (1) CPU::Halt(true);
CPU::Halt();
} }
namespace SMP namespace SMP

View File

@ -74,8 +74,7 @@ namespace Memory
} }
error("Out of memory! (Free: %ldMB; Used: %ldMB; Reserved: %ldMB)", TO_MB(FreeMemory), TO_MB(UsedMemory), TO_MB(ReservedMemory)); error("Out of memory! (Free: %ldMB; Used: %ldMB; Reserved: %ldMB)", TO_MB(FreeMemory), TO_MB(UsedMemory), TO_MB(ReservedMemory));
while (1) CPU::Halt(true);
CPU::Halt();
return nullptr; return nullptr;
} }
@ -112,8 +111,7 @@ namespace Memory
} }
error("Out of memory! (Free: %ldMB; Used: %ldMB; Reserved: %ldMB)", TO_MB(FreeMemory), TO_MB(UsedMemory), TO_MB(ReservedMemory)); error("Out of memory! (Free: %ldMB; Used: %ldMB; Reserved: %ldMB)", TO_MB(FreeMemory), TO_MB(UsedMemory), TO_MB(ReservedMemory));
while (1) CPU::Halt(true);
CPU::Halt();
return nullptr; return nullptr;
} }

View File

@ -219,8 +219,7 @@ void KernelMainThread()
Display->SetBufferCursor(0, x, y); Display->SetBufferCursor(0, x, y);
KPrint("\e22AA11Color test finished."); KPrint("\e22AA11Color test finished.");
while (1) CPU::Halt(true);
CPU::Halt();
} }
void KernelShutdownThread(bool Reboot) void KernelShutdownThread(bool Reboot)

View File

@ -92,6 +92,5 @@ EXTERNC void Entry(BootInfo *Info)
SMP::Initialize(PowerManager->GetMADT()); SMP::Initialize(PowerManager->GetMADT());
TaskManager = new Tasking::Task((Tasking::IP)KernelMainThread); TaskManager = new Tasking::Task((Tasking::IP)KernelMainThread);
KPrint("\e058C19######## \eE85230END \e058C19########"); KPrint("\e058C19######## \eE85230END \e058C19########");
while (1) CPU::Halt(true);
CPU::Halt();
} }

View File

@ -327,6 +327,7 @@ namespace Tasking
#elif defined(__i386__) #elif defined(__i386__)
__attribute__((no_stack_protector)) bool Task::FindNewProcess(void *CPUDataPointer) __attribute__((no_stack_protector)) bool Task::FindNewProcess(void *CPUDataPointer)
{ {
fixme("unimplemented");
} }
__attribute__((no_stack_protector)) void Task::OnInterruptReceived(void *Frame) __attribute__((no_stack_protector)) void Task::OnInterruptReceived(void *Frame)
@ -337,6 +338,7 @@ namespace Tasking
#elif defined(__aarch64__) #elif defined(__aarch64__)
__attribute__((no_stack_protector)) bool Task::FindNewProcess(void *CPUDataPointer) __attribute__((no_stack_protector)) bool Task::FindNewProcess(void *CPUDataPointer)
{ {
fixme("unimplemented");
} }
__attribute__((no_stack_protector)) void Task::OnInterruptReceived(void *Frame) __attribute__((no_stack_protector)) void Task::OnInterruptReceived(void *Frame)
@ -353,7 +355,8 @@ namespace Tasking
CPUData->CurrentThread->ExitCode = Code; CPUData->CurrentThread->ExitCode = Code;
debug("parent:%s tid:%d, code:%016p", CPUData->CurrentProcess->Name, CPUData->CurrentThread->ID, Code); debug("parent:%s tid:%d, code:%016p", CPUData->CurrentProcess->Name, CPUData->CurrentThread->ID, Code);
trace("Exiting thread %d(%s)...", CPUData->CurrentThread->ID, CPUData->CurrentThread->Name); trace("Exiting thread %d(%s)...", CPUData->CurrentThread->ID, CPUData->CurrentThread->Name);
CPU::Stop(); OneShot(CPUData->CurrentThread->Info.Priority);
CPU::Halt(true);
} }
PCB *Task::GetCurrentProcess() PCB *Task::GetCurrentProcess()