head64.c (74d8d9d531b4cc945a9f75aa2fc21d99ca5a9fe3) head64.c (1aa9aa8ee517e0443b06e816a4fd2d15f2113615)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * prepare to run common code
4 *
5 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
6 */
7
8#define DISABLE_BRANCH_PROFILING

--- 392 unchanged lines hidden (view full) ---

401}
402
403void __init do_early_exception(struct pt_regs *regs, int trapnr)
404{
405 if (trapnr == X86_TRAP_PF &&
406 early_make_pgtable(native_read_cr2()))
407 return;
408
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * prepare to run common code
4 *
5 * Copyright (C) 2000 Andrea Arcangeli <andrea@suse.de> SuSE
6 */
7
8#define DISABLE_BRANCH_PROFILING

--- 392 unchanged lines hidden (view full) ---

401}
402
403void __init do_early_exception(struct pt_regs *regs, int trapnr)
404{
405 if (trapnr == X86_TRAP_PF &&
406 early_make_pgtable(native_read_cr2()))
407 return;
408
409 if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT) &&
410 trapnr == X86_TRAP_VC && handle_vc_boot_ghcb(regs))
411 return;
412
409 early_fixup_exception(regs, trapnr);
410}
411
412/* Don't add a printk in there. printk relies on the PDA which is not initialized
413 yet. */
414static void __init clear_bss(void)
415{
416 memset(__bss_start, 0,

--- 153 unchanged lines hidden (view full) ---

570
571 desc->address = (unsigned long)idt;
572 native_load_idt(desc);
573}
574
575/* This is used when running on kernel addresses */
576void early_setup_idt(void)
577{
413 early_fixup_exception(regs, trapnr);
414}
415
416/* Don't add a printk in there. printk relies on the PDA which is not initialized
417 yet. */
418static void __init clear_bss(void)
419{
420 memset(__bss_start, 0,

--- 153 unchanged lines hidden (view full) ---

574
575 desc->address = (unsigned long)idt;
576 native_load_idt(desc);
577}
578
579/* This is used when running on kernel addresses */
580void early_setup_idt(void)
581{
582 /* VMM Communication Exception */
583 if (IS_ENABLED(CONFIG_AMD_MEM_ENCRYPT))
584 set_bringup_idt_handler(bringup_idt_table, X86_TRAP_VC, vc_boot_ghcb);
585
578 bringup_idt_descr.address = (unsigned long)bringup_idt_table;
579 native_load_idt(&bringup_idt_descr);
580}
581
582/*
583 * Setup boot CPU state needed before kernel switches to virtual addresses.
584 */
585void __head startup_64_setup_env(unsigned long physbase)

--- 12 unchanged lines hidden ---
586 bringup_idt_descr.address = (unsigned long)bringup_idt_table;
587 native_load_idt(&bringup_idt_descr);
588}
589
590/*
591 * Setup boot CPU state needed before kernel switches to virtual addresses.
592 */
593void __head startup_64_setup_env(unsigned long physbase)

--- 12 unchanged lines hidden ---