]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
UefiCpuPkg/PiSmm: Fix various typos
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / PiSmmCpuDxeSmm.h
index a0e59f20886b1cedead0a203d9fe7fc73b4ab92d..fe7e8b0323b82095faa8b48582e0680a1035fc4c 100644 (file)
@@ -53,8 +53,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #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
@@ -212,11 +212,24 @@ typedef struct {
   UINTN                   Signature;\r
   LIST_ENTRY              Link;\r
 \r
-  SPIN_LOCK               *ProcedureToken;\r
+  SPIN_LOCK               *SpinLock;\r
+  volatile UINT32         RunningApCount;\r
+  BOOLEAN                 Used;\r
 } PROCEDURE_TOKEN;\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
@@ -242,7 +255,6 @@ typedef struct {
 \r
   PROCEDURE_WRAPPER               *ApWrapperFunc;\r
   LIST_ENTRY                      TokenList;\r
-\r
 } SMM_CPU_PRIVATE_DATA;\r
 \r
 extern SMM_CPU_PRIVATE_DATA  *gSmmCpuPrivate;\r
@@ -272,7 +284,7 @@ extern UINT8  mSmmSaveStateRegisterLma;
 \r
   @retval EFI_SUCCESS   The register was read from Save State\r
   @retval EFI_NOT_FOUND The register is not defined for the Save State of Processor\r
-  @retval EFI_INVALID_PARAMTER   This or Buffer is NULL.\r
+  @retval EFI_INVALID_PARAMETER   This or Buffer is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -296,7 +308,7 @@ SmmReadSaveState (
 \r
   @retval EFI_SUCCESS   The register was written from Save State\r
   @retval EFI_NOT_FOUND The register is not defined for the Save State of Processor\r
-  @retval EFI_INVALID_PARAMTER   ProcessorIndex or Width is not correct\r
+  @retval EFI_INVALID_PARAMETER   ProcessorIndex or Width is not correct\r
 \r
 **/\r
 EFI_STATUS\r
@@ -324,7 +336,7 @@ This function supports reading a CPU Save State register in SMBase relocation ha
 \r
 @retval EFI_SUCCESS           The register was read from Save State.\r
 @retval EFI_NOT_FOUND         The register is not defined for the Save State of Processor.\r
-@retval EFI_INVALID_PARAMTER  This or Buffer is NULL.\r
+@retval EFI_INVALID_PARAMETER  This or Buffer is NULL.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -351,7 +363,7 @@ This function supports writing a CPU Save State register in SMBase relocation ha
 \r
 @retval EFI_SUCCESS           The register was written to Save State.\r
 @retval EFI_NOT_FOUND         The register is not defined for the Save State of Processor.\r
-@retval EFI_INVALID_PARAMTER  ProcessorIndex or Width is not correct.\r
+@retval EFI_INVALID_PARAMETER  ProcessorIndex or Width is not correct.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -392,7 +404,7 @@ typedef struct {
   volatile VOID                     *Parameter;\r
   volatile UINT32                   *Run;\r
   volatile BOOLEAN                  *Present;\r
-  SPIN_LOCK                         *Token;\r
+  PROCEDURE_TOKEN                   *Token;\r
   EFI_STATUS                        *Status;\r
 } SMM_CPU_DATA_BLOCK;\r
 \r
@@ -1251,7 +1263,7 @@ EdkiiSmmGetMemoryAttributes (
 \r
 /**\r
   This function fixes up the address of the global variable or function\r
-  referred in SmmInit assembly files to be the absoute address.\r
+  referred in SmmInit assembly files to be the absolute address.\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1260,7 +1272,7 @@ PiSmmCpuSmmInitFixupAddress (
 \r
 /**\r
   This function fixes up the address of the global variable or function\r
-  referred in SmiEntry assembly files to be the absoute address.\r
+  referred in SmiEntry assembly files to be the absolute address.\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1311,7 +1323,7 @@ RestoreCr2 (
                                             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
@@ -1437,8 +1449,8 @@ InternalSmmStartupAllAPs (
 **/\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
@@ -1450,4 +1462,15 @@ InitializeDataForMmMp (
   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