version 1.147, 2017/07/29 06:29:31 |
version 1.150, 2017/08/10 14:13:45 |
Line 342 _C_LABEL(Multiboot_Header): |
|
Line 342 _C_LABEL(Multiboot_Header): |
|
jne 1f |
jne 1f |
|
|
/* |
/* |
* Indeed, a multiboot-compliant boot loader executed us. We copy |
* Indeed, a multiboot-compliant boot loader executed us. We switch |
* the received Multiboot information structure into kernel's data |
* to the temporary stack, and copy the received Multiboot information |
* space to process it later -- after we are relocated. It will |
* structure into kernel's data space to process it later -- after we |
* be safer to run complex C code than doing it at this point. |
* are relocated. It will be safer to run complex C code than doing it |
|
* at this point. |
*/ |
*/ |
|
movl $_RELOC(tmpstk),%esp |
pushl %ebx /* Address of Multiboot information */ |
pushl %ebx /* Address of Multiboot information */ |
call _C_LABEL(multiboot_pre_reloc) |
call _C_LABEL(multiboot_pre_reloc) |
addl $4,%esp |
addl $4,%esp |
|
|
addl $PDE_SIZE,%esp /* pop paddr_t */ |
addl $PDE_SIZE,%esp /* pop paddr_t */ |
addl $NGDT*8,%esp /* pop temporary gdt */ |
addl $NGDT*8,%esp /* pop temporary gdt */ |
|
|
#ifdef SAFARI_FIFO_HACK |
|
movb $5,%al |
|
movw $0x37b,%dx |
|
outb %al,%dx |
|
movw $0x37f,%dx |
|
inb %dx,%al |
|
movb %al,%cl |
|
|
|
orb $1,%cl |
|
|
|
movb $5,%al |
|
movw $0x37b,%dx |
|
outb %al,%dx |
|
movw $0x37f,%dx |
|
movb %cl,%al |
|
outb %al,%dx |
|
#endif /* SAFARI_FIFO_HACK */ |
|
|
|
call _C_LABEL(main) |
call _C_LABEL(main) |
#else /* XEN */ |
#else /* XEN */ |
/* First, reset the PSL. */ |
/* First, reset the PSL. */ |
Line 1330 IDTVEC(syscall) |
|
Line 1314 IDTVEC(syscall) |
|
jmp .Lsyscall_checkast /* re-check ASTs */ |
jmp .Lsyscall_checkast /* re-check ASTs */ |
IDTVEC_END(syscall) |
IDTVEC_END(syscall) |
|
|
IDTVEC(svr4_fasttrap) |
|
pushl $2 /* size of instruction for restart */ |
|
pushl $T_ASTFLT /* trap # for doing ASTs */ |
|
INTRENTRY |
|
STI(%eax) |
|
pushl $RW_READER |
|
pushl $_C_LABEL(svr4_fasttrap_lock) |
|
call _C_LABEL(rw_enter) |
|
addl $8,%esp |
|
call *_C_LABEL(svr4_fasttrap_vec) |
|
pushl $_C_LABEL(svr4_fasttrap_lock) |
|
call _C_LABEL(rw_exit) |
|
addl $4,%esp |
|
2: /* Check for ASTs on exit to user mode. */ |
|
cli |
|
CHECK_ASTPENDING(%eax) |
|
je 1f |
|
/* Always returning to user mode here. */ |
|
CLEAR_ASTPENDING(%eax) |
|
sti |
|
/* Pushed T_ASTFLT into tf_trapno on entry. */ |
|
pushl %esp |
|
call _C_LABEL(trap) |
|
addl $4,%esp |
|
jmp 2b |
|
1: CHECK_DEFERRED_SWITCH |
|
jnz 9f |
|
INTRFASTEXIT |
|
9: sti |
|
call _C_LABEL(pmap_load) |
|
cli |
|
jmp 2b |
|
|
|
/* |
/* |
* int npx586bug1(int a, int b) |
* int npx586bug1(int a, int b) |
* Used when checking for the FDIV bug on first generations pentiums. |
* Used when checking for the FDIV bug on first generations pentiums. |