]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/OvmfPkg.fdf.inc
OvmfPkg/OvmfPkg.fdf.inc: extract VARS_LIVE_SIZE and VARS_SPARE_SIZE macros
[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 DEFINE VARS_LIVE_SIZE = 0xE000
22 DEFINE VARS_SPARE_SIZE = 0x10000
23
24 !if $(FD_SIZE_IN_KB) == 1024
25 DEFINE FW_BASE_ADDRESS = 0xFFF00000
26 DEFINE FW_SIZE = 0x00100000
27 DEFINE FW_BLOCKS = 0x100
28 DEFINE CODE_BASE_ADDRESS = 0xFFF20000
29 DEFINE CODE_SIZE = 0x000E0000
30 DEFINE CODE_BLOCKS = 0xE0
31 DEFINE FVMAIN_SIZE = 0x000CC000
32 DEFINE SECFV_OFFSET = 0x000EC000
33 DEFINE SECFV_SIZE = 0x14000
34 !endif
35
36 !if $(FD_SIZE_IN_KB) == 2048
37 DEFINE FW_BASE_ADDRESS = 0xFFE00000
38 DEFINE FW_SIZE = 0x00200000
39 DEFINE FW_BLOCKS = 0x200
40 DEFINE CODE_BASE_ADDRESS = 0xFFE20000
41 DEFINE CODE_SIZE = 0x001E0000
42 DEFINE CODE_BLOCKS = 0x1E0
43 DEFINE FVMAIN_SIZE = 0x001AC000
44 DEFINE SECFV_OFFSET = 0x001CC000
45 DEFINE SECFV_SIZE = 0x34000
46 !endif
47
48 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
49 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
50 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
51
52 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
53 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = $(VARS_LIVE_SIZE)
54
55 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
56 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
57
58 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
59 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
60
61 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
62 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)
63
64 DEFINE MEMFD_BASE_ADDRESS = 0x800000