]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/OvmfPkgDefines.fdf.inc
OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call
[mirror_edk2.git] / OvmfPkg / OvmfPkgDefines.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 DEFINE VARS_OFFSET = 0
13
14 #
15 # A firmware binary built with FD_SIZE_IN_KB=1024, and a firmware binary built
16 # with FD_SIZE_IN_KB=2048, use the same variable store layout.
17 #
18 # Setting FD_SIZE_IN_KB to 4096 results in a different (much larger) variable
19 # store structure that is incompatible with both of the above-mentioned
20 # firmware binaries.
21 #
22 !if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
23 DEFINE VARS_SIZE = 0x20000
24 DEFINE VARS_BLOCKS = 0x20
25 DEFINE VARS_LIVE_SIZE = 0xE000
26 DEFINE VARS_SPARE_SIZE = 0x10000
27 !endif
28
29 !if $(FD_SIZE_IN_KB) == 1024
30 DEFINE FW_BASE_ADDRESS = 0xFFF00000
31 DEFINE FW_SIZE = 0x00100000
32 DEFINE FW_BLOCKS = 0x100
33 DEFINE CODE_BASE_ADDRESS = 0xFFF20000
34 DEFINE CODE_SIZE = 0x000E0000
35 DEFINE CODE_BLOCKS = 0xE0
36 DEFINE FVMAIN_SIZE = 0x000CC000
37 DEFINE SECFV_OFFSET = 0x000EC000
38 DEFINE SECFV_SIZE = 0x14000
39 !endif
40
41 !if $(FD_SIZE_IN_KB) == 2048
42 DEFINE FW_BASE_ADDRESS = 0xFFE00000
43 DEFINE FW_SIZE = 0x00200000
44 DEFINE FW_BLOCKS = 0x200
45 DEFINE CODE_BASE_ADDRESS = 0xFFE20000
46 DEFINE CODE_SIZE = 0x001E0000
47 DEFINE CODE_BLOCKS = 0x1E0
48 DEFINE FVMAIN_SIZE = 0x001AC000
49 DEFINE SECFV_OFFSET = 0x001CC000
50 DEFINE SECFV_SIZE = 0x34000
51 !endif
52
53 !if $(FD_SIZE_IN_KB) == 4096
54 DEFINE VARS_SIZE = 0x84000
55 DEFINE VARS_BLOCKS = 0x84
56 DEFINE VARS_LIVE_SIZE = 0x40000
57 DEFINE VARS_SPARE_SIZE = 0x42000
58
59 DEFINE FW_BASE_ADDRESS = 0xFFC00000
60 DEFINE FW_SIZE = 0x00400000
61 DEFINE FW_BLOCKS = 0x400
62 DEFINE CODE_BASE_ADDRESS = 0xFFC84000
63 DEFINE CODE_SIZE = 0x0037C000
64 DEFINE CODE_BLOCKS = 0x37C
65 DEFINE FVMAIN_SIZE = 0x00348000
66 DEFINE SECFV_OFFSET = 0x003CC000
67 DEFINE SECFV_SIZE = 0x34000
68 !endif
69
70 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
71 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
72 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
73
74 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
75 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = $(VARS_LIVE_SIZE)
76
77 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
78 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
79
80 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
81 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
82
83 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
84 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)
85
86 # The OVMF WorkArea contains a fixed size header followed by the actual data.
87 # The size of header is accessed through a fixed PCD in the reset vector code.
88 # The value need to be kept in sync with the any changes to the Confidential
89 # Computing Work Area header defined in the Include/WorkArea.h
90 SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfConfidentialComputingWorkAreaHeader = 4
91
92 SET gUefiOvmfPkgTokenSpaceGuid.PcdCfvBase = $(FW_BASE_ADDRESS)
93 SET gUefiOvmfPkgTokenSpaceGuid.PcdCfvRawDataOffset = $(VARS_OFFSET)
94 SET gUefiOvmfPkgTokenSpaceGuid.PcdCfvRawDataSize = $(VARS_SIZE)
95
96 SET gUefiOvmfPkgTokenSpaceGuid.PcdBfvBase = $(CODE_BASE_ADDRESS)
97 SET gUefiOvmfPkgTokenSpaceGuid.PcdBfvRawDataOffset = $(VARS_SIZE)
98 SET gUefiOvmfPkgTokenSpaceGuid.PcdBfvRawDataSize = $(CODE_SIZE)
99
100 !if $(SMM_REQUIRE) == TRUE
101 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
102 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase
103 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase
104 !endif
105
106 DEFINE MEMFD_BASE_ADDRESS = 0x800000