mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-04 09:50:54 +00:00
HV: Install a NMI handler in acrn IDT
This patch installs a NMI handler in acrn IDT to handle NMIs out of dispatch_exception. Tracked-On: #3886 Acked-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Kaige Fu <kaige.fu@intel.com>
This commit is contained in:
parent
fb346a6c11
commit
525d4d3cd0
@ -110,9 +110,9 @@ excp_debug:
|
|||||||
|
|
||||||
.align 8
|
.align 8
|
||||||
excp_nmi:
|
excp_nmi:
|
||||||
|
pushq $0x0 /* pseudo error code */
|
||||||
|
pushq $0x2
|
||||||
|
jmp nmi_save_frame
|
||||||
|
|
||||||
.align 8
|
.align 8
|
||||||
excp_breakpoint:
|
excp_breakpoint:
|
||||||
@ -330,6 +330,19 @@ excp_rsvd:
|
|||||||
|
|
||||||
iretq
|
iretq
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Common entry point for NMI interrupts
|
||||||
|
*/
|
||||||
|
.align 8
|
||||||
|
nmi_save_frame:
|
||||||
|
save_frame
|
||||||
|
|
||||||
|
call handle_nmi
|
||||||
|
|
||||||
|
restore_frame
|
||||||
|
|
||||||
|
iretq
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common entry point for defined interrupts.
|
* Common entry point for defined interrupts.
|
||||||
|
@ -382,6 +382,14 @@ void dispatch_exception(struct intr_excp_ctx *ctx)
|
|||||||
cpu_dead();
|
cpu_dead();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handle_nmi(__unused struct intr_excp_ctx *ctx)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Just ignore the NMI here for now.
|
||||||
|
* TODO: implement specific NMI handling function.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
static void init_irq_descs(void)
|
static void init_irq_descs(void)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
@ -302,6 +302,15 @@ uint32_t irq_to_vector(uint32_t irq);
|
|||||||
*/
|
*/
|
||||||
void dispatch_interrupt(const struct intr_excp_ctx *ctx);
|
void dispatch_interrupt(const struct intr_excp_ctx *ctx);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handle NMI
|
||||||
|
*
|
||||||
|
* To handle an NMI
|
||||||
|
*
|
||||||
|
* @param ctx Pointer to interrupt exception context
|
||||||
|
*/
|
||||||
|
void handle_nmi(__unused struct intr_excp_ctx *ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initialize interrupt
|
* @brief Initialize interrupt
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user