Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/vm86bios.s
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | 1: | ||||
movl %eax,0(%ebx) | movl %eax,0(%ebx) | ||||
movl 4(%edi),%eax | movl 4(%edi),%eax | ||||
movl %eax,4(%ebx) | movl %eax,4(%ebx) | ||||
movl $GPROC0_SEL*8,%esi /* GSEL(entry, SEL_KPL) */ | movl $GPROC0_SEL*8,%esi /* GSEL(entry, SEL_KPL) */ | ||||
ltr %si | ltr %si | ||||
movl %cr3,%eax | movl %cr3,%eax | ||||
pushl %eax /* save address space */ | pushl %eax /* save address space */ | ||||
movl IdlePTD,%ecx | movl IdlePTD,%ecx /* va (and pa) of Idle PTD */ | ||||
movl %ecx,%ebx | movl %ecx,%ebx | ||||
addl $KERNBASE,%ebx /* va of Idle PTD */ | |||||
movl 0(%ebx),%eax | movl 0(%ebx),%eax | ||||
pushl %eax /* old ptde != 0 when booting */ | pushl %eax /* old ptde != 0 when booting */ | ||||
pushl %ebx /* keep for reuse */ | pushl %ebx /* keep for reuse */ | ||||
movl %esp,SCR_STACK(%edx) /* save current stack location */ | movl %esp,SCR_STACK(%edx) /* save current stack location */ | ||||
movl SCR_NEWPTD(%edx),%eax /* mapping for vm86 page table */ | movl SCR_NEWPTD(%edx),%eax /* mapping for vm86 page table */ | ||||
movl %eax,0(%ebx) /* ... install as PTD entry 0 */ | movl %eax,0(%ebx) /* ... install as PTD entry 0 */ | ||||
#if defined(PAE) || defined(PAE_TABLES) | #if defined(PAE) || defined(PAE_TABLES) | ||||
movl IdlePDPT,%ecx | movl IdlePDPT,%ecx | ||||
#endif | #endif | ||||
movl %ecx,%cr3 /* new page tables */ | movl %ecx,%cr3 /* new page tables */ | ||||
movl SCR_VMFRAME(%edx),%esp /* switch to new stack */ | movl SCR_VMFRAME(%edx),%esp /* switch to new stack */ | ||||
pushl %esp | pushl %esp | ||||
call vm86_prepcall /* finish setup */ | movl $vm86_prepcall, %eax | ||||
call *%eax /* finish setup */ | |||||
add $4, %esp | add $4, %esp | ||||
/* | /* | ||||
* Return via doreti | * Return via doreti | ||||
*/ | */ | ||||
MEXITCOUNT | MEXITCOUNT | ||||
jmp doreti | jmp doreti | ||||
Show All 39 Lines |