]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c
OvmfPkg:Fix VS2012 build failure
[mirror_edk2.git] / OvmfPkg / Library / BaseMemEncryptSevLib / X64 / VirtualMemory.c
index 39b246048f1f2f37b745d6a60e1b82ca4c643d79..5d6289df10d9f85c2ecdbcf7f1acc5f58017ae8a 100644 (file)
@@ -2,7 +2,7 @@
 \r
   Virtual Memory Management Services to set or clear the memory encryption bit\r
 \r
-  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials are licensed and made available\r
@@ -18,8 +18,8 @@
 **/\r
 \r
 #include <Library/CpuLib.h>\r
-#include <Register/Cpuid.h>\r
 #include <Register/Amd/Cpuid.h>\r
+#include <Register/Cpuid.h>\r
 \r
 #include "VirtualMemory.h"\r
 \r
@@ -596,6 +596,11 @@ SetMemoryEncDec (
   BOOLEAN                        IsWpEnabled;\r
   RETURN_STATUS                  Status;\r
 \r
+  //\r
+  // Set PageMapLevel4Entry to suppress incorrect compiler/analyzer warnings.\r
+  //\r
+  PageMapLevel4Entry = NULL;\r
+\r
   DEBUG ((\r
     DEBUG_VERBOSE,\r
     "%a:%a: Cr3Base=0x%Lx Physical=0x%Lx Length=0x%Lx Mode=%a CacheFlush=%u\n",\r