Path: blob/master/arch/x86/boot/compressed/idt_handlers_64.S
26481 views
/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Early IDT handler entry points3*4* Copyright (C) 2019 SUSE5*6* Author: Joerg Roedel <[email protected]>7*/89#include <asm/segment.h>1011/* For ORIG_RAX */12#include "../../entry/calling.h"1314.macro EXCEPTION_HANDLER name function error_code=015SYM_FUNC_START(\name)1617/* Build pt_regs */18.if \error_code == 019pushq $020.endif2122pushq %rdi23pushq %rsi24pushq %rdx25pushq %rcx26pushq %rax27pushq %r828pushq %r929pushq %r1030pushq %r1131pushq %rbx32pushq %rbp33pushq %r1234pushq %r1335pushq %r1436pushq %r153738/* Call handler with pt_regs */39movq %rsp, %rdi40/* Error code is second parameter */41movq ORIG_RAX(%rsp), %rsi42call \function4344/* Restore regs */45popq %r1546popq %r1447popq %r1348popq %r1249popq %rbp50popq %rbx51popq %r1152popq %r1053popq %r954popq %r855popq %rax56popq %rcx57popq %rdx58popq %rsi59popq %rdi6061/* Remove error code and return */62addq $8, %rsp6364iretq65SYM_FUNC_END(\name)66.endm6768.text69.code647071EXCEPTION_HANDLER boot_page_fault do_boot_page_fault error_code=172EXCEPTION_HANDLER boot_nmi_trap do_boot_nmi_trap error_code=07374#ifdef CONFIG_AMD_MEM_ENCRYPT75EXCEPTION_HANDLER boot_stage1_vc do_vc_no_ghcb error_code=176EXCEPTION_HANDLER boot_stage2_vc do_boot_stage2_vc error_code=177#endif787980