VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/OvmfPkg.fdf.inc@ 79205

Last change on this file since 79205 was 77673, checked in by vboxsync, 6 years ago

EFI: MEMFD_BASE_ADDRESS needs to be properly defined or decompression fails.

  • 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# 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
18DEFINE BLOCK_SIZE = 0x1000
19
20#
21# A firmware binary built with FD_SIZE_IN_KB=1024, and a firmware binary built
22# with FD_SIZE_IN_KB=2048, use the same variable store layout.
23#
24# Setting FD_SIZE_IN_KB to 4096 results in a different (much larger) variable
25# store structure that is incompatible with both of the above-mentioned
26# firmware binaries.
27#
28!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048)
29DEFINE VARS_SIZE = 0x20000
30DEFINE VARS_BLOCKS = 0x20
31DEFINE VARS_LIVE_SIZE = 0xE000
32DEFINE VARS_SPARE_SIZE = 0x10000
33!endif
34
35!if $(FD_SIZE_IN_KB) == 1024
36DEFINE FW_BASE_ADDRESS = 0xFFF00000
37DEFINE FW_SIZE = 0x00100000
38DEFINE FW_BLOCKS = 0x100
39DEFINE CODE_BASE_ADDRESS = 0xFFF20000
40DEFINE CODE_SIZE = 0x000E0000
41DEFINE CODE_BLOCKS = 0xE0
42DEFINE FVMAIN_SIZE = 0x000CC000
43DEFINE SECFV_OFFSET = 0x000EC000
44DEFINE SECFV_SIZE = 0x14000
45!endif
46
47!if $(FD_SIZE_IN_KB) == 2048
48DEFINE FW_BASE_ADDRESS = 0xFFE00000
49DEFINE FW_SIZE = 0x00200000
50DEFINE FW_BLOCKS = 0x200
51DEFINE CODE_BASE_ADDRESS = 0xFFE20000
52DEFINE CODE_SIZE = 0x001E0000
53DEFINE CODE_BLOCKS = 0x1E0
54DEFINE FVMAIN_SIZE = 0x001AC000
55DEFINE SECFV_OFFSET = 0x001CC000
56DEFINE SECFV_SIZE = 0x34000
57!endif
58
59!if $(FD_SIZE_IN_KB) == 4096
60DEFINE VARS_SIZE = 0x84000
61DEFINE VARS_BLOCKS = 0x84
62DEFINE VARS_LIVE_SIZE = 0x40000
63DEFINE VARS_SPARE_SIZE = 0x42000
64
65DEFINE FW_BASE_ADDRESS = 0xFFC00000
66DEFINE FW_SIZE = 0x00400000
67DEFINE FW_BLOCKS = 0x400
68DEFINE CODE_BASE_ADDRESS = 0xFFC84000
69DEFINE CODE_SIZE = 0x0037C000
70DEFINE CODE_BLOCKS = 0x37C
71DEFINE FVMAIN_SIZE = 0x00348000
72DEFINE SECFV_OFFSET = 0x003CC000
73DEFINE SECFV_SIZE = 0x34000
74!endif
75
76SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFdBaseAddress = $(FW_BASE_ADDRESS)
77SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareFdSize = $(FW_SIZE)
78SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize = $(BLOCK_SIZE)
79
80SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase = $(FW_BASE_ADDRESS)
81SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize = $(VARS_LIVE_SIZE)
82
83SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
84SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize = $(BLOCK_SIZE)
85
86SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase + gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogSize
87SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize = $(BLOCK_SIZE)
88
89SET gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwSpareBase = gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageFtwWorkingBase + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize
90SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize = $(VARS_SPARE_SIZE)
91
92!ifndef $(VBOX)
93DEFINE MEMFD_BASE_ADDRESS = 0x800000
94!else
95# Need to relocate this or it interferes with certain OS X bootloaders breaking OS X guests
96DEFINE MEMFD_BASE_ADDRESS = 0x2000000
97!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