]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.h
IntelSiliconPkg: Add package DSC file
[mirror_edk2.git] / OvmfPkg / EmuVariableFvbRuntimeDxe / Fvb.h
index f34fad2cdd487df3a5b49ce44ded8d83f2592bcb..beb11e3f9a90a95354827d88e5e70be402d0ae96 100644 (file)
@@ -1,18 +1,18 @@
 /*++\r
 \r
 Copyright (c) 2006, 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
+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
 \r
 Module Name:\r
 \r
   FwBlockService.h\r
-  \r
+\r
 Abstract:\r
 \r
   Firmware volume block driver for Intel Firmware Hub (FWH) device\r
@@ -58,8 +58,14 @@ typedef struct {
 //\r
 // Constants\r
 //\r
-#define EMU_FVB_BLOCK_SIZE (FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize))\r
-#define EMU_FVB_SIZE (2 * FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize))\r
+#define EMU_FVB_BLOCK_SIZE \\r
+  EFI_PAGE_SIZE\r
+#define EMU_FVB_NUM_SPARE_BLOCKS \\r
+  EFI_SIZE_TO_PAGES ((UINTN)FixedPcdGet32 (PcdFlashNvStorageFtwSpareSize))\r
+#define EMU_FVB_NUM_TOTAL_BLOCKS \\r
+  (2 * EMU_FVB_NUM_SPARE_BLOCKS)\r
+#define EMU_FVB_SIZE \\r
+  (EMU_FVB_NUM_TOTAL_BLOCKS * EMU_FVB_BLOCK_SIZE)\r
 #define FTW_WRITE_QUEUE_SIZE \\r
   (FixedPcdGet32 (PcdFlashNvStorageFtwWorkingSize) - \\r
    sizeof (EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER))\r