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