diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-31 16:10:40 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-31 16:10:40 +0200 |
| commit | 8b1c1a23382806fcdbd3dbc7336a6ac2da8a995b (patch) | |
| tree | 5d7b039a1baf289638d34b6e2d66c81ba9117560 /rsdos/src | |
| parent | style: rustfmt field alignment in RuntimeServices (diff) | |
| download | rs-dos-8b1c1a23382806fcdbd3dbc7336a6ac2da8a995b.tar.gz rs-dos-8b1c1a23382806fcdbd3dbc7336a6ac2da8a995b.zip | |
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
Diffstat (limited to '')
| -rw-r--r-- | rsdos/src/main.rs | 13 |
1 files changed, 13 insertions, 0 deletions
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 | |||
| 141 | rsnix::serial_println!("pg: self-test FAILED"); | 141 | rsnix::serial_println!("pg: self-test FAILED"); |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | let t = rsnix::rtc::now(); | ||
| 145 | rsnix::serial_println!( | ||
| 146 | "rtc: {}-{:02}-{:02} {:02}:{:02}:{:02}", | ||
| 147 | t.year, | ||
| 148 | t.month, | ||
| 149 | t.day, | ||
| 150 | t.hour, | ||
| 151 | t.minute, | ||
| 152 | t.second | ||
| 153 | ); | ||
| 154 | let devices = rsnix::pci::probe(); | ||
| 155 | rsnix::serial_println!("pci: {} device(s) on all buses", devices.len()); | ||
| 156 | |||
| 144 | rsnix::serial_println!("boot: entering shell"); | 157 | rsnix::serial_println!("boot: entering shell"); |
| 145 | shell::run(); | 158 | shell::run(); |
| 146 | } | 159 | } |
