Lines Matching +full:secondary +full:- +full:boot +full:- +full:reg
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * linux/arch/x86/kernel/head_64.S -- start in 32bit and switch to 64bit
21 #include <asm/processor-flags.h>
26 #include <asm/nospec-branch.h>
30 #include <asm/asm-offsets.h>
32 #define GET_CR2_INTO(reg) GET_CR2_INTO_AX ; _ASM_MOV %_ASM_AX, reg argument
35 #define GET_CR2_INTO(reg) _ASM_MOV %cr2, reg argument
40 * because we need identity-mapped pages.
43 #define pud_index(x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
64 * arch/x86/boot/compressed/head_64.S.
66 * We only come here initially at boot nothing else comes here.
74 leaq (__end_init_task - SIZEOF_PTREGS)(%rip), %rsp
105 addq $(early_top_pgt - __START_KERNEL_map), %rax
122 * after the boot processor executes this code.
130 * SEV-ES guests. In those guests the call to verify_cpu() would cause
131 * #VC exceptions which can not be handled at this stage of secondary
134 * All non SEV-ES systems, especially Intel systems, need to execute
149 addq $(init_top_pgt - __START_KERNEL_map), %rax
162 /* Setup early boot stage 4-/5-level pagetables. */
166 * For SEV guests: Verify that the C-bit is correct. A malicious
167 * hypervisor could lie about the C-bit position to perform a ROP
170 * %rsi carries pointer to realmode data and is callee-clobbered. Save
178 /* Switch to new page-table */
214 * Note that, on SMP, the boot cpu uses init data section until
223 * Setup a boot time stack - Any secondary CPU will have lost its stack
224 * by now because the cr3-switch above unmaps the real-mode stack
264 * Since we are running on identity-mapped space we have to jump
301 * Boot CPU0 entry point. It's called from play_dead(). Everything has been set
314 * VC Exception handler used during early boot when running on kernel
340 /* Pure iret required here - don't use INTERRUPT_RETURN */
355 * The SIZEOF_PTREGS gap is a convention which helps the in-kernel unwinder
358 SYM_DATA(initial_stack, .quad init_thread_union + THREAD_SIZE - SIZEOF_PTREGS)
375 .fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc
389 /* The vector number is currently in the pt_regs->di slot. */
390 pushq %rsi /* pt_regs->si */
392 movq %rdi, 8(%rsp) /* pt_regs->di = RDI */
393 pushq %rdx /* pt_regs->dx */
394 pushq %rcx /* pt_regs->cx */
395 pushq %rax /* pt_regs->ax */
396 pushq %r8 /* pt_regs->r8 */
397 pushq %r9 /* pt_regs->r9 */
398 pushq %r10 /* pt_regs->r10 */
399 pushq %r11 /* pt_regs->r11 */
400 pushq %rbx /* pt_regs->bx */
401 pushq %rbp /* pt_regs->bp */
402 pushq %r12 /* pt_regs->r12 */
403 pushq %r13 /* pt_regs->r13 */
404 pushq %r14 /* pt_regs->r14 */
405 pushq %r15 /* pt_regs->r15 */
417 * VC Exception handler used during very early boot. The
419 * paravirtualized INTERRUPT_RETURN and pv-ops don't work that early.
422 * available to boot secondary CPUs.
441 /* Pure iret required here - don't use INTERRUPT_RETURN */
461 /* This ensures they are 8k-aligned: */
496 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
498 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
500 /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
501 .quad level3_kernel_pgt - __START_KERNEL_map + _PAGE_TABLE_NOENC
506 .quad level2_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
530 .quad level3_kernel_pgt - __START_KERNEL_map + _PAGE_TABLE_NOENC
536 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
537 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
538 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE_NOENC
561 .fill (512 - 4 - FIXMAP_PMD_NUM),8,0
564 .quad level1_fixmap_pgt + (pgtno << PAGE_SHIFT) - __START_KERNEL_map \
583 SYM_DATA(early_gdt_descr, .word GDT_ENTRIES*8-1)
591 #include "../../x86/xen/xen-head.S"