|
POK(kernelpart)
|
Go to the source code of this file.
| #define EXCEPTION_ALIGNEMENT_CHECK 17 |
| #define EXCEPTION_BOUNDRANGE 5 |
| #define EXCEPTION_BREAKPOINT 3 |
| #define EXCEPTION_COPSEG_OVERRUN 9 |
| #define EXCEPTION_DEBUG 1 |
| #define EXCEPTION_DIVIDE_ERROR 0 |
| #define EXCEPTION_DOUBLEFAULT 8 |
| #define EXCEPTION_FPU_FAULT 16 |
| #define EXCEPTION_GENERAL_PROTECTION 13 |
| #define EXCEPTION_INVALID_TSS 10 |
| #define EXCEPTION_INVALIDOPCODE 6 |
| #define EXCEPTION_MACHINE_CHECK 18 |
| #define EXCEPTION_NMI 2 |
| #define EXCEPTION_NOMATH_COPROC 7 |
| #define EXCEPTION_OVERFLOW 4 |
| #define EXCEPTION_PAGEFAULT 14 |
| #define EXCEPTION_RESERVED 15 |
| #define EXCEPTION_SEGMENT_NOT_PRESENT 11 |
| #define EXCEPTION_SIMD_FAULT 19 |
| #define EXCEPTION_STACKSEG_FAULT 12 |
| typedef enum e_idte_type e_idte_type |
| enum e_idte_type |
Definition at line 26 of file event.h.
{
IDTE_TASK = 5,
IDTE_INTERRUPT = 6,
IDTE_TRAP = 7
} e_idte_type;
Definition at line 31 of file event.c.
{
pok_idt_init ();
#if defined (POK_NEEDS_DEBUG) || defined (POK_NEEDS_ERROR_HANDLING)
pok_exception_init ();
#endif
pok_syscall_init ();
return (POK_ERRNO_OK);
}
| void pok_idt_set_gate | ( | uint16_t | index, |
| uint16_t | segsel, | ||
| uint32_t | offset, | ||
| e_idte_type | t, | ||
| int | dpl | ||
| ) |
Definition at line 62 of file event.c.
{
pok_idt[index].offset_low = (offset) & 0xFFFF;
pok_idt[index].offset_high = (offset >> 16) & 0xFFFF;
pok_idt[index].segsel = segsel;
pok_idt[index].dpl = dpl;
pok_idt[index].type = t;
pok_idt[index].d = 1;
pok_idt[index].res0 = 0; /* reserved */
pok_idt[index].res1 = 0; /* reserved */
pok_idt[index].present = 1;
}
Init system calls
Definition at line 83 of file syscalls.c.
{
pok_idt_set_gate (POK_SYSCALL_INT_NUMBER,
GDT_CORE_CODE_SEGMENT << 3,
(uint32_t) syscall_gate,
IDTE_INTERRUPT,
3);
return (POK_ERRNO_OK);
}