summaryrefslogtreecommitdiff
path: root/MdePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg')
-rw-r--r--MdePkg/Include/Base.h43
-rw-r--r--MdePkg/Include/Guid/ImageAuthentication.h159
-rw-r--r--MdePkg/Include/IndustryStandard/Acpi50.h4
-rw-r--r--MdePkg/Include/IndustryStandard/Acpi51.h4
-rw-r--r--MdePkg/Include/IndustryStandard/Usb.h28
-rw-r--r--MdePkg/Include/Pi/PiDxeCis.h33
-rw-r--r--MdePkg/Library/DxePcdLib/DxePcdLib.inf5
-rw-r--r--MdePkg/Library/UefiScsiLib/UefiScsiLib.c81
-rw-r--r--MdePkg/MdePkg.dec33
9 files changed, 251 insertions, 139 deletions
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 4dda3c2f40..def5aa6184 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -6,7 +6,7 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1016,5 +1016,46 @@ typedef UINTN RETURN_STATUS;
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
(SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))
+#if defined(_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC)
+ #pragma intrinsic(_ReturnAddress)
+ /**
+ Get the return address of the calling funcation.
+
+ Based on intrinsic function _ReturnAddress that provides the address of
+ the instruction in the calling function that will be executed after
+ control returns to the caller.
+
+ @param L Return Level.
+
+ @return The return address of the calling funcation or 0 if L != 0.
+
+ **/
+ #define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
+#elif defined(__GNUC__)
+ void * __builtin_return_address (unsigned int level);
+ /**
+ Get the return address of the calling funcation.
+
+ Based on built-in Function __builtin_return_address that returns
+ the return address of the current function, or of one of its callers.
+
+ @param L Return Level.
+
+ @return The return address of the calling funcation.
+
+ **/
+ #define RETURN_ADDRESS(L) __builtin_return_address (L)
+#else
+ /**
+ Get the return address of the calling funcation.
+
+ @param L Return Level.
+
+ @return 0 as compilers don't support this feature.
+
+ **/
+ #define RETURN_ADDRESS(L) ((VOID *) 0)
+#endif
+
#endif
diff --git a/MdePkg/Include/Guid/ImageAuthentication.h b/MdePkg/Include/Guid/ImageAuthentication.h
index 8b46e7356b..427a7d47bb 100644
--- a/MdePkg/Include/Guid/ImageAuthentication.h
+++ b/MdePkg/Include/Guid/ImageAuthentication.h
@@ -1,23 +1,24 @@
/** @file
Image signature database are defined for the signed image validation.
- Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials
- 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
+ Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ 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.
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
- GUIDs defined in UEFI 2.3.1 spec.
+ GUIDs defined in UEFI 2.4 spec.
**/
#ifndef __IMAGE_AUTHTICATION_H__
#define __IMAGE_AUTHTICATION_H__
#include <Guid/GlobalVariable.h>
+#include <Protocol/Hash.h>
#define EFI_IMAGE_SECURITY_DATABASE_GUID \
{ \
@@ -25,15 +26,20 @@
}
///
-/// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID
+/// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID
/// for the authorized signature database.
///
#define EFI_IMAGE_SECURITY_DATABASE L"db"
///
-/// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID
+/// Varialbe name with guid EFI_IMAGE_SECURITY_DATABASE_GUID
/// for the forbidden signature database.
///
#define EFI_IMAGE_SECURITY_DATABASE1 L"dbx"
+///
+/// Variable name with guid EFI_IMAGE_SECURITY_DATABASE_GUID
+/// for the timestamp signature database.
+///
+#define EFI_IMAGE_SECURITY_DATABASE2 L"dbt"
#define SECURE_BOOT_MODE_ENABLE 1
#define SECURE_BOOT_MODE_DISABLE 0
@@ -45,7 +51,7 @@
// Signature Database
//***********************************************************************
///
-/// The format of a signature database.
+/// The format of a signature database.
///
#pragma pack(1)
@@ -76,17 +82,50 @@ typedef struct {
///
/// Size of each signature.
///
- UINT32 SignatureSize;
+ UINT32 SignatureSize;
///
- /// Header before the array of signatures. The format of this header is specified
+ /// Header before the array of signatures. The format of this header is specified
/// by the SignatureType.
/// UINT8 SignatureHeader[SignatureHeaderSize];
///
- /// An array of signatures. Each signature is SignatureSize bytes in length.
+ /// An array of signatures. Each signature is SignatureSize bytes in length.
/// EFI_SIGNATURE_DATA Signatures[][SignatureSize];
///
} EFI_SIGNATURE_LIST;
+typedef struct {
+ ///
+ /// The SHA256 hash of an X.509 certificate's To-Be-Signed contents.
+ ///
+ EFI_SHA256_HASH ToBeSignedHash;
+ ///
+ /// The time that the certificate shall be considered to be revoked.
+ ///
+ EFI_TIME TimeOfRevocation;
+} EFI_CERT_X509_SHA256;
+
+typedef struct {
+ ///
+ /// The SHA384 hash of an X.509 certificate's To-Be-Signed contents.
+ ///
+ EFI_SHA384_HASH ToBeSignedHash;
+ ///
+ /// The time that the certificate shall be considered to be revoked.
+ ///
+ EFI_TIME TimeOfRevocation;
+} EFI_CERT_X509_SHA384;
+
+typedef struct {
+ ///
+ /// The SHA512 hash of an X.509 certificate's To-Be-Signed contents.
+ ///
+ EFI_SHA512_HASH ToBeSignedHash;
+ ///
+ /// The time that the certificate shall be considered to be revoked.
+ ///
+ EFI_TIME TimeOfRevocation;
+} EFI_CERT_X509_SHA512;
+
#pragma pack()
///
@@ -103,7 +142,7 @@ typedef struct {
/// This identifies a signature containing an RSA-2048 key. The key (only the modulus
/// since the public key exponent is known to be 0x10001) shall be stored in big-endian
/// order.
-/// The SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size
+/// The SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size
/// of SignatureOwner component) + 256 bytes.
///
#define EFI_CERT_RSA2048_GUID \
@@ -112,8 +151,8 @@ typedef struct {
}
///
-/// This identifies a signature containing a RSA-2048 signature of a SHA-256 hash. The
-/// SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size of
+/// This identifies a signature containing a RSA-2048 signature of a SHA-256 hash. The
+/// SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size of
/// SignatureOwner component) + 256 bytes.
///
#define EFI_CERT_RSA2048_SHA256_GUID \
@@ -131,8 +170,8 @@ typedef struct {
}
///
-/// TThis identifies a signature containing a RSA-2048 signature of a SHA-1 hash. The
-/// SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size of
+/// TThis identifies a signature containing a RSA-2048 signature of a SHA-1 hash. The
+/// SignatureHeader size shall always be 0. The SignatureSize shall always be 16 (size of
/// SignatureOwner component) + 256 bytes.
///
#define EFI_CERT_RSA2048_SHA1_GUID \
@@ -142,11 +181,11 @@ typedef struct {
///
/// This identifies a signature based on an X.509 certificate. If the signature is an X.509
-/// certificate then verification of the signature of an image should validate the public
-/// key certificate in the image using certificate path verification, up to this X.509
+/// certificate then verification of the signature of an image should validate the public
+/// key certificate in the image using certificate path verification, up to this X.509
/// certificate as a trusted root. The SignatureHeader size shall always be 0. The
-/// SignatureSize may vary but shall always be 16 (size of the SignatureOwner component) +
-/// the size of the certificate itself.
+/// SignatureSize may vary but shall always be 16 (size of the SignatureOwner component) +
+/// the size of the certificate itself.
/// Note: This means that each certificate will normally be in a separate EFI_SIGNATURE_LIST.
///
#define EFI_CERT_X509_GUID \
@@ -172,7 +211,7 @@ typedef struct {
#define EFI_CERT_SHA384_GUID \
{ \
0xff3e5307, 0x9fd0, 0x48c9, {0x85, 0xf1, 0x8a, 0xd5, 0x6c, 0x70, 0x1e, 0x1} \
- }
+ }
///
/// This identifies a signature containing a SHA-512 hash. The SignatureHeader size shall
@@ -185,6 +224,45 @@ typedef struct {
}
///
+/// This identifies a signature containing the SHA256 hash of an X.509 certificate's
+/// To-Be-Signed contents, and a time of revocation. The SignatureHeader size shall
+/// always be 0. The SignatureSize shall always be 16 (size of the SignatureOwner component)
+/// + 48 bytes for an EFI_CERT_X509_SHA256 structure. If the TimeOfRevocation is non-zero,
+/// the certificate should be considered to be revoked from that time and onwards, and
+/// otherwise the certificate shall be considered to always be revoked.
+///
+#define EFI_CERT_X509_SHA256_GUID \
+ { \
+ 0x3bd2a492, 0x96c0, 0x4079, {0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed } \
+ }
+
+///
+/// This identifies a signature containing the SHA384 hash of an X.509 certificate's
+/// To-Be-Signed contents, and a time of revocation. The SignatureHeader size shall
+/// always be 0. The SignatureSize shall always be 16 (size of the SignatureOwner component)
+/// + 64 bytes for an EFI_CERT_X509_SHA384 structure. If the TimeOfRevocation is non-zero,
+/// the certificate should be considered to be revoked from that time and onwards, and
+/// otherwise the certificate shall be considered to always be revoked.
+///
+#define EFI_CERT_X509_SHA384_GUID \
+ { \
+ 0x7076876e, 0x80c2, 0x4ee6, {0xaa, 0xd2, 0x28, 0xb3, 0x49, 0xa6, 0x86, 0x5b } \
+ }
+
+///
+/// This identifies a signature containing the SHA512 hash of an X.509 certificate's
+/// To-Be-Signed contents, and a time of revocation. The SignatureHeader size shall
+/// always be 0. The SignatureSize shall always be 16 (size of the SignatureOwner component)
+/// + 80 bytes for an EFI_CERT_X509_SHA512 structure. If the TimeOfRevocation is non-zero,
+/// the certificate should be considered to be revoked from that time and onwards, and
+/// otherwise the certificate shall be considered to always be revoked.
+///
+#define EFI_CERT_X509_SHA512_GUID \
+ { \
+ 0x446dbf63, 0x2502, 0x4cda, {0xbc, 0xfa, 0x24, 0x65, 0xd2, 0xb0, 0xfe, 0x9d } \
+ }
+
+///
/// This identifies a signature containing a DER-encoded PKCS #7 version 1.5 [RFC2315]
/// SignedData value.
///
@@ -192,13 +270,13 @@ typedef struct {
{ \
0x4aafd29d, 0x68df, 0x49ee, {0x8a, 0xa9, 0x34, 0x7d, 0x37, 0x56, 0x65, 0xa7} \
}
-
+
//***********************************************************************
// Image Execution Information Table Definition
//***********************************************************************
typedef UINT32 EFI_IMAGE_EXECUTION_ACTION;
-#define EFI_IMAGE_EXECUTION_AUTHENTICATION 0x00000007
+#define EFI_IMAGE_EXECUTION_AUTHENTICATION 0x00000007
#define EFI_IMAGE_EXECUTION_AUTH_UNTESTED 0x00000000
#define EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED 0x00000001
#define EFI_IMAGE_EXECUTION_AUTH_SIG_PASSED 0x00000002
@@ -208,7 +286,7 @@ typedef UINT32 EFI_IMAGE_EXECUTION_ACTION;
#define EFI_IMAGE_EXECUTION_INITIALIZED 0x00000008
//
-// EFI_IMAGE_EXECUTION_INFO is added to EFI System Configuration Table
+// EFI_IMAGE_EXECUTION_INFO is added to EFI System Configuration Table
// and assigned the GUID EFI_IMAGE_SECURITY_DATABASE_GUID.
//
typedef struct {
@@ -221,24 +299,24 @@ typedef struct {
///
UINT32 InfoSize;
///
- /// If this image was a UEFI device driver (for option ROM, for example) this is the
- /// null-terminated, user-friendly name for the device. If the image was for an application,
- /// then this is the name of the application. If this cannot be determined, then a simple
+ /// If this image was a UEFI device driver (for option ROM, for example) this is the
+ /// null-terminated, user-friendly name for the device. If the image was for an application,
+ /// then this is the name of the application. If this cannot be determined, then a simple
/// NULL character should be put in this position.
/// CHAR16 Name[];
///
///
- /// For device drivers, this is the device path of the device for which this device driver
- /// was intended. In some cases, the driver itself may be stored as part of the system
- /// firmware, but this field should record the device's path, not the firmware path. For
- /// applications, this is the device path of the application. If this cannot be determined,
+ /// For device drivers, this is the device path of the device for which this device driver
+ /// was intended. In some cases, the driver itself may be stored as part of the system
+ /// firmware, but this field should record the device's path, not the firmware path. For
+ /// applications, this is the device path of the application. If this cannot be determined,
/// a simple end-of-path device node should be put in this position.
/// EFI_DEVICE_PATH_PROTOCOL DevicePath;
///
///
- /// Zero or more image signatures. If the image contained no signatures,
+ /// Zero or more image signatures. If the image contained no signatures,
/// then this field is empty.
///
EFI_SIGNATURE_LIST Signature;
@@ -249,16 +327,16 @@ typedef struct {
///
/// Number of EFI_IMAGE_EXECUTION_INFO structures.
///
- UINTN NumberOfImages;
+ UINTN NumberOfImages;
///
/// Number of image instances of EFI_IMAGE_EXECUTION_INFO structures.
///
- // EFI_IMAGE_EXECUTION_INFO InformationInfo[]
+ // EFI_IMAGE_EXECUTION_INFO InformationInfo[]
} EFI_IMAGE_EXECUTION_INFO_TABLE;
extern EFI_GUID gEfiImageSecurityDatabaseGuid;
extern EFI_GUID gEfiCertSha256Guid;
-extern EFI_GUID gEfiCertRsa2048Guid;
+extern EFI_GUID gEfiCertRsa2048Guid;
extern EFI_GUID gEfiCertRsa2048Sha256Guid;
extern EFI_GUID gEfiCertSha1Guid;
extern EFI_GUID gEfiCertRsa2048Sha1Guid;
@@ -266,6 +344,9 @@ extern EFI_GUID gEfiCertX509Guid;
extern EFI_GUID gEfiCertSha224Guid;
extern EFI_GUID gEfiCertSha384Guid;
extern EFI_GUID gEfiCertSha512Guid;
+extern EFI_GUID gEfiCertX509Sha256Guid;
+extern EFI_GUID gEfiCertX509Sha384Guid;
+extern EFI_GUID gEfiCertX509Sha512Guid;
extern EFI_GUID gEfiCertPkcs7Guid;
-#endif
+#endif \ No newline at end of file
diff --git a/MdePkg/Include/IndustryStandard/Acpi50.h b/MdePkg/Include/IndustryStandard/Acpi50.h
index 235f516ba8..8af9963fff 100644
--- a/MdePkg/Include/IndustryStandard/Acpi50.h
+++ b/MdePkg/Include/IndustryStandard/Acpi50.h
@@ -1,6 +1,7 @@
/** @file
ACPI 5.0 definitions from the ACPI Specification Revision 5.0a November 13, 2013.
+ Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1857,7 +1858,8 @@ typedef struct {
UINT8 CommandComplete:1;
UINT8 SciDoorbell:1;
UINT8 Error:1;
- UINT8 Reserved:5;
+ UINT8 PlatformNotification:1;
+ UINT8 Reserved:4;
UINT8 Reserved1;
} EFI_ACPI_5_0_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
diff --git a/MdePkg/Include/IndustryStandard/Acpi51.h b/MdePkg/Include/IndustryStandard/Acpi51.h
index 06aa71403f..072603e87b 100644
--- a/MdePkg/Include/IndustryStandard/Acpi51.h
+++ b/MdePkg/Include/IndustryStandard/Acpi51.h
@@ -1,6 +1,7 @@
/** @file
ACPI 5.1 definitions from the ACPI Specification Revision 5.1 July, 2014.
+ Copyright (c) 2014 Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -1863,7 +1864,8 @@ typedef struct {
UINT8 CommandComplete:1;
UINT8 SciDoorbell:1;
UINT8 Error:1;
- UINT8 Reserved:5;
+ UINT8 PlatformNotification:1;
+ UINT8 Reserved:4;
UINT8 Reserved1;
} EFI_ACPI_5_1_PCCT_GENERIC_SHARED_MEMORY_REGION_STATUS;
diff --git a/MdePkg/Include/IndustryStandard/Usb.h b/MdePkg/Include/IndustryStandard/Usb.h
index c4367b58bb..c27ea15b41 100644
--- a/MdePkg/Include/IndustryStandard/Usb.h
+++ b/MdePkg/Include/IndustryStandard/Usb.h
@@ -1,7 +1,7 @@
/** @file
Support for USB 2.0 standard.
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
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
@@ -16,6 +16,32 @@
#define __USB_H__
//
+// Subset of Class and Subclass definitions from USB Specs
+//
+
+//
+// Usb mass storage class code
+//
+#define USB_MASS_STORE_CLASS 0x08
+
+//
+// Usb mass storage subclass code, specify the command set used.
+//
+#define USB_MASS_STORE_RBC 0x01 ///< Reduced Block Commands
+#define USB_MASS_STORE_8020I 0x02 ///< SFF-8020i, typically a CD/DVD device
+#define USB_MASS_STORE_QIC 0x03 ///< Typically a tape device
+#define USB_MASS_STORE_UFI 0x04 ///< Typically a floppy disk driver device
+#define USB_MASS_STORE_8070I 0x05 ///< SFF-8070i, typically a floppy disk driver device.
+#define USB_MASS_STORE_SCSI 0x06 ///< SCSI transparent command set
+
+//
+// Usb mass storage protocol code, specify the transport protocol
+//
+#define USB_MASS_STORE_CBI0 0x00 ///< CBI protocol with command completion interrupt
+#define USB_MASS_STORE_CBI1 0x01 ///< CBI protocol without command completion interrupt
+#define USB_MASS_STORE_BOT 0x50 ///< Bulk-Only Transport
+
+//
// Standard device request and request type
// USB 2.0 spec, Section 9.4
//
diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h
index 9bcfecc046..a3d57b16eb 100644
--- a/MdePkg/Include/Pi/PiDxeCis.h
+++ b/MdePkg/Include/Pi/PiDxeCis.h
@@ -1,7 +1,7 @@
/** @file
Include file matches things in PI.
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
@@ -365,7 +365,7 @@ EFI_STATUS
resource range specified by BaseAddress and Length.
@retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource
range specified by BaseAddress and Length.
- @retval EFI_ACCESS_DEFINED The attributes for the memory resource range specified by
+ @retval EFI_ACCESS_DENIED The attributes for the memory resource range specified by
BaseAddress and Length cannot be modified.
@retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
the memory resource range.
@@ -381,6 +381,31 @@ EFI_STATUS
);
/**
+ Modifies the capabilities for a memory region in the global coherency domain of the
+ processor.
+
+ @param BaseAddress The physical address that is the start address of a memory region.
+ @param Length The size in bytes of the memory region.
+ @param Capabilities The bit mask of capabilities that the memory region supports.
+
+ @retval EFI_SUCCESS The capabilities were set for the memory region.
+ @retval EFI_INVALID_PARAMETER Length is zero.
+ @retval EFI_UNSUPPORTED The capabilities specified by Capabilities do not include the
+ memory region attributes currently in use.
+ @retval EFI_ACCESS_DENIED The capabilities for the memory resource range specified by
+ BaseAddress and Length cannot be modified.
+ @retval EFI_OUT_OF_RESOURCES There are not enough system resources to modify the capabilities
+ of the memory resource range.
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_MEMORY_SPACE_CAPABILITIES) (
+ IN EFI_PHYSICAL_ADDRESS BaseAddress,
+ IN UINT64 Length,
+ IN UINT64 Capabilities
+ );
+
+/**
Returns a map of the memory resources in the global coherency domain of the
processor.
@@ -694,6 +719,10 @@ typedef struct {
// Service to process a single firmware volume found in a capsule
//
EFI_PROCESS_FIRMWARE_VOLUME ProcessFirmwareVolume;
+ //
+ // Extensions to Global Coherency Domain Services
+ //
+ EFI_SET_MEMORY_SPACE_CAPABILITIES SetMemorySpaceCapabilities;
} DXE_SERVICES;
typedef DXE_SERVICES EFI_DXE_SERVICES;
diff --git a/MdePkg/Library/DxePcdLib/DxePcdLib.inf b/MdePkg/Library/DxePcdLib/DxePcdLib.inf
index dfdd412115..23cd5d6e70 100644
--- a/MdePkg/Library/DxePcdLib/DxePcdLib.inf
+++ b/MdePkg/Library/DxePcdLib/DxePcdLib.inf
@@ -13,6 +13,11 @@
# This library instance uses the PCD_PROTOCOL to handle dynamic PCD request and use
# EFI_PCD_PROTOCOL to handle dynamicEx type PCD.
#
+# Note: A driver of type DXE_RUNTIME_DRIVER and DXE_SMM_DRIVER can only use this DxePcdLib
+# in their initialization without any issues to access Dynamic and DynamicEx PCD. They can't
+# access Dynamic and DynamicEx PCD in the implementation of runtime services and SMI handlers.
+# Because EFI_PCD_PROTOCOL is DXE protocol that is not aviable in OS runtime phase.
+#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
diff --git a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c
index bd838c4ff4..8a073db5f3 100644
--- a/MdePkg/Library/UefiScsiLib/UefiScsiLib.c
+++ b/MdePkg/Library/UefiScsiLib/UefiScsiLib.c
@@ -23,17 +23,6 @@
//
- // Max bytes needed to represent ID of a SCSI device
- //
-#define EFI_SCSI_TARGET_MAX_BYTES (0x10)
-
- //
- // bit5..7 are for Logical unit number
- // 11100000b (0xe0)
- //
-#define EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK 0xe0
-
- //
// Scsi Command Length
//
#define EFI_SCSI_OP_LENGTH_SIX 0x6
@@ -117,9 +106,6 @@ ScsiTestUnitReadyCommand (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX];
@@ -141,11 +127,7 @@ ScsiTestUnitReadyCommand (
//
// Fill Cdb for Test Unit Ready Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_TEST_UNIT_READY;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX;
CommandPacket.SenseDataLength = *SenseDataLength;
@@ -255,9 +237,6 @@ ScsiInquiryCommandEx (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX];
@@ -277,11 +256,7 @@ ScsiInquiryCommandEx (
CommandPacket.SenseDataLength = *SenseDataLength;
CommandPacket.Cdb = Cdb;
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_INQUIRY;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
if (EnableVitalProductData) {
Cdb[1] |= 0x01;
Cdb[2] = PageCode;
@@ -510,9 +485,6 @@ ScsiModeSense10Command (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN];
@@ -533,14 +505,11 @@ ScsiModeSense10Command (
//
// Fill Cdb for Mode Sense (10) Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_MODE_SEN10;
//
// DBDField is in Cdb[1] bit3 of (bit7..0)
//
- Cdb[1] = (UINT8) ((LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK) + ((DBDField << 3) & 0x08));
+ Cdb[1] = (UINT8) ((DBDField << 3) & 0x08);
//
// PageControl is in Cdb[2] bit7..6, PageCode is in Cdb[2] bit5..0
//
@@ -602,9 +571,6 @@ ScsiRequestSenseCommand (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIX];
@@ -624,11 +590,7 @@ ScsiRequestSenseCommand (
//
// Fill Cdb for Request Sense Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_REQUEST_SENSE;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
Cdb[4] = (UINT8) (*SenseDataLength);
CommandPacket.CdbLength = (UINT8) EFI_SCSI_OP_LENGTH_SIX;
@@ -695,9 +657,6 @@ ScsiReadCapacityCommand (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN];
@@ -718,11 +677,7 @@ ScsiReadCapacityCommand (
//
// Fill Cdb for Read Capacity Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_READ_CAPACITY;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
if (!Pmi) {
//
// Partial medium indicator,if Pmi is FALSE, the Cdb.2 ~ Cdb.5 MUST BE ZERO.
@@ -797,9 +752,6 @@ ScsiReadCapacity16Command (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[16];
@@ -820,9 +772,6 @@ ScsiReadCapacity16Command (
//
// Fill Cdb for Read Capacity Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_READ_CAPACITY16;
Cdb[1] = 0x10;
if (!Pmi) {
@@ -903,9 +852,6 @@ ScsiRead10Command (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN];
@@ -926,11 +872,7 @@ ScsiRead10Command (
//
// Fill Cdb for Read (10) Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_READ10;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba));
WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize));
@@ -1001,9 +943,6 @@ ScsiWrite10Command (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_TEN];
@@ -1024,11 +963,7 @@ ScsiWrite10Command (
//
// Fill Cdb for Write (10) Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_WRITE10;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
WriteUnaligned32 ((UINT32 *)&Cdb[2], SwapBytes32 (StartLba));
WriteUnaligned16 ((UINT16 *)&Cdb[7], SwapBytes16 ((UINT16) SectorSize));
@@ -1099,9 +1034,6 @@ ScsiRead16Command (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIXTEEN];
@@ -1122,11 +1054,7 @@ ScsiRead16Command (
//
// Fill Cdb for Read (16) Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_READ16;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba));
WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize));
@@ -1197,9 +1125,6 @@ ScsiWrite16Command (
)
{
EFI_SCSI_IO_SCSI_REQUEST_PACKET CommandPacket;
- UINT64 Lun;
- UINT8 *Target;
- UINT8 TargetArray[EFI_SCSI_TARGET_MAX_BYTES];
EFI_STATUS Status;
UINT8 Cdb[EFI_SCSI_OP_LENGTH_SIXTEEN];
@@ -1220,11 +1145,7 @@ ScsiWrite16Command (
//
// Fill Cdb for Write (16) Command
//
- Target = &TargetArray[0];
- ScsiIo->GetDeviceLocation (ScsiIo, &Target, &Lun);
-
Cdb[0] = EFI_SCSI_OP_WRITE16;
- Cdb[1] = (UINT8) (LShiftU64 (Lun, 5) & EFI_SCSI_LOGICAL_UNIT_NUMBER_MASK);
WriteUnaligned64 ((UINT64 *)&Cdb[2], SwapBytes64 (StartLba));
WriteUnaligned32 ((UINT32 *)&Cdb[10], SwapBytes32 (SectorSize));
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index fdfb05477e..f9c9d5f284 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -201,7 +201,7 @@
# Script Opcodes. These OpCode will be restored by S3
# related modules.
S3BootScriptLib|Include/Library/S3BootScriptLib.h
-
+
## @libraryclass I/O and MMIO Library Services that do I/O and also enable
# the I/O operatation to be replayed during an S3 resume.
# This library class maps directly on top of the IoLib class.
@@ -222,7 +222,7 @@
# operatation to be replayed during an S3 resume. This
# library class maps directly on top of the Timer class.
S3StallLib|Include/Library/S3StallLib.h
-
+
## @libraryclass Defines library APIs used by modules to get/set print error level.
DebugPrintErrorLevelLib|Include/Library/DebugPrintErrorLevelLib.h
@@ -238,7 +238,7 @@
## @libraryclass Provides services to enable/disable periodic SMI handlers.
#
SmmPeriodicSmiLib|Include/Library/SmmPeriodicSmiLib.h
-
+
[LibraryClasses.IPF]
## @libraryclass The SAL Library provides a service to make a SAL CALL.
SalLib|Include/Library/SalLib.h
@@ -248,7 +248,7 @@
## @libraryclass Provides library services to make Extended SAL Calls.
ExtendedSalLib|Include/Library/ExtendedSalLib.h
-
+
[Guids]
#
# GUID defined in UEFI2.1/UEFI2.0/EFI1.1
@@ -523,6 +523,11 @@
## Include/Guid/FmpCapsule.h
gEfiFmpCapsuleGuid = { 0x6dcbd5ed, 0xe82d, 0x4c44, {0xbd, 0xa1, 0x71, 0x94, 0x19, 0x9a, 0xd9, 0x2a }}
+ ## Include/Guid/ImageAuthentication.h
+ gEfiCertX509Sha256Guid = { 0x3bd2a492, 0x96c0, 0x4079, {0xb4, 0x20, 0xfc, 0xf9, 0x8e, 0xf1, 0x03, 0xed }}
+ gEfiCertX509Sha384Guid = { 0x7076876e, 0x80c2, 0x4ee6, {0xaa, 0xd2, 0x28, 0xb3, 0x49, 0xa6, 0x86, 0x5b }}
+ gEfiCertX509Sha512Guid = { 0x446dbf63, 0x2502, 0x4cda, {0xbc, 0xfa, 0x24, 0x65, 0xd2, 0xb0, 0xfe, 0x9d }}
+
## Include/Protocol/Rng.h
gEfiRngAlgorithmSp80090Hash256Guid = { 0xa7af67cb, 0x603b, 0x4d42, {0xba, 0x21, 0x70, 0xbf, 0xb6, 0x29, 0x3f, 0x96 }}
gEfiRngAlgorithmSp80090Hmac256Guid = { 0xc5149b43, 0xae85, 0x4f53, {0x99, 0x82, 0xb9, 0x43, 0x35, 0xd3, 0xa9, 0xe7 }}
@@ -535,7 +540,7 @@
gEfiAdapterInfoMediaStateGuid = { 0xD7C74207, 0xA831, 0x4A26, {0xB1, 0xF5, 0xD1, 0x93, 0x06, 0x5C, 0xE8, 0xB6 }}
gEfiAdapterInfoNetworkBootGuid = { 0x1FBD2960, 0x4130, 0x41E5, {0x94, 0xAC, 0xD2, 0xCF, 0x03, 0x7F, 0xB3, 0x7C }}
gEfiAdapterInfoSanMacAddressGuid = { 0x114da5ef, 0x2cf1, 0x4e12, {0x9b, 0xbb, 0xc4, 0x70, 0xb5, 0x52, 0x5, 0xd9 }}
-
+
#
# GUID defined in PI1.0
#
@@ -611,7 +616,7 @@
#
## Include/Guid/EventGroup.h
gEfiEndOfDxeEventGroupGuid = { 0x2ce967a, 0xdd7e, 0x4ffc, { 0x9e, 0xe7, 0x81, 0xc, 0xf0, 0x47, 0x8, 0x80 }}
-
+
## Include/Guid/FirmwareContentsSigned.h
gEfiFirmwareContentsSignedGuid = { 0xf9d89e8, 0x9259, 0x4f76, { 0xa5, 0xaf, 0xc, 0x89, 0xe3, 0x40, 0x23, 0xdf }}
@@ -632,7 +637,7 @@
gEfiIa32X64ErrorTypeBusCheckGuid = { 0x1CF3F8B3, 0xC5B1, 0x49a2, { 0xAA, 0x59, 0x5E, 0xEF, 0x92, 0xFF, 0xA6, 0x3C }}
## Include/Guid/Cper.h
- gEfiIa32X64ErrorTypeMsCheckGuid = { 0x48AB7F57, 0xDC34, 0x4f6c, { 0xA7, 0xD3, 0xB0, 0xB5, 0xB0, 0xA7, 0x43, 0x14 }}
+ gEfiIa32X64ErrorTypeMsCheckGuid = { 0x48AB7F57, 0xDC34, 0x4f6c, { 0xA7, 0xD3, 0xB0, 0xB5, 0xB0, 0xA7, 0x43, 0x14 }}
[Ppis]
## Include/Ppi/MasterBootMode.h
@@ -736,7 +741,7 @@
#
# PPIs defined in PI 1.3.
#
-
+
## Include/Ppi/I2cMaster.h
gEfiPeiI2cMasterPpiGuid = { 0xb3bfab9b, 0x9f9c, 0x4e8b, { 0xad, 0x37, 0x7f, 0x8c, 0x51, 0xfc, 0x62, 0x80 }}
@@ -927,16 +932,16 @@
## Include/Protocol/PiPcd.h
gEfiPcdProtocolGuid = { 0x13a3f0f6, 0x264a, 0x3ef0, { 0xf2, 0xe0, 0xde, 0xc5, 0x12, 0x34, 0x2f, 0x34 } }
-
+
## Include/Protocol/FirmwareVolumeBlock.h
gEfiFirmwareVolumeBlock2ProtocolGuid = { 0x8f644fa9, 0xe850, 0x4db1, {0x9c, 0xe2, 0xb, 0x44, 0x69, 0x8e, 0x8d, 0xa4 } }
## Include/Protocol/CpuIo2.h
gEfiCpuIo2ProtocolGuid = {0xad61f191, 0xae5f, 0x4c0e, {0xb9, 0xfa, 0xe8, 0x69, 0xd2, 0x88, 0xc6, 0x4f } }
-
+
## Include/Protocol/LegacyRegion2.h
gEfiLegacyRegion2ProtocolGuid = {0x70101eaf, 0x85, 0x440c, {0xb3, 0x56, 0x8e, 0xe3, 0x6f, 0xef, 0x24, 0xf0 } }
-
+
## Include/Protocol/McaInitPmi.h
gEfiSalMcaInitPmiProtocolGuid = { 0xb60dc6e8, 0x3b6f, 0x11d5, {0xaf, 0x9, 0x0, 0xa0, 0xc9, 0x44, 0xa0, 0x5b } }
@@ -1334,7 +1339,7 @@
## Include/Protocol/IpSec.h
gEfiIpSecProtocolGuid = { 0xdfb386f7, 0xe100, 0x43ad, {0x9c, 0x9a, 0xed, 0x90, 0xd0, 0x8a, 0x5e, 0x12 }}
-
+
## Include/Protocol/IpSec.h
gEfiIpSec2ProtocolGuid = { 0xa3979e64, 0xace8, 0x4ddc, {0xbc, 0x7, 0x4d, 0x66, 0xb8, 0xfd, 0x9, 0x77 }}
@@ -1364,7 +1369,7 @@
## Include/Protocol/Rng.h
gEfiRngProtocolGuid = { 0x3152bca5, 0xeade, 0x433d, {0x86, 0x2e, 0xc0, 0x1c, 0xdc, 0x29, 0x1f, 0x44 }}
-
+
## Include/Protocol/AdapterInformation.h
gEfiAdapterInformationProtocolGuid = { 0xE5DD1403, 0xD622, 0xC24E, {0x84, 0x88, 0xC7, 0x1B, 0x17, 0xF5, 0xE8, 0x02 }}
@@ -1783,4 +1788,4 @@
gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|0|UINT8|0x00000024
[UserExtensions.TianoCore."ExtraFiles"]
- MdePkgExtra.uni
+ MdePkgExtra.uni \ No newline at end of file