Changeset 7e956eb in mainline
- Timestamp:
- 2007-11-17T19:49:31Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6c383b0
- Parents:
- 9cc0d7c
- Location:
- kernel/arch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/interrupt.h
r9cc0d7c r7e956eb 42 42 #define IVT_FIRST 0 43 43 44 #define EXC_COUNT 3245 #define IRQ_COUNT 1644 #define EXC_COUNT 32 45 #define IRQ_COUNT 16 46 46 47 47 #define IVT_EXCBASE 0 48 48 #define IVT_IRQBASE (IVT_EXCBASE + EXC_COUNT) 49 #define IVT_FREEBASE (IVT_IRQBASE + IRQ_COUNT)49 #define IVT_FREEBASE (IVT_IRQBASE + IRQ_COUNT) 50 50 51 51 #define IRQ_CLK 0 52 52 #define IRQ_KBD 1 53 53 #define IRQ_PIC1 2 54 #define IRQ_PIC_SPUR 754 #define IRQ_PIC_SPUR 7 55 55 #define IRQ_MOUSE 12 56 56 … … 62 62 #endif 63 63 64 #define VECTOR_DEBUG 65 #define VECTOR_CLK 66 #define VECTOR_PIC_SPUR 67 #define VECTOR_SYSCALL 64 #define VECTOR_DEBUG 1 65 #define VECTOR_CLK (IVT_IRQBASE + IRQ_CLK) 66 #define VECTOR_PIC_SPUR (IVT_IRQBASE + IRQ_PIC_SPUR) 67 #define VECTOR_SYSCALL IVT_FREEBASE 68 68 #define VECTOR_TLB_SHOOTDOWN_IPI (IVT_FREEBASE + 1) 69 #define VECTOR_DEBUG_IPI 69 #define VECTOR_DEBUG_IPI (IVT_FREEBASE + 2) 70 70 71 71 /** This is passed to interrupt handlers */ -
kernel/arch/ia32/include/interrupt.h
r9cc0d7c r7e956eb 39 39 #include <arch/pm.h> 40 40 41 #define IVT_ITEMS 42 #define IVT_FIRST 41 #define IVT_ITEMS IDT_ITEMS 42 #define IVT_FIRST 0 43 43 44 44 #define EXC_COUNT 32 45 45 #define IRQ_COUNT 16 46 46 47 #define IVT_EXCBASE 48 #define IVT_IRQBASE 47 #define IVT_EXCBASE 0 48 #define IVT_IRQBASE (IVT_EXCBASE + EXC_COUNT) 49 49 #define IVT_FREEBASE (IVT_IRQBASE + IRQ_COUNT) 50 50 51 #define IRQ_CLK 52 #define IRQ_KBD 53 #define IRQ_PIC1 51 #define IRQ_CLK 0 52 #define IRQ_KBD 1 53 #define IRQ_PIC1 2 54 54 #define IRQ_PIC_SPUR 7 55 #define IRQ_MOUSE 55 #define IRQ_MOUSE 12 56 56 57 57 /* this one must have four least significant bits set to ones */ … … 62 62 #endif 63 63 64 #define VECTOR_DEBUG 65 #define VECTOR_CLK 66 #define VECTOR_PIC_SPUR 67 #define VECTOR_SYSCALL 64 #define VECTOR_DEBUG 1 65 #define VECTOR_CLK (IVT_IRQBASE + IRQ_CLK) 66 #define VECTOR_PIC_SPUR (IVT_IRQBASE + IRQ_PIC_SPUR) 67 #define VECTOR_SYSCALL IVT_FREEBASE 68 68 #define VECTOR_TLB_SHOOTDOWN_IPI (IVT_FREEBASE + 1) 69 #define VECTOR_DEBUG_IPI 69 #define VECTOR_DEBUG_IPI (IVT_FREEBASE + 2) 70 70 71 71 typedef struct { -
kernel/arch/ia32/include/pm.h
r9cc0d7c r7e956eb 36 36 #define KERN_ia32_PM_H_ 37 37 38 #define IDT_ITEMS 6439 #define GDT_ITEMS 38 #define IDT_ITEMS 64 39 #define GDT_ITEMS 7 40 40 41 41 #define VESA_INIT_SEGMENT 0x8000 … … 64 64 #define PL_USER 3 65 65 66 #define AR_PRESENT (1 <<7)67 #define AR_DATA (2 <<3)68 #define AR_CODE (3 <<3)69 #define AR_WRITABLE (1 <<1)66 #define AR_PRESENT (1 << 7) 67 #define AR_DATA (2 << 3) 68 #define AR_CODE (3 << 3) 69 #define AR_WRITABLE (1 << 1) 70 70 #define AR_INTERRUPT (0xe) 71 71 #define AR_TSS (0x9) 72 72 73 #define DPL_KERNEL (PL_KERNEL <<5)74 #define DPL_USER (PL_USER <<5)73 #define DPL_KERNEL (PL_KERNEL << 5) 74 #define DPL_USER (PL_USER << 5) 75 75 76 76 #define TSS_BASIC_SIZE 104 77 #define TSS_IOMAP_SIZE (16 *1024+1) /* 16K for bitmap + 1 terminating byte for convenience */77 #define TSS_IOMAP_SIZE (16 * 1024 + 1) /* 16K for bitmap + 1 terminating byte for convenience */ 78 78 79 #define IO_PORTS (64 *1024)79 #define IO_PORTS (64 * 1024) 80 80 81 81 #ifndef __ASM__ -
kernel/arch/ia32/src/pm.c
r9cc0d7c r7e956eb 134 134 if (i == VECTOR_SYSCALL) { 135 135 /* 136 * The syscall interrupt gate must be calleable from userland. 136 * The syscall interrupt gate must be calleable from 137 * userland. 137 138 */ 138 139 d->access |= DPL_USER; 139 140 } 140 141 141 idt_setoffset(d, ((uintptr_t) interrupt_handlers) + i * interrupt_handler_size); 142 idt_setoffset(d, ((uintptr_t) interrupt_handlers) + 143 i * interrupt_handler_size); 142 144 } 143 145 }
Note:
See TracChangeset
for help on using the changeset viewer.