]> git.proxmox.com Git - mirror_edk2.git/blob - FmpDevicePkg/FmpDevicePkg.dsc
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / FmpDevicePkg / FmpDevicePkg.dsc
1 ## @file
2 # Firmware Management Protocol Device Package
3 #
4 # This package provides an implementation of a Firmware Management Protocol
5 # instance that supports the update of firmware storage devices using UEFI
6 # Capsules. The behavior of the Firmware Management Protocol instance is
7 # customized using libraries and PCDs.
8 #
9 # Copyright (c) 2016, Microsoft Corporation. All rights reserved.<BR>
10 # Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR>
11 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
12 #
13 # SPDX-License-Identifier: BSD-2-Clause-Patent
14 #
15 ##
16
17 [Defines]
18 PLATFORM_NAME = FmpDevicePkg
19 PLATFORM_GUID = 0af3d540-27c6-11e8-828b-f8597177a00a
20 PLATFORM_VERSION = 0.1
21 DSC_SPECIFICATION = 0x00010005
22 OUTPUT_DIRECTORY = Build/FmpDevicePkg
23 SUPPORTED_ARCHITECTURES = IA32|X64|ARM|AARCH64|RISCV64
24 BUILD_TARGETS = DEBUG|RELEASE|NOOPT
25 SKUID_IDENTIFIER = DEFAULT
26
27 #
28 # Define ESRT GUIDs for Firmware Management Protocol instances
29 #
30 DEFINE SYSTEM_FMP_ESRT_GUID = B461B3BD-E62A-4A71-841C-50BA4E500267
31 DEFINE DEVICE_FMP_ESRT_GUID = 226034C4-8B67-4536-8653-D6EE7CE5A316
32
33 #
34 # TRUE - Build FmpDxe module for with storage access enabled
35 # FALSE - Build FmpDxe module for with storage access disabled
36 #
37 DEFINE DEVICE_FMP_STORAGE_ACCESS_ENABLE = TRUE
38
39 !include UnitTestFrameworkPkg/UnitTestFrameworkPkgTarget.dsc.inc
40
41 [LibraryClasses]
42 UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
43 UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
44 UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
45 UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
46 MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
47 DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
48 BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
49 BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
50 PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
51 DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
52 DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
53 PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
54 !ifdef CONTINUOUS_INTEGRATION
55 BaseCryptLib|CryptoPkg/Library/BaseCryptLibNull/BaseCryptLibNull.inf
56 !else
57 IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
58 OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
59 BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
60 !endif
61 FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf
62 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
63 FmpPayloadHeaderLib|FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
64 FmpDeviceLib|FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf
65 FmpDependencyLib|FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf
66 FmpDependencyCheckLib|FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf
67 FmpDependencyDeviceLib|FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf
68 TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
69
70 [LibraryClasses.ARM, LibraryClasses.AARCH64]
71 #
72 # It is not possible to prevent the ARM compiler for generic intrinsic functions.
73 # This library provides the intrinsic functions generate by a given compiler.
74 # [LibraryClasses.ARM, LibraryClasses.AARCH64] and NULL mean link this library
75 # into all ARM and AARCH64 images.
76 #
77 NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
78
79 # Add support for stack protector
80 NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
81
82 [LibraryClasses.ARM]
83 ArmSoftFloatLib|ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf
84
85 [PcdsPatchableInModule]
86 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{0}
87
88 [Components]
89 #
90 # Libraries
91 #
92 FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
93 FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf
94 FmpDevicePkg/Library/FmpPayloadHeaderLibV1/FmpPayloadHeaderLibV1.inf
95 FmpDevicePkg/Library/FmpDeviceLibNull/FmpDeviceLibNull.inf
96 FmpDevicePkg/Library/FmpDependencyLib/FmpDependencyLib.inf
97 FmpDevicePkg/Library/FmpDependencyCheckLib/FmpDependencyCheckLib.inf
98 FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.inf
99 FmpDevicePkg/Library/FmpDependencyDeviceLibNull/FmpDependencyDeviceLibNull.inf
100 FmpDevicePkg/FmpDxe/FmpDxeLib.inf
101
102 #
103 # Modules
104 #
105 FmpDevicePkg/CapsuleUpdatePolicyDxe/CapsuleUpdatePolicyDxe.inf {
106 <LibraryClasses>
107 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
108 }
109 FmpDevicePkg/FmpDxe/FmpDxe.inf {
110 <Defines>
111 #
112 # FILE_GUID is used as ESRT GUID
113 #
114 FILE_GUID = $(SYSTEM_FMP_ESRT_GUID)
115 <PcdsFixedAtBuild>
116 #
117 # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
118 #
119 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"
120 #
121 # Certificates used to authenticate capsule update image
122 #
123 !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
124 <PcdsPatchableInModule>
125 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(SYSTEM_FMP_ESRT_GUID)")}
126 <LibraryClasses>
127 #
128 # Use CapsuleUpdatePolicyLib that calls the Capsule Update Policy Protocol.
129 # Depends on the CapsuleUpdatePolicyDxe module to produce the protocol.
130 # Required for FmpDxe modules that are intended to be platform independent.
131 #
132 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibOnProtocol/CapsuleUpdatePolicyLibOnProtocol.inf
133 }
134
135 FmpDevicePkg/FmpDxe/FmpDxe.inf {
136 <Defines>
137 #
138 # FILE_GUID is used as ESRT GUID
139 #
140 FILE_GUID = $(DEVICE_FMP_ESRT_GUID)
141 <PcdsFeatureFlag>
142 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceStorageAccessEnable|$(DEVICE_FMP_STORAGE_ACCESS_ENABLE)
143 <PcdsFixedAtBuild>
144 !if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == FALSE
145 #
146 # Disable test key detection
147 #
148 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceTestKeySha256Digest|{0}
149 !endif
150 #
151 # Unicode name string that is used to populate FMP Image Descriptor for this capsule update module
152 #
153 !if $(DEVICE_FMP_STORAGE_ACCESS_ENABLE) == TRUE
154 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device"
155 !else
156 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageIdName|L"Sample Firmware Device No Storage Access"
157 !endif
158 #
159 # Certificates used to authenticate capsule update image
160 #
161 !include BaseTools/Source/Python/Pkcs7Sign/TestRoot.cer.gFmpDevicePkgTokenSpaceGuid.PcdFmpDevicePkcs7CertBufferXdr.inc
162 <PcdsPatchableInModule>
163 gFmpDevicePkgTokenSpaceGuid.PcdFmpDeviceImageTypeIdGuid|{GUID("$(DEVICE_FMP_ESRT_GUID)")}
164 <LibraryClasses>
165 #
166 # Directly use a platform specific CapsuleUpdatePolicyLib instance.
167 # Only works for FmpDxe modules that are build from sources and included
168 # in a system firmware image.
169 #
170 CapsuleUpdatePolicyLib|FmpDevicePkg/Library/CapsuleUpdatePolicyLibNull/CapsuleUpdatePolicyLibNull.inf
171 }
172
173 #
174 # Add UEFI Target Based Unit Tests
175 #
176 FmpDevicePkg/Test/UnitTest/Library/FmpDependencyLib/FmpDependencyLibUnitTestsUefi.inf
177
178 [BuildOptions]
179 *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES