kernel: bump gitlink for i8042 verdict + TSC fixes (task 8)
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.00s
|
||||
Running unittests src/lib.rs (local/sources/kernel/host-tests/i8042-verdict/target/debug/deps/i8042_verdict_test-616736c5ad6fa945)
|
||||
|
||||
running 14 tests
|
||||
test fadt_all_possible_boot_arch_absent_patterns ... ok
|
||||
test fadt_flag_clear_ambiguous_probe_fail ... ok
|
||||
test fadt_flag_clear_absent_even_with_other_bits_zero ... ok
|
||||
test fadt_flag_clear_ambiguous_probe_pass ... ok
|
||||
test fadt_flag_clear_ambiguous_probe_timeout ... ok
|
||||
test fadt_flag_on_both_bit1_and_bit0_present ... ok
|
||||
test fadt_flag_set_bit1_ignores_probe ... ok
|
||||
test fadt_flag_set_i8042_present ... ok
|
||||
test fadt_flag_set_other_bit_i8042_absent ... ok
|
||||
test fadt_no_bits_set_probe_determines ... ok
|
||||
test ps2d_decision_is_deterministic ... ok
|
||||
test ps2d_verdict_absent_exit_0 ... ok
|
||||
test ps2d_verdict_present_full_startup ... ok
|
||||
test ps2d_verdict_unavailable_exit_0_safe_default ... ok
|
||||
|
||||
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
|
||||
|
||||
Doc-tests i8042_verdict_test
|
||||
|
||||
running 0 tests
|
||||
|
||||
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
|
||||
|
||||
|
||||
---
|
||||
## QA Fixture Design
|
||||
|
||||
### Verdict matrix host tests (GREEN — 14/14)
|
||||
All combinations of FADT BOOT_ARCH flags × active probe result are covered.
|
||||
The verdict function mirror at `host-tests/i8042-verdict/src/lib.rs:30` matches
|
||||
the kernel logic in `src/acpi/i8042.rs:74-97` line-for-line.
|
||||
|
||||
### QEMU regression (orchestrator runs after commit):
|
||||
1. **i8042 present (QEMU default):** QEMU exposes a PS/2 controller.
|
||||
- Build `redbear-mini` → boot → `ps2d` reads `/scheme/serio/present` → "1" → full startup.
|
||||
- Keyboard input works via `serio:0`.
|
||||
- No spurious exit-0 lines.
|
||||
|
||||
2. **i8042 absent (QA-only fixture — not shipped):** Kernel built with
|
||||
`IA_PC_BOOT_ARCH` cleared in the FADT fixture + `redbear-mini` built against
|
||||
that kernel.
|
||||
- Boot → kernel does NOT wire IRQ1/12.
|
||||
- `ps2d` reads `/scheme/serio/present` → "0" → logs ONE info line
|
||||
"no PS/2 controller present; USB HID is the input path" and exits 0.
|
||||
- Init continues to login on USB HID (usbhidd).
|
||||
- Zero spurious serio input events.
|
||||
|
||||
3. **False-positive prevention (QA scenario):** Floating legacy I/O ports
|
||||
(no hardware), FADT flag clear → verdict absent. Even if a spurious probe
|
||||
returned transient data, the FADT flag takes precedence when present.
|
||||
|
||||
### Test harness
|
||||
Single command (no build needed):
|
||||
cargo test --manifest-path local/sources/kernel/host-tests/i8042-verdict/Cargo.toml
|
||||
|
||||
---
|
||||
## Files Changed
|
||||
|
||||
### Kernel fork (`local/sources/kernel/`, submodule/kernel):
|
||||
- `src/acpi/fadt.rs` — ADD: IA_PC_BOOT_ARCH static + parsing (offset 109,
|
||||
bit 1 = I8042), accessor `ia_pc_boot_arch()`, FADT_MIN_SIZE_ACPI_5_0
|
||||
- `src/acpi/i8042.rs` — NEW: i8042 presence verdict logic (FADT flag +
|
||||
bounded active probe at ports 0x60/0x64), AtomicBool static `I8042_PRESENT`,
|
||||
public `i8042_present()` + `init_i8042_verdict()`
|
||||
- `src/acpi/mod.rs` — ADD: `pub mod i8042`, call `fadt::init()` +
|
||||
`i8042::init_i8042_verdict()` in `init_after_mem`
|
||||
- `src/scheme/serio.rs` — ADD: `HandleKind::Present`, path "present" in
|
||||
`kopenat`, `kread` returns "1\n"/"0\n", `kfpath` returns "serio:present"
|
||||
- `src/arch/x86_shared/interrupt/irq.rs` — MODIFY: `keyboard` (IRQ1) and
|
||||
`mouse` (IRQ12) handlers check `i8042_present()` — EOI only when absent
|
||||
|
||||
### Base fork (`local/sources/base/`, submodule/base):
|
||||
- `drivers/input/ps2d/src/main.rs` — ADD: presence check via
|
||||
`/scheme/serio/present` before opening serio devices; if absent, log ONE
|
||||
info line and `process::exit(0)`
|
||||
|
||||
### Host tests:
|
||||
- `host-tests/i8042-verdict/Cargo.toml` — NEW standalone test crate
|
||||
- `host-tests/i8042-verdict/src/lib.rs` — NEW: 14 tests (10 verdict matrix
|
||||
+ 4 ps2d decision table)
|
||||
|
||||
### NOT CHANGED (per MUST NOT DO):
|
||||
- No config TOML modified (ps2d stays in all redbear-* configs)
|
||||
- No BINS entries removed
|
||||
- No init service files changed
|
||||
- No usbhidd gated on ps2d
|
||||
- No unwrap()/expect() in kernel code
|
||||
- No `src/scheme/irq.rs` cpu- path handling touched
|
||||
- No retries/warning noise on absence
|
||||
- No recipe files modified
|
||||
+1
-1
Submodule local/sources/kernel updated: 46ea4facf4...088ab2dd67
Reference in New Issue
Block a user