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 --- rsdos/src/main.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'rsdos/src') diff --git a/rsdos/src/main.rs b/rsdos/src/main.rs index d9578e2..c35d88f 100644 --- a/rsdos/src/main.rs +++ b/rsdos/src/main.rs @@ -141,6 +141,19 @@ pub extern "efiapi" fn efi_main(image_handle: Handle, system_table: *mut SystemT rsnix::serial_println!("pg: self-test FAILED"); } + let t = rsnix::rtc::now(); + rsnix::serial_println!( + "rtc: {}-{:02}-{:02} {:02}:{:02}:{:02}", + t.year, + t.month, + t.day, + t.hour, + t.minute, + t.second + ); + let devices = rsnix::pci::probe(); + rsnix::serial_println!("pci: {} device(s) on all buses", devices.len()); + rsnix::serial_println!("boot: entering shell"); shell::run(); } -- cgit v1.2.3