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
+7 -1
View File
@@ -64,6 +64,8 @@ static const struct wlan_device_id g_wlan_ids[] = {
{0x168C, 0x0034, "AR9462", "ath9k"},
{0x168C, 0x0036, "AR9565", "ath9k"},
{0x168C, 0x003C, "AR9462-2", "ath9k"},
/* MediaTek (14C3) — 由 mt7920.drv 独占,wlan 不注册 */
{0x14C3, 0x7920, "MT7920", "mt7920"},
/* Broadcom (14E4) — brcmfmac 家族 */
{0x14E4, 0x43A0, "BCM4360", "brcmfmac"},
{0x14E4, 0x4365, "BCM43142", "brcmfmac"},
@@ -122,10 +124,10 @@ static void zero_bytes(void *p, u64 n) {
/* ---- 严格错误策略骨架:原生/网守后端未落地,调用即 panic ---- */
static struct dkm_log_api *g_log;
/* strict 模式 g_log->panic 不返回;fallback 模式返回,回调随后报错返回 */
static void wlan_panic(const char *sym, const char *detail) {
g_log->panic(sym);
(void)detail;
for (;;) __asm__ volatile("cli; hlt");
}
static int wlan_scan_start(void *ctx) {
@@ -192,6 +194,10 @@ int driver_init(const struct dkm_kernel_api *api,
u16 vendor = (u16)(vd & 0xffff);
u16 did = (u16)(vd >> 16);
if (vendor == 0x14C3 && did == 0x7920) {
g_log->info("[wlan] MT7920 left to mt7920.drv");
continue;
}
const struct wlan_device_id *hit = 0;
for (u32 i = 0; i < sizeof(g_wlan_ids)/sizeof(g_wlan_ids[0]); i++) {
if (g_wlan_ids[i].vendor == vendor && g_wlan_ids[i].did == did) {