feat: B7 APIC/IOAPIC接管 + NVMe写路径 + virtio_net virtqueue + PE兼容层修复 + QEMU测试套件全自动化

中断路由 (B7):
- apic.drv: LAPIC enable + IOAPIC重定向表编程(MADT ISO感知) + apic_route/apic_route_legacy/apic_diag开关
- UTSM: LAPIC EOI钩子(register_apic_eoi, ABI尾部追加) + IDT 0-255全覆盖 + spurious 0xFF特判
- FUCK: apic_route=0默认PIC(零回归) / =1 IOAPIC->LAPIC接管(失败完整降级) / legacy放开IRQ1/12/11

存储:
- nvme.drv: 写路径 + PRP list + 读回校验 + MSI/MSI-X中断驱动(nvme_msi开关, 回退纯轮询)
- build.ps1: apic.drv纳入构建(原为预置二进制)

网络:
- virtio_net: virtqueue RX/TX + netdev注册 + DHCP自测(slirp真实OFFER)

PE兼容层:
- pe_shim: guest->host指针转换(g_emu_mem_base + gp()) + shim fn32列补齐
- gen_pe.py: PE32+ RVA偏置修复(BUG-004) + cmd.exe生成
- desktop_app.h: da_mouse_poll先判AUX位 + da_mouse_init冲刷残留(BUG-003/008)
- shell: Ctrl修饰键跟踪(BUG-001) + g_run_image扩至1MB(BUG-002)

QEMU测试套件:
- 9用例全自动化(Run-All.ps1): boot-regression/driver-matrix/linux-compat/pe-compat/deaicup-e2e/userapps-matrix/network-e2e/performance-baseline/x86emu32-coverage
- QemuTest.ps1公共库: 串口断言/monitor sendkey/screendump/HTTP服务器/并发隔离

文档:
- CLAUDE.md: APIC/IOAPIC能力 + kernel_api暴露 + IRQ后端升级状态
- LESSONS_LEARNED.md: B7 LAPIC/IOAPIC经验教训(2条)
- Bug记录.txt: BUG-20260801-001~008 + BUG-20260803-009(9条)
- test-cases/*.md: 全部补充自动化脚本小节
- 桌面设计.md: .lnk快捷方式 + LINUXAPP.CNF Linux应用图标
- 系统开发策划.md: NVMe/virtio_net标完成 + B2/B7标已解决 + M2进度列
This commit is contained in:
xyou
2026-08-04 18:08:08 +08:00
parent f52157b7af
commit a26866e339
70 changed files with 4652 additions and 504 deletions
+34
View File
@@ -70,6 +70,40 @@ shell → run CURL.ELF → curl.elf
| 窗口拖动 | 流畅,无撕裂 | ⬜ |
| 任务栏点击 | 窗口切换 | ⬜ |
## 自动化脚本
[tests/qemu/userapps-matrix.ps1](../../../tests/qemu/userapps-matrix.ps1) dev_mode 单会话覆盖
shell 内建命令与工具程序(dev_mode 串口镜像开启,全程可断言):
```powershell
.\tests\qemu\userapps-matrix.ps1 # 复用现有镜像
.\tests\qemu\userapps-matrix.ps1 -Build # 先全量构建再测
```
自动断言(两阶段,单会话;2026-08-04 BUG-20260801-001/002/003/008 全部修复后,
原 MANUAL 降级项已回收为自动化):
1. **dev_tests 硬编码序列**:`[DSK:SCHED] decision: dev_mode -> shell.elf` →
`[1] ls` → `[2] echo>` → `[3] cat` → `[4] cp` → `[6] mv` → `[8] rm` → `[10] ls`
→ `=== 自动测试完成 ===`(SATA 镜像无 test.bas 时走 fallback 分支)。
2. **交互阶段**(monitor sendkey 驱动):`help` → `id`(断言 `uid=0(root) gid=0(root)`,
BUG-001 修复回归守护)→ `pci` 存活验证 →
`ping`(PATH 查找 `/bin/PING.ELF` → `[ping] boot`,输入 10.0.2.2 发四报文,
Esc → `[ping] exit` → `[shell] path: tool returned`)→
`run EDITOR.ELF`(`[editor] boot` → 按键插入 → Esc → `[editor] exit`,
BUG-002 修复后行为,原"超限优雅拒绝"断言已升级)→
`run FILEMAN.ELF`(`[fileman] boot` → 方向键选区移动 → Esc → `[fileman] exit`,
BUG-003/008 修复后键盘路径)→
`run BROWSER.ELF`(`[browser] boot` → Esc → `[browser] exit`)→
Esc 回 DSK → cmd(AUTOEXEC=ver/exit) → `desktop ready`。
锚点:`[shell] path: running /bin/ tool` / `[shell] path: tool returned` /
`[shell] run: jumping to tool` / `[shell] run: tool returned` /
`[ping|editor|fileman|browser] boot|exit`。
标 MANUAL 项(帧缓冲限定,无串口锚点):ping ICMP reply/RTT 与四报文统计、
editor 编辑内容渲染与保存、fileman 列表渲染/进入子目录;
FirstInit/login/desktop UI(双击/拖动/任务栏,boot-regression B1 已覆盖向导按键)。
## 已知问题
- fileman.elf 之前触发过 QEMU 退出(访问未支持 boot context 字段),需观察是否复现