]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/OvmfPkg.fdf.inc
OvmfPkg: introduce the FD_SIZE_IN_KB macro / build flag
[mirror_edk2.git] / OvmfPkg / OvmfPkg.fdf.inc
1 ## @file
2 # FDF include file that defines the main macros and sets the dependent PCDs.
3 #
4 # Copyright (C) 2014, Red Hat, Inc.
5 # Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
6 #
7 # This program and the accompanying materials are licensed and made available
8 # under the terms and conditions of the BSD License which accompanies this
9 # distribution. The full text of the license may be found at
10 # http://opensource.org/licenses/bsd-license.php
11 #
12 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
14 # IMPLIED.
15 #
16 ##
17
18 DEFINE BLOCK_SIZE = 0x1000
19 DEFINE VARS_SIZE = 0x20000
20 DEFINE VARS_BLOCKS = 0x20
21
22 !if $(FD_SIZE_IN_KB) == 1024
23 DEFINE FW_BASE_ADDRESS = 0xFFF00000
24 DEFINE FW_SIZE = 0x00100000
25 DEFINE FW_BLOCKS = 0x100
26 DEFINE CODE_BASE_ADDRESS = 0xFFF20000
27 DEFINE CODE_SIZE = 0x000E0000
28 DEFINE CODE_BLOCKS = 0xE0
29 DEFINE FVMAIN_SIZE = 0x000CC000
30 DEFINE SECFV_OFFSET = 0x000EC000
31 DEFINE SECFV_SIZE = 0x14000
32 !endif
33
34 !if $(FD_SIZE_IN_KB) == 2048
35 DEFINE FW_BASE_ADDRESS = 0xFFE00000
36 DEFINE FW_SIZE = 0x00200000
37 DEFINE FW_BLOCKS = 0x200
38 DEFINE CODE_BASE_ADDRESS = 0xFFE20000
39 DEFINE CODE_SIZE = 0x001E0000
40 DEFINE CODE_BLOCKS = 0x1E0
41 DEFINE FVMAIN_SIZE = 0x001AC000
42 DEFINE SECFV_OFFSET = 0x001CC000
43 DEFINE SECFV_SIZE = 0x34000
44 !endif
45
46 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
47 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
48 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
49
50 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
51 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = 0xE000
52
53 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
54 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
55
56 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
57 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
58
59 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
60 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = 0x10000
61
62 DEFINE MEMFD_BASE_ADDRESS = 0x800000