]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
UefiCpuPkg/PiSmmCpuDxeSmm: remove superfluous ENDs from NASM source
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / CpuS3.c
index 5e63f8aab292c7efb88532439e4e4036d14e5df0..4c995ec27068e92d7a4ac19335fe6c929641ba44 100644 (file)
@@ -34,6 +34,11 @@ typedef struct {
   UINTN LongJumpOffset;\r
 } MP_ASSEMBLY_ADDRESS_MAP;\r
 \r
+//\r
+// Spin lock used to serialize MemoryMapped operation\r
+//\r
+SPIN_LOCK                *mMemoryMappedLock = NULL;\r
+\r
 /**\r
   Get starting address and size of the rendezvous entry for APs.\r
   Information for fixing a jump instruction in the code is also returned.\r
@@ -284,6 +289,19 @@ SetProcessorRegister (
       }\r
       break;\r
     //\r
+    // MemoryMapped operations\r
+    //\r
+    case MemoryMapped:\r
+      AcquireSpinLock (mMemoryMappedLock);\r
+      MmioBitFieldWrite32 (\r
+        RegisterTableEntry->Index,\r
+        RegisterTableEntry->ValidBitStart,\r
+        RegisterTableEntry->ValidBitStart + RegisterTableEntry->ValidBitLength - 1,\r
+        (UINT32)RegisterTableEntry->Value\r
+        );\r
+      ReleaseSpinLock (mMemoryMappedLock);\r
+      break;\r
+    //\r
     // Enable or disable cache\r
     //\r
     case CacheControl:\r