feature: add architecture-agnostic kernel panic (BSOD) engine
Introduce core.panic, a new architecture-agnostic kernel panic engine with a pre-allocated LVGL BSOD screen. The screen and all widgets are created at init time so that zero LVGL allocation occurs at panic time. Layout features: - Top banner with decoded teapot TGA image (128x128) and title/subtitle - Two-column content area with dark semi-transparent cards: - Left: Fault Details, CPU Registers, Process Info, System Info - Right: Call Stack (full height) - Pastel red background (#7A2828), monospace text for data sections Key changes: - Add core.panic.pas with pre-built BSOD screen, register/trace/system info formatting, hex conversion helpers, and syslog fallback - Add arch.x86.panic.pas as the x86 bridge: packs interrupt registers into a TRegisterSnapshot and calls core.panic.panic() - Simplify all 19 x86 fault handlers to one-liner panic calls - Remove legacy BSOD code from arch.x86.util.pas - Add teapot.tga (256x256) embedded via splash_tga.asm - Add LVGL bindings: lv_refr_now, lv_image_create, lv_image_set_src, lv_image_set_scale, lv_image_set_inner_align, and style helpers - Wire up panic init and test command in asuro.pas
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 256 KiB |
@@ -0,0 +1,84 @@
|
||||
{
|
||||
arch.x86.panic - x86-specific kernel panic bridge.
|
||||
|
||||
Reads the saved interrupt register state (IntReg, IntErr, IntSpec)
|
||||
and packs it into a TRegisterSnapshot, then delegates to
|
||||
core.panic.panic() for architecture-agnostic display and halt.
|
||||
|
||||
@author(Kieron Morris <[email protected]>)
|
||||
}
|
||||
unit arch.x86.panic;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
core.panic;
|
||||
|
||||
{ Register the x86 halt procedure with core.panic. Call after LVGL init. }
|
||||
procedure init;
|
||||
|
||||
{ Build a register snapshot from IntReg/IntErr/IntSpec and trigger panic.
|
||||
Must be called AFTER correctInterruptRegisters(). }
|
||||
procedure x86_panic(fault : pchar; info : pchar);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
arch.x86.util,
|
||||
arch.x86.isr.types;
|
||||
|
||||
{ Helper: add a register entry to the snapshot and increment count. }
|
||||
procedure addEntry(var snap : TRegisterSnapshot; name : pchar; value : uint32);
|
||||
begin
|
||||
if snap.Count < MAX_REGISTER_ENTRIES then begin
|
||||
snap.Entries[snap.Count].Name := name;
|
||||
snap.Entries[snap.Count].Value := value;
|
||||
Inc(snap.Count);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure x86_panic(fault : pchar; info : pchar);
|
||||
var
|
||||
snap : TRegisterSnapshot;
|
||||
begin
|
||||
snap.Count := 0;
|
||||
|
||||
{ Pack general-purpose registers from the saved interrupt frame }
|
||||
if IntReg <> nil then begin
|
||||
addEntry(snap, 'EBP', IntReg^.EBP);
|
||||
addEntry(snap, 'EAX', IntReg^.EAX);
|
||||
addEntry(snap, 'EBX', IntReg^.EBX);
|
||||
addEntry(snap, 'ECX', IntReg^.ECX);
|
||||
addEntry(snap, 'EDX', IntReg^.EDX);
|
||||
addEntry(snap, 'ESI', IntReg^.ESI);
|
||||
addEntry(snap, 'EDI', IntReg^.EDI);
|
||||
addEntry(snap, 'DS', uint32(IntReg^.DS));
|
||||
addEntry(snap, 'ES', uint32(IntReg^.ES));
|
||||
addEntry(snap, 'FS', uint32(IntReg^.FS));
|
||||
addEntry(snap, 'GS', uint32(IntReg^.GS));
|
||||
end;
|
||||
|
||||
{ Error code }
|
||||
if IntErr <> nil then
|
||||
addEntry(snap, 'ERROR', IntErr^.Error);
|
||||
|
||||
{ Special registers (EIP, CS, EFLAGS) }
|
||||
if IntSpec <> nil then begin
|
||||
addEntry(snap, 'EIP', IntSpec^.EIP);
|
||||
addEntry(snap, 'CS', IntSpec^.CS);
|
||||
addEntry(snap, 'EFLAGS', IntSpec^.EFLAGS);
|
||||
end;
|
||||
|
||||
core.panic.panic(fault, info, @snap);
|
||||
end;
|
||||
|
||||
procedure init;
|
||||
begin
|
||||
{ Register x86 halt as the panic halt procedure }
|
||||
core.panic.registerHaltProc(@arch.x86.util.halt_and_catch_fire);
|
||||
|
||||
{ Initialize the BSOD LVGL screen }
|
||||
core.panic.init;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -28,8 +28,7 @@ unit arch.x86.util;
|
||||
interface
|
||||
|
||||
uses
|
||||
arch.x86.bda,
|
||||
debug.tracer;
|
||||
arch.x86.bda;
|
||||
|
||||
function INTE : boolean;
|
||||
procedure CLI();
|
||||
@@ -48,7 +47,6 @@ procedure __SSE_128_memcpy(source : uint32; dest : uint32);
|
||||
|
||||
procedure halt_and_catch_fire();
|
||||
procedure halt_and_dont_catch_fire();
|
||||
procedure BSOD(fault : pchar; info : pchar);
|
||||
procedure psleep(t : uint16);
|
||||
procedure sleep(seconds : uint32);
|
||||
|
||||
@@ -78,8 +76,7 @@ uses
|
||||
arch.x86.cpu,
|
||||
arch.x86.isr.types,
|
||||
driver.timer.rtc,
|
||||
driver.io.serial,
|
||||
io.syslog;
|
||||
driver.io.serial;
|
||||
|
||||
function MsSinceSystemBoot : uint64;
|
||||
begin
|
||||
@@ -415,65 +412,6 @@ begin
|
||||
RorDWord:= result;
|
||||
end;
|
||||
|
||||
procedure BSOD(fault : pchar; info : pchar);
|
||||
var
|
||||
trace : pchar;
|
||||
i : uint32;
|
||||
z : uint32;
|
||||
|
||||
begin
|
||||
if not BSOD_ENABLE then exit;
|
||||
io.syslog.writestringln('=== KERNEL PANIC ===');
|
||||
io.syslog.writestringln('ASURO DID A WHOOPSIE! :(');
|
||||
io.syslog.writestringln(' ');
|
||||
io.syslog.writestringln('Asuro encountered an error and your computer is now a teapot.');
|
||||
io.syslog.writestringln('Your data is almost certainly safe.');
|
||||
io.syslog.writestringln(' ');
|
||||
io.syslog.writestringln('Details of the fault (for those boring enough to read) are as follows: ');
|
||||
io.syslog.writestringln(' ');
|
||||
io.syslog.writestring('Fault ID: ');
|
||||
io.syslog.writestringln(fault);
|
||||
io.syslog.writestring('Fault Info: ');
|
||||
io.syslog.writestringln(info);
|
||||
io.syslog.writestringln(' ');
|
||||
if IntReg <> nil then begin
|
||||
io.syslog.writestringln('Processor Info: ');
|
||||
io.syslog.writestring(' EBP: '); io.syslog.writehex(IntReg^.EBP); io.syslog.writestring(' EAX: '); io.syslog.writehex(IntReg^.EAX); io.syslog.writestring(' EBX: '); io.syslog.writehexln(IntReg^.EBX);
|
||||
io.syslog.writestring(' ECX: '); io.syslog.writehex(IntReg^.ECX); io.syslog.writestring(' EDX: '); io.syslog.writehex(IntReg^.EDX); io.syslog.writestring(' ESI: '); io.syslog.writehexln(IntReg^.ESI);
|
||||
io.syslog.writestring(' EDI: '); io.syslog.writehex(IntReg^.EDI); io.syslog.writestring(' DS: '); io.syslog.writehex(IntReg^.DS); io.syslog.writestring(' ES: '); io.syslog.writehexln(IntReg^.ES);
|
||||
io.syslog.writestring(' FS: '); io.syslog.writehex(IntReg^.FS); io.syslog.writestring(' GS: '); io.syslog.writehex(IntReg^.GS); io.syslog.writestring(' ERROR: '); io.syslog.writehexln(IntErr^.Error);
|
||||
io.syslog.writestring(' EIP: '); io.syslog.writehex(IntSpec^.EIP); io.syslog.writestring(' CS: '); io.syslog.writehex(IntSpec^.CS); io.syslog.writestring(' EFLAGS: '); io.syslog.writehexln(IntSpec^.EFLAGS);
|
||||
io.syslog.writestringln(' ');
|
||||
end;
|
||||
debug.tracer.freeze;
|
||||
io.syslog.writestring('Call Stack: ');
|
||||
trace:= debug.tracer.get_last_trace;
|
||||
if trace <> nil then begin
|
||||
io.syslog.writestring('[-0] ');
|
||||
io.syslog.writestringln(trace);
|
||||
for i:=1 to debug.tracer.get_trace_count-1 do begin
|
||||
trace:= debug.tracer.get_trace_N(i);
|
||||
if trace <> nil then begin
|
||||
io.syslog.writestring(' [');
|
||||
io.syslog.writestring('-');
|
||||
io.syslog.writeint(i);
|
||||
io.syslog.writestring('] ');
|
||||
io.syslog.writestringln(trace);
|
||||
end else begin
|
||||
io.syslog.writestring(' [');
|
||||
io.syslog.writestring('-');
|
||||
io.syslog.writeint(i);
|
||||
io.syslog.writestring('] ');
|
||||
io.syslog.writestringln('?????????');
|
||||
end;
|
||||
end;
|
||||
end else begin
|
||||
io.syslog.writestringln('Unknown.');
|
||||
end;
|
||||
io.syslog.writestringln('=== END KERNEL PANIC ===');
|
||||
halt_and_catch_fire();
|
||||
end;
|
||||
|
||||
procedure resetSystem();
|
||||
var
|
||||
good : uint8;
|
||||
|
||||
@@ -20,7 +20,7 @@ unit arch.x86.v86;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util, io.syslog, debug.tracer, arch.x86.memory.virtual, arch.x86.gdt, arch.x86.idt, arch.x86.isr.types;
|
||||
core.util, arch.x86.util, core.panic, io.syslog, debug.tracer, arch.x86.memory.virtual, arch.x86.gdt, arch.x86.idt, arch.x86.isr.types;
|
||||
|
||||
const
|
||||
{ V86 EFLAGS: VM=1 ($20000), IOPL=3 ($3000), IF=0 }
|
||||
@@ -540,8 +540,7 @@ end;
|
||||
|
||||
procedure v86_chain_gpf; cdecl;
|
||||
begin
|
||||
BSOD('arch.x86.fault.gpf', 'General Protection Fault.');
|
||||
halt_and_catch_fire;
|
||||
core.panic.panic('arch.x86.fault.gpf', 'General Protection Fault.', nil);
|
||||
end;
|
||||
|
||||
procedure v86_gpf_isr; assembler; nostackframe;
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.ace;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(true);
|
||||
BSOD('AC', 'Alignment Check Exception.');
|
||||
io.syslog.writestringln('Alignment Check Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.ace', 'Alignment Check Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.bpe;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('BE', 'Breakpoint Exception.');
|
||||
io.syslog.writestringln('Breakpoint Exception');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.bpe', 'Breakpoint Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.btsse;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(true);
|
||||
BSOD('TSS', 'Bad TSS Exception.');
|
||||
io.syslog.writestringln('Bad TSS Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.btsse', 'Bad TSS Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.cfe;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('CF', 'Coprocessor Fault Exception.');
|
||||
io.syslog.writestringln('Coprocessor Fault Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.cfe', 'Coprocessor Fault Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.csoe;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('CSO', 'Coprocessor Seg Overrun Exception.');
|
||||
io.syslog.writestringln('Coprocessor Seg Overrun Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.csoe', 'Coprocessor Seg Overrun Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.dbge;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('DE', 'Debug Exception');
|
||||
io.syslog.writestringln('Debug Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.dbge', 'Debug Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.dbz;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('arch.x86.fault.dbz', 'Divide By Zero Exception.');
|
||||
io.syslog.writestringln('Divide by Zero Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.dbz', 'Divide By Zero Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.dfe;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(true);
|
||||
BSOD('DF', 'Double Fault.');
|
||||
io.syslog.writestringln('Double Fault.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.dfe', 'Double Fault.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.gpf;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,16 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : uint32;
|
||||
Regs : PRegisters;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(true);
|
||||
BSOD('arch.x86.fault.gpf', 'General Protection Fault.');
|
||||
io.syslog.writestringln('General Protection Fault.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.gpf', 'General Protection Fault.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.idoe;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('IDO', 'Into Detected Overflow Exception.');
|
||||
io.syslog.writestringln('IDO Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.idoe', 'Into Detected Overflow Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.iope;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('IO', 'Invalid OPCode Exception.');
|
||||
io.syslog.writestringln('Invalid OPCode Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.iope', 'Invalid OPCode Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.mce;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('MC', 'Machine Check Exception.');
|
||||
io.syslog.writestringln('Machine Check Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.mce', 'Machine Check Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.nce;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('NC', 'No Coprocessor Exception.');
|
||||
io.syslog.writestringln('No Coprocessor Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.nce', 'No Coprocessor Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.nmie;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('NMI', 'Non-Maskable Interrupt Exception.');
|
||||
io.syslog.writestringln('NMI Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.nmie', 'Non-Maskable Interrupt Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.oobe;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(false);
|
||||
BSOD('OOB', 'Out of Bouunds Exception.');
|
||||
io.syslog.writestringln('OOB Exception.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.oobe', 'Out of Bounds Exception.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
@@ -22,8 +22,8 @@ unit arch.x86.fault.pf;
|
||||
interface
|
||||
|
||||
uses
|
||||
core.util, arch.x86.util,
|
||||
io.syslog,
|
||||
arch.x86.util,
|
||||
arch.x86.panic,
|
||||
arch.x86.isr.types,
|
||||
arch.x86.isr.mgr,
|
||||
arch.x86.idt;
|
||||
@@ -33,15 +33,10 @@ procedure register();
|
||||
implementation
|
||||
|
||||
procedure Main();
|
||||
var
|
||||
i : integer;
|
||||
|
||||
begin
|
||||
CLI;
|
||||
correctInterruptRegisters(true);
|
||||
BSOD('arch.x86.fault.pf', 'Page Fault.');
|
||||
io.syslog.writestringln('Page Fault.');
|
||||
arch.x86.util.halt_and_catch_fire;
|
||||
x86_panic('arch.x86.fault.pf', 'Page Fault.');
|
||||
end;
|
||||
|
||||
procedure register();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user