#\r
##\r
\r
-#\r
-# Default flash size is 2MB.\r
-#\r
-# Defining FD_SIZE_1MB on the build command line can override this.\r
-#\r
-\r
DEFINE BLOCK_SIZE = 0x1000\r
DEFINE VARS_SIZE = 0x20000\r
DEFINE VARS_BLOCKS = 0x20\r
\r
-!ifdef $(FD_SIZE_1MB)\r
-\r
+!if $(FD_SIZE_IN_KB) == 1024\r
DEFINE FW_BASE_ADDRESS = 0xFFF00000\r
DEFINE FW_SIZE = 0x00100000\r
DEFINE FW_BLOCKS = 0x100\r
DEFINE FVMAIN_SIZE = 0x000CC000\r
DEFINE SECFV_OFFSET = 0x000EC000\r
DEFINE SECFV_SIZE = 0x14000\r
+!endif\r
\r
-!else\r
-\r
+!if $(FD_SIZE_IN_KB) == 2048\r
DEFINE FW_BASE_ADDRESS = 0xFFE00000\r
DEFINE FW_SIZE = 0x00200000\r
DEFINE FW_BLOCKS = 0x200\r
DEFINE FVMAIN_SIZE = 0x001AC000\r
DEFINE SECFV_OFFSET = 0x001CC000\r
DEFINE SECFV_SIZE = 0x34000\r
-\r
!endif\r
\r
SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)\r
DEFINE SMM_REQUIRE = FALSE\r
DEFINE TLS_ENABLE = FALSE\r
\r
+ #\r
+ # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to\r
+ # one of the supported values, in place of any of the convenience macros, is\r
+ # permitted.\r
+ #\r
+!ifdef $(FD_SIZE_1MB)\r
+ DEFINE FD_SIZE_IN_KB = 1024\r
+!else\r
+!ifdef $(FD_SIZE_2MB)\r
+ DEFINE FD_SIZE_IN_KB = 2048\r
+!else\r
+ DEFINE FD_SIZE_IN_KB = 2048\r
+!endif\r
+!endif\r
+\r
[BuildOptions]\r
GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG\r
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG\r
DEFINE SMM_REQUIRE = FALSE\r
DEFINE TLS_ENABLE = FALSE\r
\r
+ #\r
+ # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to\r
+ # one of the supported values, in place of any of the convenience macros, is\r
+ # permitted.\r
+ #\r
+!ifdef $(FD_SIZE_1MB)\r
+ DEFINE FD_SIZE_IN_KB = 1024\r
+!else\r
+!ifdef $(FD_SIZE_2MB)\r
+ DEFINE FD_SIZE_IN_KB = 2048\r
+!else\r
+ DEFINE FD_SIZE_IN_KB = 2048\r
+!endif\r
+!endif\r
+\r
[BuildOptions]\r
GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG\r
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG\r
DEFINE SMM_REQUIRE = FALSE\r
DEFINE TLS_ENABLE = FALSE\r
\r
+ #\r
+ # Flash size selection. Setting FD_SIZE_IN_KB on the command line directly to\r
+ # one of the supported values, in place of any of the convenience macros, is\r
+ # permitted.\r
+ #\r
+!ifdef $(FD_SIZE_1MB)\r
+ DEFINE FD_SIZE_IN_KB = 1024\r
+!else\r
+!ifdef $(FD_SIZE_2MB)\r
+ DEFINE FD_SIZE_IN_KB = 2048\r
+!else\r
+ DEFINE FD_SIZE_IN_KB = 2048\r
+!endif\r
+!endif\r
+\r
[BuildOptions]\r
GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG\r
GCC:RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG\r