Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/vm86bios.s
Show First 20 Lines • Show All 95 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 /* va (and pa) of Idle PTD */ | cmpb $0,pae_mode | ||||
movl %ecx,%ebx | jne 2f | ||||
movl IdlePTD_nopae,%ecx /* va (and pa) of Idle PTD */ | |||||
jmp 3f | |||||
2: movl IdlePTD_pae,%ecx | |||||
3: movl %ecx,%ebx | |||||
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) | cmpb $0,pae_mode | ||||
je 4f | |||||
movl IdlePDPT,%ecx | movl IdlePDPT,%ecx | ||||
#endif | 4: 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 | ||||
movl $vm86_prepcall, %eax | movl $vm86_prepcall, %eax | ||||
call *%eax /* finish setup */ | call *%eax /* finish setup */ | ||||
add $4, %esp | add $4, %esp | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |