]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c
OvmfPkg: replace old EFI_D_ debug levels with new DEBUG_ ones
[mirror_edk2.git] / OvmfPkg / EmuVariableFvbRuntimeDxe / Fvb.c
index 2d106bb50bed68d2739204c86a0567e37426db60..766ad1e59f472e8fe38f92e17b9fe77fc2c9df80 100644 (file)
@@ -3,13 +3,7 @@
   by pretending that a memory buffer is storage for the NV variables.\r
 \r
   Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -585,7 +579,7 @@ ValidateFvHeader (
       (FwVolHeader->FvLength != EMU_FVB_SIZE) ||\r
       (FwVolHeader->HeaderLength != EMU_FV_HEADER_LENGTH)\r
       ) {\r
-    DEBUG ((EFI_D_INFO, "EMU Variable FVB: Basic FV headers were invalid\n"));\r
+    DEBUG ((DEBUG_INFO, "EMU Variable FVB: Basic FV headers were invalid\n"));\r
     return EFI_NOT_FOUND;\r
   }\r
   //\r
@@ -594,7 +588,7 @@ ValidateFvHeader (
   Checksum = CalculateSum16((VOID*) FwVolHeader, FwVolHeader->HeaderLength);\r
 \r
   if (Checksum != 0) {\r
-    DEBUG ((EFI_D_INFO, "EMU Variable FVB: FV checksum was invalid\n"));\r
+    DEBUG ((DEBUG_INFO, "EMU Variable FVB: FV checksum was invalid\n"));\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -665,7 +659,7 @@ InitializeFvAndVariableStoreHeaders (
 \r
       // UINT32  Size;\r
       (\r
-        FixedPcdGet32 (PcdVariableStoreSize) -\r
+        FixedPcdGet32 (PcdFlashNvStorageVariableSize) -\r
         OFFSET_OF (FVB_FV_HDR_AND_VARS_TEMPLATE, VarHdr)\r
       ),\r
 \r
@@ -725,7 +719,7 @@ FvbInitialize (
   EFI_PHYSICAL_ADDRESS                Address;\r
   RETURN_STATUS                       PcdStatus;\r
 \r
-  DEBUG ((EFI_D_INFO, "EMU Variable FVB Started\n"));\r
+  DEBUG ((DEBUG_INFO, "EMU Variable FVB Started\n"));\r
 \r
   //\r
   // Verify that the PCD's are set correctly.\r
@@ -733,17 +727,17 @@ FvbInitialize (
   ASSERT (FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize) %\r
           EMU_FVB_BLOCK_SIZE == 0);\r
   if (\r
-       (PcdGet32 (PcdVariableStoreSize) +\r
+       (PcdGet32 (PcdFlashNvStorageVariableSize) +\r
         PcdGet32 (PcdFlashNvStorageFtwWorkingSize)\r
        ) >\r
        EMU_FVB_NUM_SPARE_BLOCKS * EMU_FVB_BLOCK_SIZE\r
      ) {\r
-    DEBUG ((EFI_D_ERROR, "EMU Variable invalid PCD sizes\n"));\r
+    DEBUG ((DEBUG_ERROR, "EMU Variable invalid PCD sizes\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   if (PcdGet64 (PcdFlashNvStorageVariableBase64) != 0) {\r
-    DEBUG ((EFI_D_INFO, "Disabling EMU Variable FVB since "\r
+    DEBUG ((DEBUG_INFO, "Disabling EMU Variable FVB since "\r
                         "flash variables appear to be supported.\n"));\r
     return EFI_ABORTED;\r
   }\r
@@ -760,13 +754,13 @@ FvbInitialize (
   if (PcdGet64 (PcdEmuVariableNvStoreReserved) != 0) {\r
     Ptr = (VOID*)(UINTN) PcdGet64 (PcdEmuVariableNvStoreReserved);\r
     DEBUG ((\r
-      EFI_D_INFO,\r
+      DEBUG_INFO,\r
       "EMU Variable FVB: Using pre-reserved block at %p\n",\r
       Ptr\r
       ));\r
     Status = ValidateFvHeader (Ptr);\r
     if (!EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_INFO, "EMU Variable FVB: Found valid pre-existing FV\n"));\r
+      DEBUG ((DEBUG_INFO, "EMU Variable FVB: Found valid pre-existing FV\n"));\r
       Initialize = FALSE;\r
     }\r
   } else {\r
@@ -788,7 +782,7 @@ FvbInitialize (
   //\r
   // Initialize the Fault Tolerant Write data area\r
   //\r
-  SubPtr = (VOID*) ((UINT8*) Ptr + PcdGet32 (PcdVariableStoreSize));\r
+  SubPtr = (VOID*) ((UINT8*) Ptr + PcdGet32 (PcdFlashNvStorageVariableSize));\r
   PcdStatus = PcdSet32S (PcdFlashNvStorageFtwWorkingBase,\r
                 (UINT32)(UINTN) SubPtr);\r
   ASSERT_RETURN_ERROR (PcdStatus);\r
@@ -812,7 +806,7 @@ FvbInitialize (
   //\r
   // Install the protocols\r
   //\r
-  DEBUG ((EFI_D_INFO, "Installing FVB for EMU Variable support\n"));\r
+  DEBUG ((DEBUG_INFO, "Installing FVB for EMU Variable support\n"));\r
   Handle = 0;\r
   Status = gBS->InstallMultipleProtocolInterfaces (\r
                   &Handle,\r