aboutsummaryrefslogtreecommitdiff
path: root/src/system.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-01-17 18:49:20 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-01-17 18:49:20 -0500
commit308537650feeabcd953283e828cf7f51495c11c5 (patch)
treec4cfb8b1e44679ac41abe68e25071a549a41c329 /src/system.c
parent095e89bc0b9238ae88383484ca006a3e7af873ad (diff)
downloadseabios-hppa-308537650feeabcd953283e828cf7f51495c11c5.zip
seabios-hppa-308537650feeabcd953283e828cf7f51495c11c5.tar.gz
seabios-hppa-308537650feeabcd953283e828cf7f51495c11c5.tar.bz2
Move variables from assembler to C code.
Define macro VAR16FIXED for declaring a variable at a fixed location. Introduce new file src/misc.c, and move non int15 calls from system.c to it. Implement all fixed location variables in C code. Move IDT/GDT defs to misc.c. Remove unused gdt entry 1.
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c68
1 files changed, 1 insertions, 67 deletions
diff --git a/src/system.c b/src/system.c
index 9bf4a5d..ebb8d41 100644
--- a/src/system.c
+++ b/src/system.c
@@ -1,4 +1,4 @@
-// 16bit system callbacks
+// Handler for int 0x15 "system" calls
//
// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2002 MandrakeSoft S.A.
@@ -269,10 +269,6 @@ handle_15e801(struct bregs *regs)
// Info on e820 map location and size.
struct e820entry *e820_list VAR16_32;
int e820_count VAR16_32;
-// Amount of continuous ram under 4Gig
-u32 RamSize VAR16_32;
-// Amount of continuous ram >4Gig
-u64 RamSizeOver4G;
static void
handle_15e820(struct bregs *regs)
@@ -340,65 +336,3 @@ handle_15(struct bregs *regs)
default: handle_15XX(regs); break;
}
}
-
-// INT 12h Memory Size Service Entry Point
-void VISIBLE16
-handle_12(struct bregs *regs)
-{
- debug_enter(regs, DEBUG_HDL_12);
- regs->ax = GET_BDA(mem_size_kb);
-}
-
-// INT 11h Equipment List Service Entry Point
-void VISIBLE16
-handle_11(struct bregs *regs)
-{
- debug_enter(regs, DEBUG_HDL_11);
- regs->ax = GET_BDA(equipment_list_flags);
-}
-
-// INT 05h Print Screen Service Entry Point
-void VISIBLE16
-handle_05(struct bregs *regs)
-{
- debug_enter(regs, DEBUG_HDL_05);
-}
-
-// INT 10h Video Support Service Entry Point
-void VISIBLE16
-handle_10(struct bregs *regs)
-{
- debug_enter(regs, DEBUG_HDL_10);
- // dont do anything, since the VGA BIOS handles int10h requests
-}
-
-void VISIBLE16
-handle_nmi()
-{
- debug_isr(DEBUG_ISR_nmi);
- BX_PANIC("NMI Handler called\n");
-}
-
-void
-mathcp_setup()
-{
- dprintf(3, "math cp init\n");
- // 80x87 coprocessor installed
- SETBITS_BDA(equipment_list_flags, 0x02);
- enable_hwirq(13, entry_75);
-}
-
-// INT 75 - IRQ13 - MATH COPROCESSOR EXCEPTION
-void VISIBLE16
-handle_75()
-{
- debug_isr(DEBUG_ISR_75);
-
- // clear irq13
- outb(0, PORT_MATH_CLEAR);
- // clear interrupt
- eoi_pic2();
- // legacy nmi call
- u32 eax=0, flags;
- call16_simpint(0x02, &eax, &flags);
-}