From 8b1c1a23382806fcdbd3dbc7336a6ac2da8a995b Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 31 Jul 2026 16:10:40 +0200 Subject: rtc + pci: CMOS clock with date command, PCI bus enumeration - rtc.rs: read the PC RTC via CMOS ports 0x70/0x71 (UIP wait, BCD/12h normalization, century sanity-check with 2000+ fallback); boot prints the wall clock, shell gains 'date' - pci.rs: legacy config-space access (0xCF8/0xCFC) with full enumeration of buses 0-255; boot reports device count, shell gains 'pci' (lspci style listing with class names) - QEMU q35 verified: Q35 host bridge, stdvga, e1000, ICH9 LPC --- CONTEXT.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 0074969..8ee7f6c 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -96,6 +96,8 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown: allocator), bitmap page allocator - `paging.rs` — identity page-table helpers (map/unmap/query, large-page split) - `power.rs` — `ResetSystem`-based shutdown, hlt loop fallback +- `rtc.rs` — CMOS/RTC clock (ports 0x70/0x71), BCD/12h normalization +- `pci.rs` — legacy PCI config space (0xCF8/0xCFC), full enumeration - `gop.rs` — framebuffer access and text rendering - `font.rs` — 8×16 bitmap font data - `ps2.rs` — PS/2 keyboard driver (polling) @@ -120,6 +122,8 @@ Single Rust crate (`x86_64-unknown-uefi` target). Module breakdown: ✅ **Shell** — `mmap` dumps the UEFI map, `stress` exercises alloc/free + growth ✅ **Poweroff** — `poweroff`/`exit` shut down via UEFI `ResetSystem` (ACPI S5; `halt` keeps the plain hlt loop) +✅ **RTC** — CMOS clock read at boot and via `date` (BCD/12h handled) +✅ **PCI** — port-based config access, full bus enumeration via `pci` ## Target audience -- cgit v1.2.3