diff options
author | Kartik Agaram <vc@akkartik.com> | 2021-01-23 23:14:34 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2021-01-23 23:14:34 -0800 |
commit | 8c0b93a9c39340639cf57c7911ff69a42aaa97d4 (patch) | |
tree | 273ef00d06c7c334b3ca75c86b51ca8a4513b093 /baremetal | |
parent | ac00ea787db6a3342a3511420237c0f1e983c44f (diff) | |
download | mu-8c0b93a9c39340639cf57c7911ff69a42aaa97d4.tar.gz |
7552 - I better understand a couple of things
Diffstat (limited to 'baremetal')
-rw-r--r-- | baremetal/boot.hex | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/baremetal/boot.hex b/baremetal/boot.hex index d0a85b4f..e025efb3 100644 --- a/baremetal/boot.hex +++ b/baremetal/boot.hex @@ -199,8 +199,17 @@ e9 fb ff # loop forever 0f 01 1d # lidt 00/mod/indirect 011/subop 101/rm32/use-disp32 f8 7d 00 00 # *idt_descriptor [label] - # enable keyboard IRQ - b0 fd # al <- 0xfd # enable just IRQ1 + # For now, not bothering reprogramming the IRQ to not conflict with software + # exceptions. + # https://wiki.osdev.org/index.php?title=8259_PIC&oldid=24650#Protected_Mode + # + # Interrupt 1 (keyboard) conflicts with debugger faults. We don't use a + # debugger. + # Reference: + # https://wiki.osdev.org/Exceptions + + # enable keyboard IRQ (1) + b0 fd # al <- 0xfd # disable mask for IRQ1 e6 21 # port 0x21 <- al # initialization is done; enable interrupts @@ -340,6 +349,9 @@ e9 fb ff # loop forever 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +# By default, BIOS maps IRQ0-7 to interrupt vectors 8-15. +# https://wiki.osdev.org/index.php?title=Interrupts&oldid=25102#Default_PC_Interrupt_Vector_Assignment + # entry 8: clock 00 7d # target[0:16] = null interrupt handler [label] 08 00 # segment selector (gdt_code) |