Hi all
When I was trying to debug a double fault on 5.6, I found the trap frame
looked a bit strange. After some investigation and reading source
code, I found that double fault handling looked problematic.
Per Intel SDM volume 3A, processor will push 0 to stack as error code when
double fault occurs. Shouldn't it use TRAP instead of ZTRAP in vector.S?
I think i386's locore.S looks OK in that regard.
I only started reading OpenBSD source code since yesterday, feel free
to correct / ignore me if I'm wrong.
Wei.
--- vector.S.~1.34.~ Sat Nov 2 14:23:38 2013
+++ vector.S Thu Feb 19 12:01:16 2015
@@ -126,7 +126,7 @@
call _C_LABEL(fpudna)
INTRFASTEXIT
IDTVEC(trap08)
- ZTRAP(T_DOUBLEFLT)
+ TRAP(T_DOUBLEFLT)
IDTVEC(trap09)
ZTRAP(T_FPOPFLT)
IDTVEC(trap0a)