feat: add kernel ACPI support for querying battery percentage, add battery indicator to desktop, move log state to 0:/state directory
This commit is contained in:
1 parent
0a18b2cf2d
commit
e641500b40
34 files changed
+2461
-100
No files matched your search
@@ -42,10 +42,21 @@ static void PrintGPFInfo(System::PanicFrame*& frame) {
|
||||
PrintBoxedDec(kerr, "Error Code", gpf->GeneralProtectionFaultError, BoxWidth);
|
||||
}
|
||||
|
||||
// Link-time base of the kernel image (see linker-x86_64.ld).
|
||||
static constexpr uint64_t KernelBaseVirt = 0xFFFFFFFF80000000ULL;
|
||||
|
||||
static void PrintRegisters(System::PanicFrame* frame) {
|
||||
PrintBoxedSeparator(kerr, BoxWidth);
|
||||
PrintBoxedLine(kerr, "Registers:", BoxWidth, true);
|
||||
PrintBoxedHex(kerr, "Instruction Pointer", frame->IP, BoxWidth);
|
||||
|
||||
// The absolute address means nothing without the link map. Its offset from
|
||||
// the kernel's load base is what `nm bin-x86_64/kernel` can be searched
|
||||
// for directly, so print that next to it.
|
||||
if (frame->IP >= KernelBaseVirt)
|
||||
PrintBoxedHex(kerr, " kernel+", frame->IP - KernelBaseVirt, BoxWidth);
|
||||
|
||||
|
||||
PrintBoxedHex(kerr, "Code Segment", frame->CS, BoxWidth);
|
||||
PrintBoxedHex(kerr, "Flags", frame->Flags, BoxWidth);
|
||||
PrintBoxedHex(kerr, "Stack Pointer", frame->SP, BoxWidth);
|
||||
|
||||
Reference in new issue
Block a user