Also, rearrange the layout in the fixed area to make more room in post area.
// Use a stack in EBDA
movw $SEG_BDA, %ax
movw %ax, %ds
// Use a stack in EBDA
movw $SEG_BDA, %ax
movw %ax, %ds
+ movw BDA_ebda_seg, %ax
+ movw %ax, %ss
+ movw %ax, %ds
movl $EBDA_resume_stack_top, %esp
// Call handler.
movl $EBDA_resume_stack_top, %esp
// Call handler.
+ // IRQ trampolines
+ .macro IRQ_TRAMPOLINE num
+ .global irq_trampoline_0x\num
+ irq_trampoline_0x\num :
+ int $0x\num
+ lretw
+ .endm
+
+ IRQ_TRAMPOLINE 02
+ IRQ_TRAMPOLINE 10
+ IRQ_TRAMPOLINE 13
+ IRQ_TRAMPOLINE 15
+ IRQ_TRAMPOLINE 16
+ IRQ_TRAMPOLINE 18
+ IRQ_TRAMPOLINE 19
+ IRQ_TRAMPOLINE 1c
+ IRQ_TRAMPOLINE 4a
+
/****************************************************************
/****************************************************************
+ * Interrupt entry points
+ ****************************************************************/
+
+ // Define an entry point for an interrupt (no args passed).
+ .macro IRQ_ENTRY num
+ .global entry_\num
+ entry_\num :
+ cli // In case something far-calls instead of using "int"
+ ENTRY handle_\num
+ iretw
+ .endm
+
+ // Define an entry point for an interrupt (can read/modify args).
+ .macro IRQ_ENTRY_ARG num
+ .global entry_\num
+ entry_\num :
+ cli // In case something far-calls instead of using "int"
+ ENTRY_ARG handle_\num
+ iretw
+ .endm
+
+ ORG 0xe2c3
+ IRQ_ENTRY nmi
+
+/****************************************************************
+ * GDT and IDT tables (between 0xe2c3 - 0xe3fe)
****************************************************************/
// Protected mode IDT descriptor
****************************************************************/
// Protected mode IDT descriptor
/****************************************************************
/****************************************************************
- * Interrupt entry points
+ * Interrupt entry points (continued)
****************************************************************/
****************************************************************/
- // Define an entry point for an interrupt (no args passed).
- .macro IRQ_ENTRY num
- .global entry_\num
- entry_\num :
- cli // In case something far-calls instead of using "int"
- ENTRY handle_\num
- iretw
- .endm
-
- // Define an entry point for an interrupt (can read/modify args).
- .macro IRQ_ENTRY_ARG num
- .global entry_\num
- entry_\num :
- cli // In case something far-calls instead of using "int"
- ENTRY_ARG handle_\num
- iretw
- .endm
-
- ORG 0xe2c3
- IRQ_ENTRY nmi
-
ORG 0xe3fe
.global entry_13_official
entry_13_official:
ORG 0xe3fe
.global entry_13_official
entry_13_official:
pushl $_code32_handle_18
jmp transition32
pushl $_code32_handle_18
jmp transition32
- // IRQ trampolines
- .macro IRQ_TRAMPOLINE num
- .global irq_trampoline_0x\num
- irq_trampoline_0x\num :
- int $0x\num
- lretw
- .endm
-
- IRQ_TRAMPOLINE 02
- IRQ_TRAMPOLINE 10
- IRQ_TRAMPOLINE 13
- IRQ_TRAMPOLINE 15
- IRQ_TRAMPOLINE 16
- IRQ_TRAMPOLINE 18
- IRQ_TRAMPOLINE 19
- IRQ_TRAMPOLINE 1c
- IRQ_TRAMPOLINE 4a
-
ORG 0xfa6e
.include "out/font.proc.16.s"
.text
ORG 0xfa6e
.include "out/font.proc.16.s"
.text