]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/OvmfPkg.fdf.inc
OvmfPkg: introduce 4MB flash image (mainly) for Windows HCK
[mirror_edk2.git] / OvmfPkg / OvmfPkg.fdf.inc
index 4e72e35678a2ead73ae8cfe2105aea5a12e4c446..b3e0c472a1a8414898fe1368f21284e247f1f2d1 100644 (file)
 ##\r
 \r
 DEFINE BLOCK_SIZE        = 0x1000\r
+\r
+#\r
+# A firmware binary built with FD_SIZE_IN_KB=1024, and a firmware binary built\r
+# with FD_SIZE_IN_KB=2048, use the same variable store layout.\r
+#\r
+# Setting FD_SIZE_IN_KB to 4096 results in a different (much larger) variable\r
+# store structure that is incompatible with both of the above-mentioned\r
+# firmware binaries.\r
+#\r
+!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)\r
 DEFINE VARS_SIZE         = 0x20000\r
 DEFINE VARS_BLOCKS       = 0x20\r
 DEFINE VARS_LIVE_SIZE    = 0xE000\r
 DEFINE VARS_SPARE_SIZE   = 0x10000\r
+!endif\r
 \r
 !if $(FD_SIZE_IN_KB) == 1024\r
 DEFINE FW_BASE_ADDRESS   = 0xFFF00000\r
@@ -45,6 +56,23 @@ DEFINE SECFV_OFFSET      = 0x001CC000
 DEFINE SECFV_SIZE        = 0x34000\r
 !endif\r
 \r
+!if $(FD_SIZE_IN_KB) == 4096\r
+DEFINE VARS_SIZE         = 0x84000\r
+DEFINE VARS_BLOCKS       = 0x84\r
+DEFINE VARS_LIVE_SIZE    = 0x40000\r
+DEFINE VARS_SPARE_SIZE   = 0x42000\r
+\r
+DEFINE FW_BASE_ADDRESS   = 0xFFC00000\r
+DEFINE FW_SIZE           = 0x00400000\r
+DEFINE FW_BLOCKS         = 0x400\r
+DEFINE CODE_BASE_ADDRESS = 0xFFC84000\r
+DEFINE CODE_SIZE         = 0x0037C000\r
+DEFINE CODE_BLOCKS       = 0x37C\r
+DEFINE FVMAIN_SIZE       = 0x00348000\r
+DEFINE SECFV_OFFSET      = 0x003CC000\r
+DEFINE SECFV_SIZE        = 0x34000\r
+!endif\r
+\r
 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress     = $(FW_BASE_ADDRESS)\r
 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize    = $(FW_SIZE)\r
 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)\r