Code: Select all
int system_main()
{
(..)
asm volatile ("cli\n");
asm volatile ("push $0x23\n"
"push $0xc0008800\n"
"push $0x200\n"
"push $0x1b\n"
"push $DIE\n"
"iret");
(...)}
void DIE() asm ("DIE");
.globl DIE
DIE:
nop
nop
nop
mov $0xa1b2c3d4, %edi
jmp DIE
user code: limit 0xfffff, base 0, attr 0xfa, flags 0xc0
used data: limit 0xfffff, base 0, attr 0xf2, flags 0xc0
If I change the code to
asm volatile ("pushf 0x8"
"pushf &DIE"
"iret");
it seems to work.
Hm, as I write this I begin to think it's the rtc timer interrupt which fails, perhaps because the kernel tss isn't yet loaded at that moment.. to be investigated.
Cheers,
Adrian.