TianoCore EDK2 master
Loading...
Searching...
No Matches
FirstSmiHandlerContext.h
Go to the documentation of this file.
1
11#ifndef FIRST_SMI_HANDLER_CONTEXT_H_
12#define FIRST_SMI_HANDLER_CONTEXT_H_
13
14//
15// The following structure is used to communicate between the SMM Monarch
16// (running the root MMI handler) and the hot-added CPU (handling its first
17// SMI). It is placed at SMM_DEFAULT_SMBASE, which is in SMRAM under QEMU's
18// "SMRAM at default SMBASE" feature.
19//
20#pragma pack (1)
21typedef struct {
22 //
23 // When ApicIdGate is MAX_UINT64, then no hot-added CPU may proceed with
24 // SMBASE relocation.
25 //
26 // Otherwise, the hot-added CPU whose APIC ID equals ApicIdGate may proceed
27 // with SMBASE relocation.
28 //
29 // This field is intentionally wider than APIC_ID (UINT32) because we need a
30 // "gate locked" value that is different from all possible APIC_IDs.
31 //
32 UINT64 ApicIdGate;
33 //
34 // The new SMBASE value for the hot-added CPU to set in the SMRAM Save State
35 // Map, before leaving SMM with the RSM instruction.
36 //
37 UINT32 NewSmbase;
38 //
39 // The hot-added CPU sets this field to 1 right before executing the RSM
40 // instruction. This tells the SMM Monarch to proceed to polling the last
41 // byte of the normal RAM reserved page (Post-SMM Pen).
42 //
43 UINT8 AboutToLeaveSmm;
45#pragma pack ()
46
47#endif // FIRST_SMI_HANDLER_CONTEXT_H_