]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/OvmfPkg.fdf.inc
MdePkg/UefiBaseType.h: treat EBC as a non-native machine type
[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 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 #
9 ##
10
11 DEFINE BLOCK_SIZE = 0x1000
12
13 #
14 # A firmware binary built with FD_SIZE_IN_KB=1024, and a firmware binary built
15 # with FD_SIZE_IN_KB=2048, use the same variable store layout.
16 #
17 # Setting FD_SIZE_IN_KB to 4096 results in a different (much larger) variable
18 # store structure that is incompatible with both of the above-mentioned
19 # firmware binaries.
20 #
21 !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
22 DEFINE VARS_SIZE = 0x20000
23 DEFINE VARS_BLOCKS = 0x20
24 DEFINE VARS_LIVE_SIZE = 0xE000
25 DEFINE VARS_SPARE_SIZE = 0x10000
26 !endif
27
28 !if $(FD_SIZE_IN_KB) == 1024
29 DEFINE FW_BASE_ADDRESS = 0xFFF00000
30 DEFINE FW_SIZE = 0x00100000
31 DEFINE FW_BLOCKS = 0x100
32 DEFINE CODE_BASE_ADDRESS = 0xFFF20000
33 DEFINE CODE_SIZE = 0x000E0000
34 DEFINE CODE_BLOCKS = 0xE0
35 DEFINE FVMAIN_SIZE = 0x000CC000
36 DEFINE SECFV_OFFSET = 0x000EC000
37 DEFINE SECFV_SIZE = 0x14000
38 !endif
39
40 !if $(FD_SIZE_IN_KB) == 2048
41 DEFINE FW_BASE_ADDRESS = 0xFFE00000
42 DEFINE FW_SIZE = 0x00200000
43 DEFINE FW_BLOCKS = 0x200
44 DEFINE CODE_BASE_ADDRESS = 0xFFE20000
45 DEFINE CODE_SIZE = 0x001E0000
46 DEFINE CODE_BLOCKS = 0x1E0
47 DEFINE FVMAIN_SIZE = 0x001AC000
48 DEFINE SECFV_OFFSET = 0x001CC000
49 DEFINE SECFV_SIZE = 0x34000
50 !endif
51
52 !if $(FD_SIZE_IN_KB) == 4096
53 DEFINE VARS_SIZE = 0x84000
54 DEFINE VARS_BLOCKS = 0x84
55 DEFINE VARS_LIVE_SIZE = 0x40000
56 DEFINE VARS_SPARE_SIZE = 0x42000
57
58 DEFINE FW_BASE_ADDRESS = 0xFFC00000
59 DEFINE FW_SIZE = 0x00400000
60 DEFINE FW_BLOCKS = 0x400
61 DEFINE CODE_BASE_ADDRESS = 0xFFC84000
62 DEFINE CODE_SIZE = 0x0037C000
63 DEFINE CODE_BLOCKS = 0x37C
64 DEFINE FVMAIN_SIZE = 0x00348000
65 DEFINE SECFV_OFFSET = 0x003CC000
66 DEFINE SECFV_SIZE = 0x34000
67 !endif
68
69 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
70 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
71 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
72
73 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
74 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = $(VARS_LIVE_SIZE)
75
76 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
77 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
78
79 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
80 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
81
82 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
83 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)
84
85 DEFINE MEMFD_BASE_ADDRESS = 0x800000