mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 22:42:53 +00:00
HV: Add helper function send_single_nmi
This patch adds a helper function send_single_nmi. The fisrt caller will soon come with the following patch. 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
525d4d3cd0
commit
2777f23075
@ -288,3 +288,18 @@ void send_single_init(uint16_t pcpu_id)
|
||||
|
||||
msr_write(MSR_IA32_EXT_APIC_ICR, icr.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @pre pcpu_id < CONFIG_MAX_PCPU_NUM
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void send_single_nmi(uint16_t pcpu_id)
|
||||
{
|
||||
union apic_icr icr;
|
||||
|
||||
icr.value_32.hi_32 = per_cpu(lapic_id, pcpu_id);
|
||||
icr.value_32.lo_32 = (INTR_LAPIC_ICR_PHYSICAL << 11U) | (INTR_LAPIC_ICR_NMI << 8U);
|
||||
|
||||
msr_write(MSR_IA32_EXT_APIC_ICR, icr.value);
|
||||
}
|
||||
|
@ -183,4 +183,13 @@ void send_single_ipi(uint16_t pcpu_id, uint32_t vector);
|
||||
*/
|
||||
void send_single_init(uint16_t pcpu_id);
|
||||
|
||||
/**
|
||||
* @brief Send an NMI signal to a single pCPU
|
||||
*
|
||||
* @param[in] pcpu_id The id of destination physical cpu
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void send_single_nmi(uint16_t pcpu_id);
|
||||
|
||||
#endif /* INTR_LAPIC_H */
|
||||
|
Loading…
Reference in New Issue
Block a user