Lines Matching +full:ecx +full:- +full:2000
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * linux/arch/x86/kernel/head_64.S -- start in 32bit and switch to 64bit
5 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
6 * Copyright (C) 2000 Pavel Machek <pavel@suse.cz>
7 * Copyright (C) 2000 Karsten Keil <kkeil@suse.de>
21 #include <asm/processor-flags.h>
26 #include <asm/nospec-branch.h>
31 * because we need identity-mapped pages.
34 #define pud_index(x) (((x) >> PUD_SHIFT) & (PTRS_PER_PUD-1))
65 leaq (__end_init_task - FRAME_SIZE)(%rip), %rsp
75 movl $MSR_GS_BASE, %ecx
91 * be done now, since this also includes setup of the SEV-SNP CPUID table,
125 addq $(early_top_pgt - __START_KERNEL_map), %rax
151 * SEV-ES guests. In those guests the call to verify_cpu() would cause
155 * All non SEV-ES systems, especially Intel systems, need to execute
173 addq $(init_top_pgt - __START_KERNEL_map), %rax
185 andl $X86_CR4_MCE, %ecx
187 movl $0, %ecx
191 orl $(X86_CR4_PAE | X86_CR4_PGE), %ecx
195 orl $X86_CR4_LA57, %ecx
200 /* Setup early boot stage 4-/5-level pagetables. */
204 * For SEV guests: Verify that the C-bit is correct. A malicious
205 * hypervisor could lie about the C-bit position to perform a ROP
208 * %rsi carries pointer to realmode data and is callee-clobbered. Save
217 * Switch to new page-table
273 movl $MSR_GS_BASE,%ecx
279 * Setup a boot time stack - Any secondary CPU will have lost its stack
280 * by now because the cr3-switch above unmaps the real-mode stack
295 movl $MSR_EFER, %ecx
330 * Since we are running on identity-mapped space we have to jump
424 * The FRAME_SIZE gap is a convention which helps the in-kernel unwinder
427 SYM_DATA(initial_stack, .quad init_thread_union + THREAD_SIZE - FRAME_SIZE)
446 .fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc
462 /* The vector number is currently in the pt_regs->di slot. */
463 pushq %rsi /* pt_regs->si */
465 movq %rdi, 8(%rsp) /* pt_regs->di = RDI */
466 pushq %rdx /* pt_regs->dx */
467 pushq %rcx /* pt_regs->cx */
468 pushq %rax /* pt_regs->ax */
469 pushq %r8 /* pt_regs->r8 */
470 pushq %r9 /* pt_regs->r9 */
471 pushq %r10 /* pt_regs->r10 */
472 pushq %r11 /* pt_regs->r11 */
473 pushq %rbx /* pt_regs->bx */
474 pushq %rbp /* pt_regs->bp */
475 pushq %r12 /* pt_regs->r12 */
476 pushq %r13 /* pt_regs->r13 */
477 pushq %r14 /* pt_regs->r14 */
478 pushq %r15 /* pt_regs->r15 */
492 * paravirtualized INTERRUPT_RETURN and pv-ops don't work that early.
519 /* Pure iret required here - don't use INTERRUPT_RETURN */
539 /* This ensures they are 8k-aligned: */
574 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
576 .quad level3_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
578 /* (2^48-(2*1024*1024*1024))/(2^39) = 511 */
579 .quad level3_kernel_pgt - __START_KERNEL_map + _PAGE_TABLE_NOENC
584 .quad level2_ident_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
608 .quad level3_kernel_pgt - __START_KERNEL_map + _PAGE_TABLE_NOENC
614 /* (2^48-(2*1024*1024*1024)-((2^39)*511))/(2^30) = 510 */
615 .quad level2_kernel_pgt - __START_KERNEL_map + _KERNPG_TABLE_NOENC
616 .quad level2_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE_NOENC
637 .fill (512 - 4 - FIXMAP_PMD_NUM),8,0
640 .quad level1_fixmap_pgt + (pgtno << PAGE_SHIFT) - __START_KERNEL_map \
659 SYM_DATA(early_gdt_descr, .word GDT_ENTRIES*8-1)
667 #include "../../x86/xen/xen-head.S"