From 01ed65f720a32e35d12c7f4d68297e3599157846 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 28 Jul 2023 08:43:09 +0000 Subject: kernel: Cleanup arch abstraction layer git-svn-id: https://svn.vegaa.systems/svn/vega-Vega/trunk@29 a8a8aea2-181d-ee11-89e8-15fd0e089fc4 --- sys/include/arch/amd64/gdt.h | 4 ++-- sys/include/sys/machdep.h | 39 ++------------------------------------- 2 files changed, 4 insertions(+), 39 deletions(-) (limited to 'sys/include') diff --git a/sys/include/arch/amd64/gdt.h b/sys/include/arch/amd64/gdt.h index 756e2a6..2b7f308 100644 --- a/sys/include/arch/amd64/gdt.h +++ b/sys/include/arch/amd64/gdt.h @@ -74,7 +74,7 @@ gdt_load(struct gdtr *gdtr) ); } -extern struct gdt_entry g_dmmy_gdt[256]; -extern struct gdtr g_early_gdtr; +extern struct gdt_entry g_gdt[256]; +extern struct gdtr g_gdtr; #endif /* !AMD64_GDT_H_ */ diff --git a/sys/include/sys/machdep.h b/sys/include/sys/machdep.h index f98b123..b9a6221 100644 --- a/sys/include/sys/machdep.h +++ b/sys/include/sys/machdep.h @@ -33,46 +33,11 @@ #define _SYS_MACHDEP_H_ #include -#if defined(_KERNEL) -#include -#endif /* defined(_KERNEL) */ +#include #if defined(_KERNEL) -/* - * Arch specifics go here - * along with an #if defined(...) - * - * XXX: When porting more architectures this - * may get messy. Figure out a way to - * seperate this into a different header. - */ -struct processor_machdep { -#if defined(__x86_64__) - struct gdtr *gdtr; - struct gdt_entry *gdt; -#endif /* defined(__x86_64__) */ -}; - -/* - * Sets arch specifics to their - * defaults. - */ -#if defined(__x86_64__) -#define DEFAULT_PROCESSOR_MACHDEP \ - { \ - .gdtr = &g_early_gdtr, \ - .gdt = &g_dmmy_gdt[0] \ - } -#endif /* defined(__x86_64__) */ - -struct processor { - struct processor_machdep machdep; -}; - -__weak void processor_init(struct processor *processor); -__weak void interrupts_init(struct processor *processor); - +void processor_init(void); void processor_halt(void); #endif /* defined(_KERNEL) */ -- cgit v1.2.3