2010-01-28 09:19:25 +01:00
|
|
|
## @file
|
2009-08-24 17:31:04 +02:00
|
|
|
# EFI/PI Reference Module Package for All Architectures
|
|
|
|
#
|
2014-12-04 01:32:24 +01:00
|
|
|
# (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
2015-02-02 15:42:22 +01:00
|
|
|
# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
2009-08-24 17:31:04 +02:00
|
|
|
#
|
2010-04-24 11:49:11 +02:00
|
|
|
# This program and the accompanying materials
|
2009-08-24 17:31:04 +02:00
|
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
|
|
#
|
|
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
#
|
2010-01-28 09:19:25 +01:00
|
|
|
##
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
[Defines]
|
|
|
|
PLATFORM_NAME = MdeModule
|
|
|
|
PLATFORM_GUID = 587CE499-6CBE-43cd-94E2-186218569478
|
2014-09-02 07:54:02 +02:00
|
|
|
PLATFORM_VERSION = 0.94
|
2009-08-24 17:31:04 +02:00
|
|
|
DSC_SPECIFICATION = 0x00010005
|
|
|
|
OUTPUT_DIRECTORY = Build/MdeModule
|
2013-08-07 13:28:15 +02:00
|
|
|
SUPPORTED_ARCHITECTURES = IA32|IPF|X64|EBC|ARM|AARCH64
|
2011-09-18 14:28:22 +02:00
|
|
|
BUILD_TARGETS = DEBUG|RELEASE
|
2009-08-24 17:31:04 +02:00
|
|
|
SKUID_IDENTIFIER = DEFAULT
|
|
|
|
|
2010-02-24 01:21:16 +01:00
|
|
|
[LibraryClasses]
|
2010-05-21 04:49:29 +02:00
|
|
|
#
|
|
|
|
# Entry point
|
|
|
|
#
|
2009-08-24 17:31:04 +02:00
|
|
|
PeiCoreEntryPoint|MdePkg/Library/PeiCoreEntryPoint/PeiCoreEntryPoint.inf
|
|
|
|
PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
|
|
|
|
DxeCoreEntryPoint|MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
|
|
|
|
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
|
|
|
|
UefiApplicationEntryPoint|MdePkg/Library/UefiApplicationEntryPoint/UefiApplicationEntryPoint.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
#
|
|
|
|
# Basic
|
|
|
|
#
|
|
|
|
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
|
|
|
|
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
|
|
|
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
|
|
|
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
|
|
|
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
|
|
|
PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
|
|
|
|
PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
|
|
|
|
CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
|
|
|
|
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
|
|
|
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
|
|
|
#
|
|
|
|
# UEFI & PI
|
|
|
|
#
|
2009-08-24 17:31:04 +02:00
|
|
|
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
|
|
|
|
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
|
|
|
|
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
|
|
|
|
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
|
|
|
|
HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
|
|
|
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
|
|
|
|
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
|
|
|
|
PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
|
|
|
|
PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
|
|
|
|
DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
|
|
|
|
DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
|
|
|
|
#
|
|
|
|
# Generic Modules
|
|
|
|
#
|
2009-08-24 17:31:04 +02:00
|
|
|
UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
|
|
|
IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
|
|
|
|
UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
|
2010-12-14 04:19:21 +01:00
|
|
|
TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
|
2009-11-26 02:31:48 +01:00
|
|
|
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
|
2009-12-25 09:09:48 +01:00
|
|
|
SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
|
|
|
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
2010-05-24 03:35:52 +02:00
|
|
|
PalLib|MdePkg/Library/BasePalLibNull/BasePalLibNull.inf
|
2013-08-12 04:19:56 +02:00
|
|
|
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
#
|
|
|
|
# Misc
|
|
|
|
#
|
|
|
|
DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
|
2011-03-10 23:15:38 +01:00
|
|
|
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
|
|
|
|
PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf
|
|
|
|
PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
|
2010-02-26 06:38:04 +01:00
|
|
|
DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
|
2010-12-29 19:28:38 +01:00
|
|
|
PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
|
2011-07-01 02:40:46 +02:00
|
|
|
ResetSystemLib|MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
|
2011-08-30 00:18:19 +02:00
|
|
|
SmbusLib|MdePkg/Library/DxeSmbusLib/DxeSmbusLib.inf
|
|
|
|
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
|
2012-03-15 06:20:41 +01:00
|
|
|
CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
[LibraryClasses.EBC.PEIM]
|
|
|
|
IoLib|MdePkg/Library/PeiIoLibCpuIo/PeiIoLibCpuIo.inf
|
|
|
|
|
|
|
|
[LibraryClasses.common.PEI_CORE]
|
|
|
|
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
|
|
|
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
|
|
|
|
|
|
|
|
[LibraryClasses.common.PEIM]
|
|
|
|
HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
|
|
|
|
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
|
|
|
|
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
|
2011-08-02 23:06:13 +02:00
|
|
|
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
[LibraryClasses.common.DXE_CORE]
|
|
|
|
HobLib|MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
|
|
|
|
MemoryAllocationLib|MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
|
|
|
|
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
|
|
|
|
|
|
|
[LibraryClasses.common.DXE_DRIVER]
|
|
|
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
2011-07-19 22:47:28 +02:00
|
|
|
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section. The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file. Signing operations are performed from python scripts that wrap OpenSsl command line utilities. Verification operations are performed using the OpenSsl libraries in the CryptoPkg.
The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID. The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data. The signing tool included in these patches performs encode/decode operations using this data layout. HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID.
MdePkg/Include/Guid/WinCertificate.h
=================================
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
//
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
///
typedef struct {
EFI_GUID HashType;
UINT8 PublicKey[256];
UINT8 Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;
MdePkg/Include/Protocol/Hash.h
=================================
#define EFI_HASH_ALGORITHM_SHA256_GUID \
{ \
0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
}
The verification operations require the use of public key(s). A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys. A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys. When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD. It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region.
While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete. It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase.
I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible. The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries. This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers.
Patch Summary
==============
1) BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections
a. Wrapper for a set of OpenSsl command line utility operations
b. OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH
c. Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section
Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256Sign -e|-d [options] <input_file>
positional arguments:
input_file specify the input filename
optional arguments:
-e encode file
-d decode file
-o filename, --output filename
specify the output filename
--private-key PRIVATEKEYFILE
specify the private key filename. If not specified, a
test signing key is used.
-v, --verbose increase output messages
-q, --quiet reduce output messages
--debug [0-9] set debug level
--version display the program version and exit
-h, --help display this help text
2) BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities.
a. Wrapper for a set of OpenSsl command line utility operations
b. OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH
Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256GenerateKeys [options]
optional arguments:
-o [filename [filename ...]], --output [filename [filename ...]]
specify the output private key filename in PEM format
-i [filename [filename ...]], --input [filename [filename ...]]
specify the input private key filename in PEM format
--public-key-hash PUBLICKEYHASHFILE
specify the public key hash filename that is SHA 256
hash of 2048 bit RSA public key in binary format
--public-key-hash-c PUBLICKEYHASHCFILE
specify the public key hash filename that is SHA 256
hash of 2048 bit RSA public key in C structure format
-v, --verbose increase output messages
-q, --quiet reduce output messages
--debug [0-9] set debug level
--version display the program version and exit
-h, --help display this help text
3) BaseTools\Conf\tools_def.template
a. Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key
b. GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID
c. Tool is Rsa2049Sha256Sign
4) MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib
a. Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components
5) MdeModulePkg\Universal\SectionExtractionPei
a. Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs
6) MdeModulePkg\Universal\SectionExtractionDxe
a. Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols.
7) SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib
a. NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
b. Based on algorithms from SecurityPkg Authenticated Variable services
c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
8) SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib
a. NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
b. Based on algorithms from SecurityPkg Authenticated Variable services
c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15799 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 08:29:07 +02:00
|
|
|
ExtractGuidedSectionLib|MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
|
|
|
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
|
|
|
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
|
|
|
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
|
2011-07-19 22:47:28 +02:00
|
|
|
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
2010-02-26 00:42:27 +01:00
|
|
|
[LibraryClasses.common.SMM_CORE]
|
2014-12-10 03:24:50 +01:00
|
|
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
2010-02-26 00:42:27 +01:00
|
|
|
MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf
|
2011-08-16 04:58:20 +02:00
|
|
|
SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
|
2015-02-02 15:42:22 +01:00
|
|
|
SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
2011-08-16 04:58:20 +02:00
|
|
|
|
2009-08-24 17:31:04 +02:00
|
|
|
[LibraryClasses.common.DXE_SMM_DRIVER]
|
|
|
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
|
|
|
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
|
2010-05-21 04:49:29 +02:00
|
|
|
MemoryAllocationLib|MdePkg/Library/SmmMemoryAllocationLib/SmmMemoryAllocationLib.inf
|
2009-12-23 07:51:36 +01:00
|
|
|
SmmServicesTableLib|MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.inf
|
2011-07-19 22:47:28 +02:00
|
|
|
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
|
2015-02-02 15:42:22 +01:00
|
|
|
SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
[LibraryClasses.common.UEFI_DRIVER]
|
|
|
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
|
|
|
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
|
|
|
DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf
|
2011-07-19 22:47:28 +02:00
|
|
|
LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
[LibraryClasses.common.UEFI_APPLICATION]
|
|
|
|
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
|
|
|
|
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
|
|
|
|
DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
|
|
|
|
|
2014-12-04 01:32:24 +01:00
|
|
|
[LibraryClasses.ARM, LibraryClasses.AARCH64]
|
2011-03-10 23:15:38 +01:00
|
|
|
#
|
2014-12-04 01:32:24 +01:00
|
|
|
# It is not possible to prevent ARM compiler calls to generic intrinsic functions.
|
|
|
|
# This library provides the instrinsic functions generated by a given compiler.
|
2011-03-10 23:15:38 +01:00
|
|
|
# [LibraryClasses.ARM] and NULL mean link this library into all ARM images.
|
|
|
|
#
|
|
|
|
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
|
2010-12-15 22:06:24 +01:00
|
|
|
|
2013-05-13 04:36:09 +02:00
|
|
|
[LibraryClasses.EBC]
|
|
|
|
LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
|
2010-12-15 22:06:24 +01:00
|
|
|
|
2010-02-24 01:21:16 +01:00
|
|
|
[PcdsFeatureFlag]
|
2009-08-24 17:31:04 +02:00
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnostics2Disable|TRUE
|
2010-05-21 04:49:29 +02:00
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|TRUE
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
|
2009-08-24 17:31:04 +02:00
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathFromText|FALSE
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText|FALSE
|
|
|
|
|
2010-02-24 01:21:16 +01:00
|
|
|
[PcdsFixedAtBuild]
|
2009-08-24 17:31:04 +02:00
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f
|
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|0x0
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule|0x0
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|28
|
|
|
|
|
|
|
|
[PcdsFixedAtBuild.IPF]
|
|
|
|
gEfiMdePkgTokenSpaceGuid.PcdIoBlockBaseAddressForIpf|0x0ffffc000000
|
|
|
|
|
|
|
|
###################################################################################################
|
|
|
|
#
|
|
|
|
# Components Section - list of the modules and components that will be processed by compilation
|
|
|
|
# tools and the EDK II tools to generate PE32/PE32+/Coff image files.
|
|
|
|
#
|
|
|
|
# Note: The EDK II DSC file is not used to specify how compiled binary images get placed
|
|
|
|
# into firmware volume images. This section is just a list of modules to compile from
|
|
|
|
# source into UEFI-compliant binaries.
|
|
|
|
# It is the FDF file that contains information on combining binary files into firmware
|
|
|
|
# volume images, whose concept is beyond UEFI and is described in PI specification.
|
|
|
|
# Binary modules do not need to be listed in this section, as they should be
|
|
|
|
# specified in the FDF file. For example: Shell binary (Shell_Full.efi), FAT binary (Fat.efi),
|
|
|
|
# Logo (Logo.bmp), and etc.
|
|
|
|
# There may also be modules listed in this section that are not required in the FDF file,
|
|
|
|
# When a module listed here is excluded from FDF file, then UEFI-compliant binary will be
|
|
|
|
# generated for it, but the binary will not be put into any firmware volume.
|
|
|
|
#
|
|
|
|
###################################################################################################
|
|
|
|
|
2010-02-24 01:21:16 +01:00
|
|
|
[Components]
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
|
2014-11-12 04:27:48 +01:00
|
|
|
MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
2009-10-20 05:43:40 +02:00
|
|
|
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
|
|
|
|
MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe.inf
|
2013-08-12 08:13:54 +02:00
|
|
|
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
|
2015-04-29 04:42:58 +02:00
|
|
|
MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.inf
|
|
|
|
MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf
|
|
|
|
MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf
|
|
|
|
MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.inf
|
2011-08-23 16:36:33 +02:00
|
|
|
MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
|
|
|
|
MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
|
2011-06-28 01:30:55 +02:00
|
|
|
MdeModulePkg/Bus/Pci/UhciPei/UhciPei.inf
|
|
|
|
MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf
|
2014-07-02 05:20:49 +02:00
|
|
|
MdeModulePkg/Bus/Pci/XhciPei/XhciPei.inf
|
2011-06-28 01:31:21 +02:00
|
|
|
MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.inf
|
2011-06-28 01:30:55 +02:00
|
|
|
MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf
|
|
|
|
MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.inf
|
2009-12-22 08:35:49 +01:00
|
|
|
MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf
|
2010-10-12 04:28:34 +02:00
|
|
|
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
|
|
|
|
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
|
|
|
|
MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
|
|
|
|
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
|
|
|
|
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
|
|
|
|
MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf
|
|
|
|
MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf
|
2013-08-14 03:16:06 +02:00
|
|
|
MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxe.inf
|
|
|
|
MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxe.inf
|
|
|
|
MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
MdeModulePkg/Core/Dxe/DxeMain.inf {
|
|
|
|
<LibraryClasses>
|
|
|
|
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
|
|
|
}
|
|
|
|
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
|
|
|
|
MdeModulePkg/Core/Pei/PeiMain.inf
|
|
|
|
MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
|
|
|
|
|
|
|
MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
|
|
|
|
MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
|
|
|
|
MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf
|
|
|
|
MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
|
|
|
MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
|
|
|
|
MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
|
|
|
|
MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
|
|
|
|
MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf
|
|
|
|
MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
|
|
|
|
MdeModulePkg/Library/DxePrintLibPrint2Protocol/DxePrintLibPrint2Protocol.inf
|
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section. The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file. Signing operations are performed from python scripts that wrap OpenSsl command line utilities. Verification operations are performed using the OpenSsl libraries in the CryptoPkg.
The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID. The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data. The signing tool included in these patches performs encode/decode operations using this data layout. HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID.
MdePkg/Include/Guid/WinCertificate.h
=================================
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
//
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
///
typedef struct {
EFI_GUID HashType;
UINT8 PublicKey[256];
UINT8 Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;
MdePkg/Include/Protocol/Hash.h
=================================
#define EFI_HASH_ALGORITHM_SHA256_GUID \
{ \
0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
}
The verification operations require the use of public key(s). A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys. A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys. When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD. It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region.
While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete. It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase.
I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible. The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries. This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers.
Patch Summary
==============
1) BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections
a. Wrapper for a set of OpenSsl command line utility operations
b. OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH
c. Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section
Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256Sign -e|-d [options] <input_file>
positional arguments:
input_file specify the input filename
optional arguments:
-e encode file
-d decode file
-o filename, --output filename
specify the output filename
--private-key PRIVATEKEYFILE
specify the private key filename. If not specified, a
test signing key is used.
-v, --verbose increase output messages
-q, --quiet reduce output messages
--debug [0-9] set debug level
--version display the program version and exit
-h, --help display this help text
2) BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities.
a. Wrapper for a set of OpenSsl command line utility operations
b. OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH
Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256GenerateKeys [options]
optional arguments:
-o [filename [filename ...]], --output [filename [filename ...]]
specify the output private key filename in PEM format
-i [filename [filename ...]], --input [filename [filename ...]]
specify the input private key filename in PEM format
--public-key-hash PUBLICKEYHASHFILE
specify the public key hash filename that is SHA 256
hash of 2048 bit RSA public key in binary format
--public-key-hash-c PUBLICKEYHASHCFILE
specify the public key hash filename that is SHA 256
hash of 2048 bit RSA public key in C structure format
-v, --verbose increase output messages
-q, --quiet reduce output messages
--debug [0-9] set debug level
--version display the program version and exit
-h, --help display this help text
3) BaseTools\Conf\tools_def.template
a. Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key
b. GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID
c. Tool is Rsa2049Sha256Sign
4) MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib
a. Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components
5) MdeModulePkg\Universal\SectionExtractionPei
a. Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs
6) MdeModulePkg\Universal\SectionExtractionDxe
a. Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols.
7) SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib
a. NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
b. Based on algorithms from SecurityPkg Authenticated Variable services
c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
8) SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib
a. NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
b. Based on algorithms from SecurityPkg Authenticated Variable services
c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15799 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 08:29:07 +02:00
|
|
|
MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
|
|
|
|
MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf
|
|
|
|
MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf
|
|
|
|
MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
|
|
|
|
MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
|
2009-11-26 02:31:48 +01:00
|
|
|
MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
|
2009-12-29 08:50:42 +01:00
|
|
|
MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
|
|
|
|
MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
|
|
|
|
MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
|
2009-12-29 09:50:51 +01:00
|
|
|
MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf
|
2010-12-18 02:02:59 +01:00
|
|
|
MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf
|
|
|
|
MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.inf
|
2011-03-11 18:46:36 +01:00
|
|
|
MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf
|
2011-08-30 00:17:27 +02:00
|
|
|
MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
|
2011-10-08 23:00:13 +02:00
|
|
|
MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf
|
2012-03-15 06:20:41 +01:00
|
|
|
MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
|
2014-08-11 08:23:51 +02:00
|
|
|
MdeModulePkg/Library/PlatformHookLibSerialPortPpi/PlatformHookLibSerialPortPpi.inf
|
2015-04-03 04:50:57 +02:00
|
|
|
MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
|
|
|
|
MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
2011-07-12 22:35:46 +02:00
|
|
|
MdeModulePkg/Universal/CapsulePei/CapsulePei.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
|
|
|
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
|
|
|
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
|
|
|
MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
|
|
|
MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
|
|
|
MdeModulePkg/Universal/DebugPortDxe/DebugPortDxe.inf
|
|
|
|
MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
|
|
|
MdeModulePkg/Universal/PrintDxe/PrintDxe.inf
|
|
|
|
MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
|
|
|
MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
|
|
|
MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
2011-07-12 22:36:05 +02:00
|
|
|
MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf
|
|
|
|
MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
2011-07-01 02:40:26 +02:00
|
|
|
MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
|
|
|
|
MdeModulePkg/Universal/Metronome/Metronome.inf
|
|
|
|
MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
2011-07-01 02:40:46 +02:00
|
|
|
MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf
|
2009-11-20 05:01:32 +01:00
|
|
|
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
|
|
|
MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
|
2009-12-30 14:47:55 +01:00
|
|
|
MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
|
|
|
|
MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
|
|
|
|
|
|
|
|
MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2Pei.inf
|
|
|
|
MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
|
|
|
MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
|
|
|
MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf
|
2009-11-03 03:39:10 +01:00
|
|
|
|
|
|
|
MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.inf
|
|
|
|
MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
|
|
|
|
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
|
|
|
MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
2013-08-12 04:19:56 +02:00
|
|
|
MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Application/VariableInfo/VariableInfo.inf
|
2013-07-03 11:08:40 +02:00
|
|
|
MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
|
|
|
|
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
2013-09-29 07:51:12 +02:00
|
|
|
MdeModulePkg/Universal/TimestampDxe/TimestampDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
|
|
|
|
|
|
|
|
MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
|
|
|
|
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
2009-11-11 07:17:18 +01:00
|
|
|
MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleDxe.inf
|
2009-11-25 09:31:37 +01:00
|
|
|
MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
|
2009-12-25 08:26:06 +01:00
|
|
|
MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
|
|
|
|
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
|
|
|
|
|
2011-12-01 02:57:27 +01:00
|
|
|
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf {
|
|
|
|
<LibraryClasses>
|
|
|
|
LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
|
|
|
|
}
|
|
|
|
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
|
|
|
|
MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
|
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section. The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file. Signing operations are performed from python scripts that wrap OpenSsl command line utilities. Verification operations are performed using the OpenSsl libraries in the CryptoPkg.
The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID. The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data. The signing tool included in these patches performs encode/decode operations using this data layout. HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID.
MdePkg/Include/Guid/WinCertificate.h
=================================
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
//
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
///
typedef struct {
EFI_GUID HashType;
UINT8 PublicKey[256];
UINT8 Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;
MdePkg/Include/Protocol/Hash.h
=================================
#define EFI_HASH_ALGORITHM_SHA256_GUID \
{ \
0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
}
The verification operations require the use of public key(s). A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys. A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys. When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD. It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region.
While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete. It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase.
I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible. The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries. This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers.
Patch Summary
==============
1) BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections
a. Wrapper for a set of OpenSsl command line utility operations
b. OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH
c. Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section
Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256Sign -e|-d [options] <input_file>
positional arguments:
input_file specify the input filename
optional arguments:
-e encode file
-d decode file
-o filename, --output filename
specify the output filename
--private-key PRIVATEKEYFILE
specify the private key filename. If not specified, a
test signing key is used.
-v, --verbose increase output messages
-q, --quiet reduce output messages
--debug [0-9] set debug level
--version display the program version and exit
-h, --help display this help text
2) BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities.
a. Wrapper for a set of OpenSsl command line utility operations
b. OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH
Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256GenerateKeys [options]
optional arguments:
-o [filename [filename ...]], --output [filename [filename ...]]
specify the output private key filename in PEM format
-i [filename [filename ...]], --input [filename [filename ...]]
specify the input private key filename in PEM format
--public-key-hash PUBLICKEYHASHFILE
specify the public key hash filename that is SHA 256
hash of 2048 bit RSA public key in binary format
--public-key-hash-c PUBLICKEYHASHCFILE
specify the public key hash filename that is SHA 256
hash of 2048 bit RSA public key in C structure format
-v, --verbose increase output messages
-q, --quiet reduce output messages
--debug [0-9] set debug level
--version display the program version and exit
-h, --help display this help text
3) BaseTools\Conf\tools_def.template
a. Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key
b. GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID
c. Tool is Rsa2049Sha256Sign
4) MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib
a. Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components
5) MdeModulePkg\Universal\SectionExtractionPei
a. Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs
6) MdeModulePkg\Universal\SectionExtractionDxe
a. Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols.
7) SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib
a. NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
b. Based on algorithms from SecurityPkg Authenticated Variable services
c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
8) SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib
a. NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
b. Based on algorithms from SecurityPkg Authenticated Variable services
c. Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15799 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 08:29:07 +02:00
|
|
|
MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.inf {
|
|
|
|
<LibraryClasses>
|
|
|
|
NULL|MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
|
|
|
|
}
|
|
|
|
MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.inf {
|
|
|
|
<LibraryClasses>
|
|
|
|
NULL|MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.inf
|
|
|
|
}
|
2014-12-23 04:18:04 +01:00
|
|
|
|
|
|
|
MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf
|
|
|
|
|
|
|
|
[Components.IA32, Components.X64, Components.IPF]
|
2010-01-28 09:19:25 +01:00
|
|
|
MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/DebugSupportDxe/DebugSupportDxe.inf
|
|
|
|
MdeModulePkg/Universal/EbcDxe/EbcDxe.inf
|
|
|
|
|
2010-02-26 00:42:27 +01:00
|
|
|
[Components.IA32, Components.X64, Components.Ebc]
|
2009-08-24 17:31:04 +02:00
|
|
|
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
|
|
|
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
|
2010-02-26 00:42:27 +01:00
|
|
|
|
|
|
|
[Components.IA32, Components.X64]
|
|
|
|
MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
|
|
|
|
MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
|
2010-12-10 10:27:54 +01:00
|
|
|
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
|
|
|
|
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
|
2010-02-26 00:42:27 +01:00
|
|
|
MdeModulePkg/Library/SmmReportStatusCodeLib/SmmReportStatusCodeLib.inf
|
|
|
|
MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf
|
|
|
|
MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf
|
2011-07-19 22:47:28 +02:00
|
|
|
MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
|
2011-03-10 08:39:51 +01:00
|
|
|
MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf
|
|
|
|
MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf
|
|
|
|
MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf
|
2011-08-10 02:02:58 +02:00
|
|
|
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
|
2013-05-13 04:36:09 +02:00
|
|
|
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf
|
|
|
|
MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf
|
2011-08-16 04:58:20 +02:00
|
|
|
MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf
|
2015-04-03 04:50:57 +02:00
|
|
|
MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDecompressLib.inf
|
2011-08-30 00:18:19 +02:00
|
|
|
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf
|
2011-08-30 00:19:48 +02:00
|
|
|
MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf
|
|
|
|
MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf
|
2011-12-01 02:57:27 +01:00
|
|
|
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf
|
2015-02-05 07:10:07 +01:00
|
|
|
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
|
|
|
|
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf
|