#include <AcpiCpuData.h>\r
#include <CpuHotPlugData.h>\r
\r
-#include <Register/Cpuid.h>\r
-#include <Register/Msr.h>\r
+#include <Register/Intel/Cpuid.h>\r
+#include <Register/Intel/Msr.h>\r
\r
#include "CpuService.h"\r
#include "SmmProfile.h"\r
\r
#define PROCEDURE_TOKEN_FROM_LINK(a) CR (a, PROCEDURE_TOKEN, Link, PROCEDURE_TOKEN_SIGNATURE)\r
\r
+#define TOKEN_BUFFER_SIGNATURE SIGNATURE_32 ('T', 'K', 'B', 'S')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ LIST_ENTRY Link;\r
+\r
+ UINT8 *Buffer;\r
+} TOKEN_BUFFER;\r
+\r
+#define TOKEN_BUFFER_FROM_LINK(a) CR (a, TOKEN_BUFFER, Link, TOKEN_BUFFER_SIGNATURE)\r
+\r
//\r
// Private structure for the SMM CPU module that is stored in DXE Runtime memory\r
// Contains the SMM Configuration Protocols that is produced.\r
PROCEDURE_WRAPPER *ApWrapperFunc;\r
LIST_ENTRY TokenList;\r
\r
+ LIST_ENTRY OldTokenBufList;\r
+\r
+ UINT8 *CurrentTokenBuf;\r
+ UINT32 UsedTokenNum; // Only record tokens used in CurrentTokenBuf.\r
} SMM_CPU_PRIVATE_DATA;\r
\r
extern SMM_CPU_PRIVATE_DATA *gSmmCpuPrivate;\r
Note that timeout support is optional. Whether an implementation\r
supports this feature can be determined via the Attributes data\r
member.\r
- @param[in,out] CPUStatus This optional pointer may be used to get the status code returned\r
+ @param[in,out] CpuStatus This optional pointer may be used to get the status code returned\r
by Procedure when it completes execution on the target AP, or with\r
EFI_TIMEOUT if the Procedure fails to complete within the optional\r
timeout. The implementation will update this variable with\r
IN EFI_AP_PROCEDURE2 Procedure,\r
IN UINTN CpuIndex,\r
IN OUT VOID *ProcArguments OPTIONAL,\r
- IN MM_COMPLETION *Token,\r
+ IN OUT MM_COMPLETION *Token,\r
IN UINTN TimeoutInMicroseconds,\r
IN OUT EFI_STATUS *CpuStatus\r
);\r
@param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for\r
APs to return from Procedure, either for\r
blocking or non-blocking mode.\r
- @param[in,out] ProcedureArgument The parameter passed into Procedure for\r
+ @param[in,out] ProcedureArguments The parameter passed into Procedure for\r
all APs.\r
@param[in,out] Token This is an optional parameter that allows the caller to execute the\r
procedure in a blocking or non-blocking fashion. If it is NULL the\r
**/\r
EFI_STATUS\r
RegisterStartupProcedure (\r
- IN EFI_AP_PROCEDURE Procedure,\r
- IN VOID *ProcedureArguments OPTIONAL\r
+ IN EFI_AP_PROCEDURE Procedure,\r
+ IN OUT VOID *ProcedureArguments OPTIONAL\r
);\r
\r
/**\r
VOID\r
);\r
\r
+/**\r
+ Return whether access to non-SMRAM is restricted.\r
+\r
+ @retval TRUE Access to non-SMRAM is restricted.\r
+ @retval FALSE Access to non-SMRAM is not restricted.\r
+**/\r
+BOOLEAN\r
+IsRestrictedMemoryAccess (\r
+ VOID\r
+ );\r
+\r
#endif\r