remove idt & idt_reg

"idt.h" included by idt.c and kernel.c, which will cause link failed. so move the definition of idt to idt.c to avoid the failure below.

ld: cpu/idt.o:(.bss+0x0): multiple definition of `idt'; kernel/kernel.o:(.bss+0x0): first defined here
ld: cpu/idt.o:(.bss+0x800): multiple definition of `idt_reg'; kernel/kernel.o:(.bss+0x800): first defined here
ld: cpu/isr.o:(.bss+0x0): multiple definition of `idt'; kernel/kernel.o:(.bss+0x0): first defined here
ld: cpu/isr.o:(.bss+0x800): multiple definition of `idt_reg'; kernel/kernel.o:(.bss+0x800): first defined here
This commit is contained in:
ppw 2020-09-21 10:18:12 +08:00 committed by GitHub
parent 7aff64740e
commit d24ea64b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,10 +27,6 @@ typedef struct {
u32 base;
} __attribute__((packed)) idt_register_t;
#define IDT_ENTRIES 256
idt_gate_t idt[IDT_ENTRIES];
idt_register_t idt_reg;
/* Functions implemented in idt.c */
void set_idt_gate(int n, u32 handler);