Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2106 → Rev 2107

/trunk/kernel/arch/ia32/src/ia32.c
118,9 → 118,9
if (config.cpu_active == 1) {
memory_print_map();
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
acpi_init();
#endif /* CONFIG_SMP */
#endif /* CONFIG_SMP */
}
}
 
/trunk/kernel/arch/ia32/src/smp/smp.c
112,15 → 112,15
/*
* Set the warm-reset vector to the real-mode address of 4K-aligned ap_boot()
*/
*((uint16_t *) (PA2KA(0x467+0))) = ((uintptr_t) ap_boot) >> 4; /* segment */
*((uint16_t *) (PA2KA(0x467+2))) = 0; /* offset */
*((uint16_t *) (PA2KA(0x467 + 0))) = ((uintptr_t) ap_boot) >> 4; /* segment */
*((uint16_t *) (PA2KA(0x467 + 2))) = 0; /* offset */
/*
* Save 0xa to address 0xf of the CMOS RAM.
* BIOS will not do the POST after the INIT signal.
*/
outb(0x70,0xf);
outb(0x71,0xa);
outb(0x70, 0xf);
outb(0x71, 0xa);
 
pic_disable_irqs(0xffff);
apic_init();
/trunk/kernel/arch/ia32/src/interrupt.c
140,13 → 140,12
static void simd_fp_exception(int n, istate_t *istate)
{
uint32_t mxcsr;
asm
(
asm (
"stmxcsr %0;\n"
:"=m"(mxcsr)
);
fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR: %#zx",
(unative_t)mxcsr);
(unative_t)mxcsr);
 
decode_istate(istate);
printf("MXCSR: %#zx\n",(unative_t)(mxcsr));
/trunk/kernel/arch/ia32/src/drivers/i8259.c
86,7 → 86,7
eoi_function = pic_eoi;
 
pic_disable_irqs(0xffff); /* disable all irq's */
pic_enable_irqs(1<<IRQ_PIC1); /* but enable pic1 */
pic_enable_irqs(1 << IRQ_PIC1); /* but enable pic1 */
}
 
void pic_enable_irqs(uint16_t irqmask)
119,8 → 119,8
 
void pic_eoi(void)
{
outb(0x20,0x20);
outb(0xa0,0x20);
outb(0x20, 0x20);
outb(0xa0, 0x20);
}
 
void pic_spurious(int n, istate_t *istate)
/trunk/kernel/arch/ia32/src/drivers/i8254.c
68,7 → 68,15
 
static void i8254_irq_handler(irq_t *irq, void *arg, ...)
{
/*
* This IRQ is responsible for kernel preemption.
* Nevertheless, we are now holding a spinlock which prevents
* preemption. For this particular IRQ, we don't need the
* lock. We just release it, call clock() and then reacquire it again.
*/
spinlock_unlock(&irq->lock);
clock();
spinlock_lock(&irq->lock);
}
 
void i8254_init(void)
136,7 → 144,9
o2 = inb(CLK_PORT1);
o2 |= inb(CLK_PORT1) << 8;
 
CPU->delay_loop_const = ((MAGIC_NUMBER*LOOPS)/1000) / ((t1-t2)-(o1-o2)) + (((MAGIC_NUMBER*LOOPS)/1000) % ((t1-t2)-(o1-o2)) ? 1 : 0);
CPU->delay_loop_const =
((MAGIC_NUMBER * LOOPS) / 1000) / ((t1 - t2) - (o1 - o2)) +
(((MAGIC_NUMBER * LOOPS) / 1000) % ((t1 - t2) - (o1 - o2)) ? 1 : 0);
 
clk1 = get_cycle();
delay(1 << SHIFT);