VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/OvmfPkg/OvmfPkgDefines.fdf.inc@ 98412

Last change on this file since 98412 was 85718, checked in by vboxsync, 4 years ago

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 3.8 KB
Line 
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
11DEFINE 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)
22DEFINE VARS_SIZE = 0x20000
23DEFINE VARS_BLOCKS = 0x20
24DEFINE VARS_LIVE_SIZE = 0xE000
25DEFINE VARS_SPARE_SIZE = 0x10000
26!endif
27
28!if $(FD_SIZE_IN_KB) == 1024
29DEFINE FW_BASE_ADDRESS = 0xFFF00000
30DEFINE FW_SIZE = 0x00100000
31DEFINE FW_BLOCKS = 0x100
32DEFINE CODE_BASE_ADDRESS = 0xFFF20000
33DEFINE CODE_SIZE = 0x000E0000
34DEFINE CODE_BLOCKS = 0xE0
35DEFINE FVMAIN_SIZE = 0x000CC000
36DEFINE SECFV_OFFSET = 0x000EC000
37DEFINE SECFV_SIZE = 0x14000
38!endif
39
40!if $(FD_SIZE_IN_KB) == 2048
41DEFINE FW_BASE_ADDRESS = 0xFFE00000
42DEFINE FW_SIZE = 0x00200000
43DEFINE FW_BLOCKS = 0x200
44DEFINE CODE_BASE_ADDRESS = 0xFFE20000
45DEFINE CODE_SIZE = 0x001E0000
46DEFINE CODE_BLOCKS = 0x1E0
47DEFINE FVMAIN_SIZE = 0x001AC000
48DEFINE SECFV_OFFSET = 0x001CC000
49DEFINE SECFV_SIZE = 0x34000
50!endif
51
52!if $(FD_SIZE_IN_KB) == 4096
53DEFINE VARS_SIZE = 0x84000
54DEFINE VARS_BLOCKS = 0x84
55DEFINE VARS_LIVE_SIZE = 0x40000
56DEFINE VARS_SPARE_SIZE = 0x42000
57
58DEFINE FW_BASE_ADDRESS = 0xFFC00000
59DEFINE FW_SIZE = 0x00400000
60DEFINE FW_BLOCKS = 0x400
61DEFINE CODE_BASE_ADDRESS = 0xFFC84000
62DEFINE CODE_SIZE = 0x0037C000
63DEFINE CODE_BLOCKS = 0x37C
64DEFINE FVMAIN_SIZE = 0x00348000
65DEFINE SECFV_OFFSET = 0x003CC000
66DEFINE SECFV_SIZE = 0x34000
67!endif
68
69SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
70SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
71SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
72
73SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
74SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = $(VARS_LIVE_SIZE)
75
76SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
77SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
78
79SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
80SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
81
82SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
83SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)
84
85!if $(SMM_REQUIRE) == TRUE
86SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
87SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase
88SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase
89!endif
90
91!ifndef $(VBOX)
92DEFINE MEMFD_BASE_ADDRESS = 0x800000
93!else
94# Need to relocate this or it interferes with certain OS X bootloaders breaking OS X guests
95DEFINE MEMFD_BASE_ADDRESS = 0x2000000
96!endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette