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
+10 -6
View File
@@ -21,11 +21,9 @@ static void dkm_api_error(const char *msg) {
}
static void dkm_api_panic(const char *msg) {
/* F1: 驱动 panic 统一走莲花崩溃屏(串口 dump + DRR 归档 + 帧缓冲) */
/* F1: 驱动 panic 统一走莲花崩溃屏(串口 dump + DRR 归档 + 帧缓冲)。
* fallback 模式下返回驱动,由驱动调用点走其备用路径。 */
panic_full("DKM-PANIC", msg, 0);
for (;;) {
__asm__ volatile("cli; hlt");
}
}
static const dkm_log_api g_log_api = {
@@ -85,7 +83,8 @@ static dkm_kernel_api g_kernel_api = {
.mm_unmap_mmio = 0,
.register_apic_eoi = 0,
.sched = 0,
.kapi = 0
.kapi = 0,
.bus = 0
};
const dkm_kernel_api *dkm_get_kernel_api(void) {
@@ -142,6 +141,11 @@ extern volatile struct limine_module_request g_module_request;
extern volatile struct limine_hhdm_request g_hhdm_request;
void dkm_fill_platform_info(void) {
/* D6 万物互联:总线先播种再挂载(必须先于一切驱动加载——
* driver_init 里即可 api->bus->register_service)。 */
dkm_bus_init();
g_kernel_api.bus = dkm_bus_get_api();
g_kernel_api.dma = dma_get_api();
g_kernel_api.net = net_get_api();
g_kernel_api.block = block_get_api();
@@ -206,4 +210,4 @@ void dkm_sipi_wake_ap(u32 lapic_id, u64 entry_eip) {
(void)lapic_id; (void)entry_eip;
panic_full("DKM-E03 SIPI AP WAKE NOT IMPLEMENTED",
"AP startup framework: designed, not implemented (BSP-only)", 0);
}
}