chore(boot): 移除全部中断排查诊断(int20 测试 + T/[T]/D 打印)
定时中断已确认恢复(APIC LINT0=EXTINT)。移除 int 0x20 软件触发测试与 isr32_handler 'T'、timer_handler '[T]'、isr_default 'D' 打印,回归干净 内核,定位 sti 后新出现的 #GP(疑似 int 0x20 测试触发)。
This commit is contained in:
1 parent
3c163a5936
commit
f675540c64
4 files changed
+1
-17
No files matched your search
@@ -201,8 +201,6 @@ def isr29_handler() -> t.CExport | t.CVoid: isrCommonhandler(29)
|
||||
def isr30_handler() -> t.CExport | t.CVoid: isrCommonhandler(30)
|
||||
def isr31_handler() -> t.CExport | t.CVoid: isrCommonhandler(31)
|
||||
def isr32_handler() -> t.CExport | t.CVoid:
|
||||
# [DBG] 中断入口诊断:若打印 'T' 说明 IRQ0 到达 isr32(用后移除)
|
||||
serial.puts("T")
|
||||
timer.timer_handler()
|
||||
|
||||
def isr33_handler() -> t.CExport | t.CVoid:
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
isr_default:
|
||||
push rax
|
||||
push rdx
|
||||
mov dx, 0x3F8
|
||||
mov al, 0x44 # [DBG] 'D' = 中断向量到默认处理(用后移除)
|
||||
out dx, al
|
||||
mov al, 0x20
|
||||
out 0xA0, al
|
||||
out 0x20, al
|
||||
|
||||
@@ -81,11 +81,6 @@ class ViperKernel:
|
||||
asm.sti()
|
||||
serial.puts("[main] sti done\n")
|
||||
|
||||
# [DBG] 软件触发向量 32:验证 IDT gate 是否生效(用后移除)
|
||||
# 有 "T" → IDT 正常,问题在 PIT/PIC 硬件送达;无 "T" → IDT/lidt 问题
|
||||
c.Asm("int 0x20", op=[t.ASM_DESCR.CLOBBER_MEMORY])
|
||||
serial.puts("[main] int20 test done\n")
|
||||
|
||||
timer.timer_msleep(100)
|
||||
serial.puts("[main] msleep done\n")
|
||||
rtc.rtc_init()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import platform.pch.pic as pic
|
||||
import platform.pch.pit as pit
|
||||
import sched.sched as sched
|
||||
import drivers.serial.uart.serial as serial
|
||||
import asm
|
||||
import t, c
|
||||
|
||||
@@ -13,7 +12,6 @@ ticks: t.CStatic | t.CVolatile | t.CUInt64T = 0
|
||||
seconds: t.CStatic | t.CVolatile | t.CUInt32T = 0
|
||||
milliseconds: t.CStatic | t.CVolatile | t.CUInt32T = 0
|
||||
timer_running: t.CStatic | t.CVolatile | bool = False
|
||||
_dbg_last: t.CUInt64T = 0
|
||||
|
||||
def timer_init():
|
||||
global ticks, seconds, milliseconds, timer_running
|
||||
@@ -26,7 +24,7 @@ def timer_init():
|
||||
pit.pit_init(TIMER_FREQUENCY)
|
||||
|
||||
def timer_handler():
|
||||
global ticks, seconds, milliseconds, timer_running, _dbg_last
|
||||
global ticks, seconds, milliseconds, timer_running
|
||||
if not timer_running:
|
||||
pic.eoi(0)
|
||||
return
|
||||
@@ -37,10 +35,6 @@ def timer_handler():
|
||||
seconds = seconds + 1
|
||||
milliseconds = milliseconds - 1000
|
||||
c.Asm("mfence", op=[t.ASM_DESCR.CLOBBER_MEMORY])
|
||||
# [DBG] 每 250 拍打印一次,验证定时器中断是否触发(排查 sti 后挂起,用后移除)
|
||||
if ticks - _dbg_last >= 250:
|
||||
_dbg_last = ticks
|
||||
serial.puts("[T]")
|
||||
sched.Scheduler.sched_tick()
|
||||
pic.eoi(0)
|
||||
|
||||
|
||||
Reference in new issue
Block a user