Lines Matching +full:linear +full:- +full:mapping +full:- +full:mode
1 /*-
5 * Copyright (c) 2008-2012 Jung-uk Kim <jkim@FreeBSD.org>
38 * Resume entry point for real mode.
40 * If XFirmwareWakingVector is zero and FirmwareWakingVector is non-zero
41 * in FACS, the BIOS enters here in real mode after POST with CS set to
44 * of the system (i.e., S3 suspend-to-RAM vs. S4 suspend-to-disk).
46 * Note: If XFirmwareWakingVector is non-zero, it should disable address
49 * this mode is not supported by this code.
58 * Set up segment registers for real mode, a small stack for
71 testb $~0, resume_beep - wakeup_start
73 movb $0, resume_beep - wakeup_start
91 /* Re-initialize video BIOS if the reset_video tunable is set. */
92 testb $~0, reset_video - wakeup_start
94 movb $0, reset_video - wakeup_start
102 /* Re-start in case the previous BIOS call clobbers them. */
115 * in 16-bit protected mode.
117 lgdtl bootgdtdesc - wakeup_start
119 /* Enable protected mode */
124 * Now execute a far jump to turn on protected mode. This
129 * ljmpl $bootcode32 - bootgdt, $wakeup_32 - wakeup_start
136 .long wakeup_32 - wakeup_start /* offset in segment */
137 .word bootcode32 - bootgdt /* index in gdt for 32 bit code */
140 * At this point, we are running in 32 bit legacy protected mode.
146 mov $bootdata32 - bootgdt, %eax
155 leal wakeup_pagetables - wakeup_start(%ebx), %ecx
163 * Enable EFER.LME so that we get long mode when all the prereqs are
169 movl wakeup_efer - wakeup_start(%ebx), %eax
170 movl wakeup_efer + 4 - wakeup_start(%ebx), %edx
175 * only gets accessed after we're actually in 64 bit mode, however
181 leal wakeup_pagetables - wakeup_start(%ebx), %eax
187 * Finally, switch to long bit mode by enabling paging. We have
199 * At this point paging is enabled, and we are in "compatibility" mode.
201 * %cr3 points to a 4-level page table page.
203 * specify a 32 bit linear address. So, yet another trampoline.
206 * ljmp $bootcode64 - bootgdt, $wakeup_64 - wakeup_start
212 .long wakeup_64 - wakeup_start /* offset in segment */
213 .word bootcode64 - bootgdt /* index in gdt for 64 bit code */
216 * Yeehar! We're running in 64-bit mode! We can mostly ignore our
219 * a 1:1 1GB mirrored mapping over entire address space. We had better
227 mov $bootdata64 - bootgdt, %eax
231 movq wakeup_pcb - wakeup_start(%rbx), %rdi
232 movq wakeup_ret - wakeup_start(%rbx), %rax
235 lgdt wakeup_gdt - wakeup_start(%rbx)
279 .word bootgdtend - bootgdt /* Length */
280 .long bootgdt - wakeup_start /* Offset plus %ds << 4 */