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