Changeset f619ec11 in mainline for kernel/arch/ia32
- Timestamp:
- 2007-02-03T21:26:54Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cf5ddf6
- Parents:
- 80bcaed
- Location:
- kernel/arch/ia32/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/drivers/i8254.c
r80bcaed rf619ec11 69 69 static void i8254_irq_handler(irq_t *irq, void *arg, ...) 70 70 { 71 /* 72 * This IRQ is responsible for kernel preemption. 73 * Nevertheless, we are now holding a spinlock which prevents 74 * preemption. For this particular IRQ, we don't need the 75 * lock. We just release it, call clock() and then reacquire it again. 76 */ 77 spinlock_unlock(&irq->lock); 71 78 clock(); 79 spinlock_lock(&irq->lock); 72 80 } 73 81 … … 137 145 o2 |= inb(CLK_PORT1) << 8; 138 146 139 CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0); 147 CPU->delay_loop_const = 148 ((MAGIC_NUMBER * LOOPS) / 1000) / ((t1 - t2) - (o1 - o2)) + 149 (((MAGIC_NUMBER * LOOPS) / 1000) % ((t1 - t2) - (o1 - o2)) ? 1 : 0); 140 150 141 151 clk1 = get_cycle(); -
kernel/arch/ia32/src/drivers/i8259.c
r80bcaed rf619ec11 87 87 88 88 pic_disable_irqs(0xffff); /* disable all irq's */ 89 pic_enable_irqs(1 <<IRQ_PIC1); /* but enable pic1 */89 pic_enable_irqs(1 << IRQ_PIC1); /* but enable pic1 */ 90 90 } 91 91 … … 120 120 void pic_eoi(void) 121 121 { 122 outb(0x20, 0x20);123 outb(0xa0, 0x20);122 outb(0x20, 0x20); 123 outb(0xa0, 0x20); 124 124 } 125 125 -
kernel/arch/ia32/src/ia32.c
r80bcaed rf619ec11 119 119 memory_print_map(); 120 120 121 121 #ifdef CONFIG_SMP 122 122 acpi_init(); 123 123 #endif /* CONFIG_SMP */ 124 124 } 125 125 } -
kernel/arch/ia32/src/interrupt.c
r80bcaed rf619ec11 141 141 { 142 142 uint32_t mxcsr; 143 asm 144 ( 143 asm ( 145 144 "stmxcsr %0;\n" 146 145 :"=m"(mxcsr) 147 146 ); 148 147 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx", 149 148 (unative_t)mxcsr); 150 149 151 150 decode_istate(istate); -
kernel/arch/ia32/src/smp/smp.c
r80bcaed rf619ec11 113 113 * Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot() 114 114 */ 115 *((uint16_t *) (PA2KA(0x467 +0))) = ((uintptr_t) ap_boot) >> 4; /* segment */116 *((uint16_t *) (PA2KA(0x467 +2))) = 0; /* offset */115 *((uint16_t *) (PA2KA(0x467 + 0))) = ((uintptr_t) ap_boot) >> 4; /* segment */ 116 *((uint16_t *) (PA2KA(0x467 + 2))) = 0; /* offset */ 117 117 118 118 /* … … 120 120 * BIOS will not do the POST after the INIT signal. 121 121 */ 122 outb(0x70, 0xf);123 outb(0x71, 0xa);122 outb(0x70, 0xf); 123 outb(0x71, 0xa); 124 124 125 125 pic_disable_irqs(0xffff);
Note:
See TracChangeset
for help on using the changeset viewer.