|
UbixOS
2.0
|
#include <ubixos/syscall.h>#include <ubixos/syscall_posix.h>#include <sys/idt.h>#include <sys/gdt.h>#include <sys/io.h>#include <ubixos/sched.h>#include <isa/8259.h>#include <lib/kprintf.h>#include <lib/kmalloc.h>#include <vmm/vmm.h>#include <ubixos/kpanic.h>#include <ubixos/endtask.h>#include <string.h>#include <sys/trap.h>
Go to the source code of this file.
Macros | |
| #define | FP_TO_LINEAR(seg, off) ((void*) ((((uint16_t) (seg)) << 4) + ((uint16_t) (off)))) |
Functions | |
| void | __alignmentCheck (struct trapframe *) |
| void | __debug (struct trapframe *) |
| void | __divideError (struct trapframe *) |
| void | __doubleFault (struct trapframe *) |
| void | __floatingPoint (struct trapframe *) |
| void | __gpf (struct trapframe *) |
| void | __int6 (struct trapframe *frame) |
| void | __machineCheck (struct trapframe *) |
| void | __nmi (struct trapframe *) |
| void | __security (struct trapframe *) |
| void | __simd (struct trapframe *) |
| void | __virtualization (struct trapframe *) |
| void | _alignmentCheck () |
| void | _debug () |
| void | _divideError () |
| void | _doubleFault () |
| void | _floatingPoint () |
| void | _gpf () |
| void | _intNull (struct trapframe *frame) |
| void | _machineCheck () |
| void | _nmi () |
| void | _security () |
| void | _simd () |
| void | _virtualization () |
| asm (".globl _alignmentCheck \n" "_alignmentCheck: \n" " pushl $0x11 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __alignmentCheck \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _debug \n" "_debug: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _debug \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _divideError \n" "_divideError: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _divideError \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _doubleFault \n" "_doubleFault: \n" " pushl $0x8 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __doubleFault \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _floatingPoint \n" "_floatingPoint: \n" " pushl $0x0 \n" " pushl $0x10 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __floatingPoint \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _gpf \n" "_gpf: \n" " cli \n" " pushl $0x13 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __gpf \n" " add $0x4,%esp \n" " mov %esp,%eax \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " sti \n" " iret \n") | |
| asm (".globl _int6 \n" "_int6: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __int6 \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _int7 \n" "_int7: \n" " pushl %eax \n" " clts \n" " movl _current,%eax \n" " cmpl _usedMath,%eax \n" " je mathDone \n" " call mathStateRestore \n" "mathDone: \n" " popl %eax \n" " iret \n") | |
| asm (".globl _machineCheck \n" "_machineCheck: \n" " pushl $0x0\n" " pushl $0x12 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __machineCheck \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _nmi \n" "_nmi: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _nmi \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _security \n" "_security: \n" " pushl $0x1E \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __security\n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _simd \n" "_simd: \n" " iret\n" " pushl $0x0\n" " pushl $0x13 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __simd \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl _virtualization \n" "_virtualization: \n" " pushl $0x0 \n" " pushl $0x14 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __virtualization \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| asm (".globl intNull \n" "intNull: \n" " pushl $0x0 \n" " pushl $0x0 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _intNull \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n") | |
| int | idt_init () |
| void | intNull () |
| void | mathStateRestore () |
| void | setTaskVector (uInt8 interrupt, uInt16 controlMajor, uInt8 selector) |
| void | setVector (void *handler, unsigned char interrupt, unsigned short controlMajor) |
| void __alignmentCheck | ( | struct trapframe * | frame | ) |
Definition at line 633 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __debug | ( | struct trapframe * | frame | ) |
Definition at line 285 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __divideError | ( | struct trapframe * | frame | ) |
Definition at line 259 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __doubleFault | ( | struct trapframe * | frame | ) |
Definition at line 382 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __floatingPoint | ( | struct trapframe * | frame | ) |
Definition at line 607 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __machineCheck | ( | struct trapframe * | frame | ) |
Definition at line 658 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __nmi | ( | struct trapframe * | frame | ) |
Definition at line 311 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __security | ( | struct trapframe * | frame | ) |
Definition at line 737 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __simd | ( | struct trapframe * | frame | ) |
Definition at line 684 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void __virtualization | ( | struct trapframe * | frame | ) |
Definition at line 711 of file idt.c.
References _current, die_if_kernel(), endTask(), taskStruct::id, and sched_yield().

| void _alignmentCheck | ( | ) |
| void _debug | ( | ) |
| void _divideError | ( | ) |
| void _doubleFault | ( | ) |
| void _floatingPoint | ( | ) |
| void _gpf | ( | ) |
| void _intNull | ( | struct trapframe * | frame | ) |
Definition at line 235 of file idt.c.
References die_if_kernel().

| void _machineCheck | ( | ) |
| void _nmi | ( | ) |
| void _security | ( | ) |
| void _simd | ( | ) |
| void _virtualization | ( | ) |
| asm | ( | ".globl _alignmentCheck \n" "_alignmentCheck: \n" " pushl $0x11 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __alignmentCheck \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _debug \n" "_debug: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _debug \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _divideError \n" "_divideError: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _divideError \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _doubleFault \n" "_doubleFault: \n" " pushl $0x8 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __doubleFault \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _floatingPoint \n" "_floatingPoint: \n" " pushl $0x0 \n" " pushl $0x10 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __floatingPoint \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _gpf \n" "_gpf: \n" " cli \n" " pushl $0x13 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __gpf \n" " add | $0x4, |
| %esp \n" " mov % | esp, | ||
| %eax \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " sti \n" " iret \n" | |||
| ) |
| asm | ( | ".globl _int6 \n" "_int6: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __int6 \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _int7 \n" "_int7: \n" " pushl %eax \n" " clts \n" " movl | _current, |
| %eax \n" " cmpl | _usedMath, | ||
| %eax \n" " je mathDone \n" " call mathStateRestore \n" "mathDone:\n" " popl %eax \n" " iret \n" | |||
| ) |
| asm | ( | ".globl _machineCheck \n" "_machineCheck: \n" " pushl $0x0\n" " pushl $0x12 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __machineCheck \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _nmi \n" "_nmi: \n" " pushl $0x0 \n" " pushl $0x6 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _nmi \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _security \n" "_security: \n" " pushl $0x1E \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __security\n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _simd \n" "_simd: \n" " iret\n" " pushl $0x0\n" " pushl $0x13 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __simd \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl _virtualization \n" "_virtualization: \n" " pushl $0x0 \n" " pushl $0x14 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call __virtualization \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| asm | ( | ".globl intNull \n" "intNull: \n" " pushl $0x0 \n" " pushl $0x0 \n" " pushal \n" " push %ds \n" " push %es \n" " push %fs \n" " push %gs \n" " push %esp \n" " call _intNull \n" " pop %gs \n" " pop %fs \n" " pop %es \n" " pop %ds \n" " popal \n" " iret \n" | ) |
| void intNull | ( | ) |
| void mathStateRestore | ( | ) |
Definition at line 763 of file idt.c.
References _current, _usedMath, taskStruct::i387, and taskStruct::usedMath.
| void setVector | ( | void * | handler, |
| unsigned char | interrupt, | ||
| unsigned short | controlMajor | ||
| ) |
Definition at line 208 of file idt.c.
Referenced by atkbd_init(), fdc_init(), and initLNC().