Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 111 → Rev 112

/SPARTAN/trunk/arch/ia32/src/pm.c
71,9 → 71,9
 
void gdt_setbase(struct descriptor *d, __address base)
{
d->base_0_15 = KA2PA(base) & 0xffff;
d->base_16_23 = (KA2PA(base) >> 16) & 0xff;
d->base_24_31 = (KA2PA(base) >> 24) & 0xff;
d->base_0_15 = base & 0xffff;
d->base_16_23 = ((base) >> 16) & 0xff;
d->base_24_31 = ((base) >> 24) & 0xff;
 
}
 
85,8 → 85,11
 
void idt_setoffset(struct idescriptor *d, __address offset)
{
d->offset_0_15 = KA2PA(offset) & 0xffff;
d->offset_16_31 = KA2PA(offset) >> 16;
/*
* Offset is a linear address.
*/
d->offset_0_15 = offset & 0xffff;
d->offset_16_31 = offset >> 16;
}
 
void tss_initialize(struct tss *t)
/SPARTAN/trunk/arch/ia32/src/smp/ap.S
54,11 → 54,7
movl %cr0,%eax
orl $1,%eax
movl %eax,%cr0
jmp 0f
0:
ljmp $KTEXT,$jump_to_kernel
 
# this is where the AP enters the kernel space
jmpl $KTEXT,$jump_to_kernel
jump_to_kernel:
.code32
movw $KDATA,%ax
/SPARTAN/trunk/arch/ia32/src/smp/apic.c
43,7 → 43,7
* This is functional, far-from-general-enough interface to the APIC.
* Advanced Programmable Interrupt Controller for MP systems.
* Tested on:
* Bochs 2.0.2 - Bochs 2.2-cvs with 2-8 CPUs
* Bochs 2.0.2 - Bochs 2.2 with 2-8 CPUs
* ASUS P/I-P65UP5 + ASUS C-P55T2D REV. 1.41 with 2x 200Mhz Pentium CPUs
*/
 
/SPARTAN/trunk/arch/ia32/src/boot/boot.S
47,8 → 47,10
movl %cr0,%eax
orl $0x1,%eax
movl %eax,%cr0
jmp 0f
0:
jmpl $8,$meeting_point
meeting_point:
.code32
 
movw $16,%ax
movw %ax,%es
movw %ax,%gs
56,9 → 58,6
movw %ax,%ds # kernel data + stack
movw %ax,%ss
movl $0x7c00,%esp
jmpl $8,$meeting_point
meeting_point:
.code32
 
lidt idtr
 
96,6 → 95,8
movl %cr0, %ebx
orl $(1<<31), %ebx
movl %ebx, %cr0
jmp 0f
0:
ret