aboutsummaryrefslogtreecommitdiff
path: root/sys/arch/amd64/machdep.c
diff options
context:
space:
mode:
authorian <ian>2023-07-28 08:43:09 +0000
committerian <ian>2023-07-28 08:43:09 +0000
commit01ed65f720a32e35d12c7f4d68297e3599157846 (patch)
tree94620eb25bdde9994834c2085a8c3b8f344f5bfd /sys/arch/amd64/machdep.c
parent1809fe87ad70cf537d110845dd57fdf20a6614fd (diff)
kernel: Cleanup arch abstraction layer
git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@29 a8a8aea2-181d-ee11-89e8-15fd0e089fc4
Diffstat (limited to 'sys/arch/amd64/machdep.c')
-rw-r--r--sys/arch/amd64/machdep.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/amd64/machdep.c b/sys/arch/amd64/machdep.c
index 747d23a..8203a07 100644
--- a/sys/arch/amd64/machdep.c
+++ b/sys/arch/amd64/machdep.c
@@ -33,13 +33,13 @@
#include <sys/cdefs.h>
#include <machine/trap.h>
#include <machine/idt.h>
+#include <machine/gdt.h>
#define ISR(func) ((uintptr_t)func)
-__weak void
-interrupts_init(struct processor *processor)
+static void
+interrupts_init(void)
{
- __USE(processor);
idt_set_desc(0x0, IDT_TRAP_GATE_FLAGS, ISR(arith_err), 0);
idt_set_desc(0x2, IDT_TRAP_GATE_FLAGS, ISR(nmi), 0);
idt_set_desc(0x3, IDT_TRAP_GATE_FLAGS, ISR(breakpoint_handler), 0);
@@ -61,8 +61,8 @@ processor_halt(void)
}
__weak void
-processor_init(struct processor *processor)
+processor_init(void)
{
- gdt_load(processor->machdep.gdtr);
- interrupts_init(processor);
+ gdt_load(&g_gdtr);
+ interrupts_init();
}