feature: add mkdocs-material documentation site with CI deployment
Generate comprehensive documentation for all 173 source units and integrate mkdocs-material into the build toolchain. Documentation covers kernel core, x86 architecture, drivers, applications, and all subsystems with a tabbed navigation structure. - Add mkdocs.yml with material theme, mermaid support, and tabbed nav - Add doc/index.md landing page - Generate doc/src/ markdown for every Pascal unit in src/ - Reorganize planning docs into doc/planning/ - Add compat, lvglh, and toolchain doc sections - Update Dockerfile to install python3 and mkdocs-material (pinned <2) - Replace pasdoc-based compile_docs.sh with mkdocs build --strict - Add compile_docs.sh to the main build pipeline in compile.sh - Add deploy-docs step in .drone.yml with host volume mount to nginx - Add site/.gitkeep for build output directory
This commit is contained in:
1 parent
7157a57513
commit
26e2fd947e
209 files changed
+16996
-13
No files matched your search
@@ -0,0 +1,43 @@
|
||||
# arch.x86.panic
|
||||
|
||||
x86-specific kernel panic bridge between the interrupt frame and the architecture-agnostic panic engine.
|
||||
|
||||
## Overview
|
||||
|
||||
This unit acts as the glue layer between the x86 interrupt subsystem and the architecture-neutral `core.panic` module. When a fatal CPU exception occurs, the fault handler calls `x86_panic`, which reads the saved register state from the global interrupt frame variables (`IntReg`, `IntErr`, `IntSpec`), packs it into a `TRegisterSnapshot`, and delegates to `core.panic.panic` for display and halt. The `init` procedure registers the x86-specific halt function and initialises the BSOD screen.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `core.panic` (interface)
|
||||
- `arch.x86.util` (implementation)
|
||||
- `arch.x86.isr.types` (implementation)
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
|
||||
```pascal
|
||||
procedure init;
|
||||
```
|
||||
|
||||
Registers `arch.x86.util.halt_and_catch_fire` as the halt callback with `core.panic`, then calls `core.panic.init` to set up the BSOD display. Must be called after LVGL is initialised and before any fault handlers that may trigger a panic.
|
||||
|
||||
### x86_panic
|
||||
|
||||
```pascal
|
||||
procedure x86_panic(fault : pchar; info : pchar);
|
||||
```
|
||||
|
||||
Builds a `TRegisterSnapshot` from the current interrupt frame globals and invokes `core.panic.panic`.
|
||||
|
||||
- `fault` — Short fault identifier string (e.g., `'arch.x86.fault.gpf'`).
|
||||
- `info` — Human-readable description (e.g., `'General Protection Fault.'`).
|
||||
|
||||
The snapshot includes, in order: EBP, EAX, EBX, ECX, EDX, ESI, EDI, DS, ES, FS, GS (from `IntReg`), ERROR (from `IntErr`), and EIP, CS, EFLAGS (from `IntSpec`). Fields whose corresponding pointer is `nil` are omitted.
|
||||
|
||||
Must be called after `correctInterruptRegisters()` has been called by the ISR wrapper so that `IntReg`, `IntErr`, and `IntSpec` point to the correct offsets within the saved interrupt frame.
|
||||
|
||||
## Notes
|
||||
|
||||
- The `addEntry` helper is internal and not exported. It appends one name–value pair to the snapshot, respecting the `MAX_REGISTER_ENTRIES` limit defined in `core.panic`.
|
||||
- Whether `IntErr` contains a meaningful error code depends on the exception type. Faults that do not push an error code should call `correctInterruptRegisters(false)` before `x86_panic`, which causes `IntErr` to point to a zero-filled sentinel value.
|
||||
Reference in new issue
Block a user