diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-17 14:53:52 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-17 14:53:52 +0200 |
| commit | be868a43185826b02bf6d091019bb779678525bb (patch) | |
| tree | 586988c15f1d700b1621c7f0208584b30878a56c /shell/src | |
| parent | v0.5.10: change em-dashes to dashes (diff) | |
| download | rs-dos-be868a43185826b02bf6d091019bb779678525bb.tar.gz rs-dos-be868a43185826b02bf6d091019bb779678525bb.zip | |
USB2/1.1 (EHCI/UHCI) drivers + real-hardware bring-up hardening
- Add polled EHCI (USB2) and UHCI (USB1.1) host-controller drivers with
HID boot mouse support, wired into cursor polling and the 'usb' shell cmd
- Add USB Legacy ownership handoff (claim_usb_legacy) plus config_write_byte
- Harden boot: verify the PIT/timer ticks before shell entry, EOI stray
interrupts in the LAPIC to stop interrupt storms, bound PS/2 controller
waits, and INTx-disable AHCI (polled driver)
- Add boot stage markers, klog screen echo, and QR lock; scheduler
mark_shell_running; NO_USB stopgap to keep BIOS USB-Legacy input alive
- alloc_pages_above for DMA buffers that must avoid low conventional memory
- Expand DEBUG_NOTES with EHCI/QEMU bring-up findings
Diffstat (limited to '')
| -rw-r--r-- | shell/src/lib.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/shell/src/lib.rs b/shell/src/lib.rs index a54f338..bb048d8 100644 --- a/shell/src/lib.rs +++ b/shell/src/lib.rs | |||
| @@ -2239,9 +2239,10 @@ fn cmd_pci(p: &Parsed) { | |||
| 2239 | } | 2239 | } |
| 2240 | 2240 | ||
| 2241 | fn cmd_usb(p: &Parsed) { | 2241 | fn cmd_usb(p: &Parsed) { |
| 2242 | // `usb rescan` clears the failed-port mask so discovery retries. | 2242 | // `usb rescan` clears the failed-port masks so discovery retries. |
| 2243 | if p.args.first().is_some_and(|w| w == "rescan") { | 2243 | if p.args.first().is_some_and(|w| w == "rescan") { |
| 2244 | rsnix::usb::rescan(); | 2244 | rsnix::usb::rescan(); |
| 2245 | rsnix::ehci::rescan(); | ||
| 2245 | let mut pipe = Pipeline::new(&p.filters, &p.output); | 2246 | let mut pipe = Pipeline::new(&p.filters, &p.output); |
| 2246 | let _ = pipe.line("usb: rescanning ports"); | 2247 | let _ = pipe.line("usb: rescanning ports"); |
| 2247 | pipe.end(); | 2248 | pipe.end(); |
| @@ -2262,6 +2263,14 @@ fn cmd_usb(p: &Parsed) { | |||
| 2262 | } | 2263 | } |
| 2263 | } | 2264 | } |
| 2264 | pipe.end(); | 2265 | pipe.end(); |
| 2266 | // UHCI (USB1.1 companion) — full/low-speed keyboards and mice. | ||
| 2267 | let mut pipe = Pipeline::new(&p.filters, &p.output); | ||
| 2268 | for l in rsnix::uhci::diagnose().lines() { | ||
| 2269 | if !pipe.line(l) { | ||
| 2270 | break; | ||
| 2271 | } | ||
| 2272 | } | ||
| 2273 | pipe.end(); | ||
| 2265 | } | 2274 | } |
| 2266 | 2275 | ||
| 2267 | fn cmd_poweroff() -> ! { | 2276 | fn cmd_poweroff() -> ! { |
