okay gut. jetzt habe ich aber noch mehr Probleme bekommen :/
Der Teilcode in isrs.c
#include "system.h"
extern void isr0();
extern void isr1();
extern void isr2();
extern void isr3();
extern void isr4();
void isrs_install()
{
set_idt_entry(0, (unsigned)isr0, 0x08, 0x8E);
set_idt_entry(1, (unsigned)isr1, 0x08, 0x8E);
set_idt_entry(2, (unsigned)isr2, 0x08, 0x8E);
set_idt_entry(3, (unsigned)isr3, 0x08, 0x8E);
set_idt_entry(4, (unsigned)isr4, 0x08, 0x8E);
}
Der Teilcode in start.S
.global _start
_start:
// Stack initialisieren
mov $kernel_stack, %esp
// C-Code aufrufen
call main
endlessjmp:
jmp endlessjmp
//ISRs
.global _isr0
.global _isr1
.global _isr2
.global _isr3
.global _isr4
_isr0: //Divide by Zero
cli
push $0x0000
push $0x0000
jmp isr_common_stub
_isr1: //Debug
cli
push $0x0000
push $0x0001
jmp isr_common_stub
.extern _fault_handler
isr_common_stub:
pusha
push %ds
push %es
push %fs
push %gs
mov $0x10, %ax
mov %ax, %ds
mov %ax, %es
mov %ax, %fs
mov %ax, %gs
mov %esp, %eax
push %eax
mov _fault_handler, %eax
call %eax
pop %eax
pop %gs
pop %fs
pop %es
pop %ds
popa
add $8, %esp
iret
Was mir die Konsole ausspuckt:
start.o: In function `isr_common_stub':
(.text+0x11e): undefined reference to `_fault_handler'
isrs.o: In function `isrs_install':
/home/dennis/Desktop/Tutorial/src/isrs.c:37: undefined reference to `isr0'
/home/dennis/Desktop/Tutorial/src/isrs.c:38: undefined reference to `isr1'
/home/dennis/Desktop/Tutorial/src/isrs.c:39: undefined reference to `isr2'
/home/dennis/Desktop/Tutorial/src/isrs.c:40: undefined reference to `isr3'
/home/dennis/Desktop/Tutorial/src/isrs.c:41: undefined reference to `isr4'
make: *** [kernel] Error 1
Langsam verzweifele ich.