feat(panic): FUCK [panic] mode=strict|fallback + realtest image variant

- UTSM panic_full returns in fallback mode (logs [PANIC:FALLBACK] + code + hit
  count); panic_halt keeps always-halt sites (CPU exception, VMM-E11 LA57,
  VMM-E15 DSK jump, UTSM-E42 test hook). Call sites given safe continuations.
- Mode passed to DSK/FirstInit/login/desktop via DSK_BOOT_FLAG_PANIC_FALLBACK;
  DKM kernel_api.panic / kern.log.panic return to driver; ext4 fatal aborts the
  op via setjmp/longjmp and DSK falls back to FAT32 ESP.
- build.ps1/Makefile: dev=strict, release=fallback, new realtest (release
  options + strict); default -Variant all; serialized iso packing under -j.
- Fix '*/' inside comments (dkm.h, kernel_api.h, bus.c) that broke the build.
- Includes pending work: dkm_bus service bus, mt7920/wlan drivers, desktop
  files/startmenu/prank, pe-tools, diskinfo, docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Linehu
2026-10-12 23:57:19 +08:00
co-authored by Cursor
parent a7e5b2bc7a
commit 8554a82677
84 changed files with 7325 additions and 484 deletions
+24 -1
View File
@@ -27,9 +27,32 @@ typedef struct panic_regs {
u64 rax, rcx, rdx, rsi, rdi, r8, r9, r10, r11;
} panic_regs;
/* 统一 panic 入口:画莲花崩溃屏 + 串口日志 + DRR 归档 + halt(不返回) */
/* ===================================================================
* panic 模式(FUCK [panic] mode=strict|fallback,默认 strict)
*
* strict :panic_full 画莲花屏 + DRR 归档 + halt,不返回(零降级铁律)。
* fallback:panic_full 只留串口坐标 + 计数后返回,调用点必须紧跟一条
* 可执行的备用路径(返回错误码 / 跳过该能力 / 回退实现)。
* 寄存器帧非空(CPU 异常)时无论模式都 halt。
*
* panic_halt 无视模式恒 halt,仅用于"没有任何可继续的状态"的终点:
* CPU 异常、LA57 激活(4 级页表 walk 会写坏内存)、DSK 交接失败、
* panic_test 演示钩子。
* =================================================================== */
/* 统一 panic 入口:strict 模式不返回;fallback 模式记录后返回 */
void panic_full(const char *symbol, const char *msg, const panic_regs *regs);
/* 恒 halt 的 panic(不受 fallback 模式影响) */
__attribute__((noreturn))
void panic_halt(const char *symbol, const char *msg, const panic_regs *regs);
/* 设置/查询 fallback 模式(kernel/main.c 读 FUCK 后设置一次) */
void panic_set_fallback(int enable);
int panic_fallback_enabled(void);
/* fallback 模式下被吞掉的 panic 次数 */
u32 panic_fallback_hits(void);
/* 兼容旧接口:panic("msg") = panic_full("UTSM-PANIC", msg, 0) */
void panic(const char *msg);