mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Update files
This commit is contained in:
parent
305168a593
commit
33f95cb427
@ -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();
|
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
@ -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();
|
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user