Objects registered in processor's smm_listeners attribute will
be called via the notification method whenever the CPU's enters
and leaves SMI handler. SMI handler entry occurs on SMI processing. SMI
handler exit occurs by RSM instruction execution. Please note that for both
SMI handler entry and SMI handler exit notification method will be
invoked twice: at the beginning of the entry/exit and at the end when CPU
state was already modified. event argument says if entry/exit is
performed, phase argument equals to X86_Smm_Phase0 for
the beginning of the event and to X86_Smm_Phase1 for the end.
typedef enum x86_smm_event_type {
X86_Smm_Enter,
X86_Smm_Leave
} x86_smm_event_type_t;
typedef enum x86_smm_phase_type {
X86_Smm_Phase0,
X86_Smm_Phase1
} x86_smm_phase_type_t;
SIM_INTERFACE(x86_smm_notification) {
void (*notification)(conf_object_t *listener, conf_object_t *cpu,
x86_smm_event_type_t event,
x86_smm_phase_type_t phase);
};
#define X86_SMM_NOTIFICATION_INTERFACE "x86_smm_notification"