SecurityPkg: Fix spelling errors
https://bugzilla.tianocore.org/show_bug.cgi?id=2265 Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Chao Zhang <chao.b.zhang@intel.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
This commit is contained in:
committed by
Michael D Kinney
parent
6e7e9b9578
commit
d6b926e76e
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
TCG MOR (Memory Overwrite Request) Control Driver.
|
||||
|
||||
This driver initilize MemoryOverwriteRequestControl variable. It
|
||||
This driver initialize MemoryOverwriteRequestControl variable. It
|
||||
will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will also do TPer Reset for
|
||||
those encrypted drives through EFI_STORAGE_SECURITY_COMMAND_PROTOCOL at EndOfDxe.
|
||||
|
||||
@@ -298,7 +298,7 @@ TPerResetAtEndOfDxe (
|
||||
@param[in] ImageHandle Image handle of this driver.
|
||||
@param[in] SystemTable A Pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCEESS
|
||||
@retval EFI_SUCCESS
|
||||
@return Others Some error occurs.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -341,7 +341,7 @@ MorDriverEntryPoint (
|
||||
//
|
||||
// Create a Ready To Boot Event and Clear the MorControl bit in the call back function.
|
||||
//
|
||||
DEBUG ((DEBUG_INFO, "TcgMor: Create ReadyToBoot Event for MorControl Bit cleanning!\n"));
|
||||
DEBUG ((DEBUG_INFO, "TcgMor: Create ReadyToBoot Event for MorControl Bit cleaning!\n"));
|
||||
Status = EfiCreateEventReadyToBootEx (
|
||||
TPL_CALLBACK,
|
||||
OnReadyToBoot,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
## @file
|
||||
# Initilizes MemoryOverwriteRequestControl variable
|
||||
# initializes MemoryOverwriteRequestControl variable
|
||||
#
|
||||
# This module will clear MOR_CLEAR_MEMORY_BIT bit if it is set. It will also do
|
||||
# TPer Reset for those encrypted drives through EFI_STORAGE_SECURITY_COMMAND_PROTOCOL
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// /** @file
|
||||
// Initilizes MemoryOverwriteRequestControl variable
|
||||
// initializes MemoryOverwriteRequestControl variable
|
||||
//
|
||||
// This module will clear MOR_CLEAR_MEMORY_BIT bit if it is set.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
TCG MOR (Memory Overwrite Request) Lock Control Driver.
|
||||
|
||||
This driver initilize MemoryOverwriteRequestControlLock variable.
|
||||
This driver initializes MemoryOverwriteRequestControlLock variable.
|
||||
This module will add Variable Hook and allow MemoryOverwriteRequestControlLock variable set only once.
|
||||
|
||||
Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
@@ -167,7 +167,7 @@ SetVariableCheckHandlerMor (
|
||||
@param[in] ImageHandle Image handle of this driver.
|
||||
@param[in] SystemTable A Pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCEESS
|
||||
@retval EFI_SUCCESS
|
||||
@return Others Some error occurs.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -119,7 +119,7 @@ SetVariableCheckHandlerMor (
|
||||
@param[in] ImageHandle Image handle of this driver.
|
||||
@param[in] SystemTable A Pointer to the EFI System Table.
|
||||
|
||||
@retval EFI_SUCEESS
|
||||
@retval EFI_SUCCESS
|
||||
@return Others Some error occurs.
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// /** @file
|
||||
// Initilizes MemoryOverwriteRequestControlLock variable
|
||||
// Initializes MemoryOverwriteRequestControlLock variable
|
||||
//
|
||||
// This module will add Variable Hook and allow MemoryOverwriteRequestControlLock variable set only once.
|
||||
//
|
||||
@@ -10,7 +10,7 @@
|
||||
// **/
|
||||
|
||||
|
||||
#string STR_MODULE_ABSTRACT #language en-US "Initilizes MemoryOverwriteRequestControlLock variable"
|
||||
#string STR_MODULE_ABSTRACT #language en-US "Initializes MemoryOverwriteRequestControlLock variable"
|
||||
|
||||
#string STR_MODULE_DESCRIPTION #language en-US "This module will add Variable Hook and allow MemoryOverwriteRequestControlLock variable set only once."
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
## @file
|
||||
# Initilizes MemoryOverwriteRequestControlLock variable
|
||||
# Initializes MemoryOverwriteRequestControlLock variable
|
||||
#
|
||||
# This module will add Variable Hook and allow MemoryOverwriteRequestControlLock variable set only once.
|
||||
#
|
||||
|
@@ -2583,7 +2583,7 @@ OpalDriverGetDriverDeviceName(
|
||||
@param ImageHandle Image Handle this driver.
|
||||
@param SystemTable Pointer to SystemTable.
|
||||
|
||||
@retval EFI_SUCESS This function always complete successfully.
|
||||
@retval EFI_SUCCESS This function always complete successfully.
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -2637,7 +2637,7 @@ EfiDriverEntryPoint(
|
||||
Tests to see if this driver supports a given controller.
|
||||
|
||||
This function checks to see if the controller contains an instance of the
|
||||
EFI_STORAGE_SECURITY_COMMAND_PROTOCOL and the EFI_BLOCK_IO_PROTOCL
|
||||
EFI_STORAGE_SECURITY_COMMAND_PROTOCOL and the EFI_BLOCK_IO_PROTOCOL
|
||||
and returns EFI_SUCCESS if it does.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@@ -2741,7 +2741,7 @@ OpalEfiDriverBindingSupported(
|
||||
"controller", which is a child Handle, contains the EF_STORAGE_SECURITY_COMMAND protocols.
|
||||
This function will complete the other necessary checks, such as verifying the device supports
|
||||
the correct version of Opal. Upon verification, it will add the device to the
|
||||
Opal HII list in order to expose Opal managmeent options.
|
||||
Opal HII list in order to expose Opal management options.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The Handle of the controller to start. This Handle
|
||||
|
@@ -61,7 +61,7 @@ extern EFI_DRIVER_BINDING_PROTOCOL gOpalDriverBinding;
|
||||
extern EFI_COMPONENT_NAME_PROTOCOL gOpalComponentName;
|
||||
extern EFI_COMPONENT_NAME2_PROTOCOL gOpalComponentName2;
|
||||
|
||||
#define OPAL_MSID_LENGHT 128
|
||||
#define OPAL_MSID_LENGTH 128
|
||||
|
||||
#define MAX_PASSWORD_TRY_COUNT 5
|
||||
|
||||
@@ -131,7 +131,7 @@ typedef struct {
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 MsidLength; // Byte length of MSID Pin for device
|
||||
UINT8 Msid[OPAL_MSID_LENGHT]; // MSID Pin for device
|
||||
UINT8 Msid[OPAL_MSID_LENGTH]; // MSID Pin for device
|
||||
EFI_STORAGE_SECURITY_COMMAND_PROTOCOL *Sscp;
|
||||
UINT32 MediaId; // MediaId is used by Ssc Protocol.
|
||||
EFI_DEVICE_PATH_PROTOCOL *OpalDevicePath;
|
||||
@@ -309,7 +309,7 @@ OpalEfiDriverBindingSupported(
|
||||
"controller", which is a child handle, contains the EF_STORAGE_SECURITY_COMMAND protocols.
|
||||
This function will complete the other necessary checks, such as verifying the device supports
|
||||
the correct version of Opal. Upon verification, it will add the device to the
|
||||
Opal HII list in order to expose Opal managmeent options.
|
||||
Opal HII list in order to expose Opal management options.
|
||||
|
||||
@param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance.
|
||||
@param[in] ControllerHandle The handle of the controller to start. This handle
|
||||
|
@@ -1090,7 +1090,7 @@ OpalHiiSetBrowserData (
|
||||
|
||||
/**
|
||||
|
||||
Populate the hii_g_Configuraton with the browser Data.
|
||||
Populate the hii_g_Configuration with the browser Data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -1164,7 +1164,7 @@ HiiSetFormString(
|
||||
|
||||
@param Dev The Opal device.
|
||||
|
||||
@retval EFI_SUCESS Initialize the device success.
|
||||
@retval EFI_SUCCESS Initialize the device success.
|
||||
@retval EFI_DEVICE_ERROR Get info from device failed.
|
||||
|
||||
**/
|
||||
@@ -1193,7 +1193,7 @@ OpalDiskInitialize (
|
||||
}
|
||||
Session.OpalBaseComId = Dev->OpalDisk.OpalBaseComId;
|
||||
|
||||
TcgResult = OpalUtilGetMsid (&Session, Dev->OpalDisk.Msid, OPAL_MSID_LENGHT, &Dev->OpalDisk.MsidLength);
|
||||
TcgResult = OpalUtilGetMsid (&Session, Dev->OpalDisk.Msid, OPAL_MSID_LENGTH, &Dev->OpalDisk.MsidLength);
|
||||
if (TcgResult != TcgResultSuccess) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
@@ -1220,7 +1220,7 @@ OpalDiskInitialize (
|
||||
|
||||
@param OpalDisk The Opal device.
|
||||
|
||||
@retval EFI_SUCESS Get ownership success.
|
||||
@retval EFI_SUCCESS Get ownership success.
|
||||
@retval EFI_ACCESS_DENIED Has send BlockSID command, can't change ownership.
|
||||
@retval EFI_INVALID_PARAMETER Not get Msid info before get ownership info.
|
||||
|
||||
@@ -1254,7 +1254,7 @@ OpalDiskUpdateOwnerShip (
|
||||
|
||||
@param OpalDisk The Opal device.
|
||||
|
||||
@retval EFI_SUCESS Initialize the device success.
|
||||
@retval EFI_SUCCESS Initialize the device success.
|
||||
@retval EFI_DEVICE_ERROR Get info from device failed.
|
||||
@retval EFI_INVALID_PARAMETER Not get Msid info before get ownership info.
|
||||
@retval EFI_ACCESS_DENIED Has send BlockSID command, can't change ownership.
|
||||
|
@@ -156,7 +156,7 @@ OpalHiiSetBrowserData (
|
||||
|
||||
/**
|
||||
|
||||
Populate the hii_g_Configuraton with the browser Data.
|
||||
Populate the hii_g_Configuration with the browser Data.
|
||||
|
||||
**/
|
||||
VOID
|
||||
@@ -247,7 +247,7 @@ GetDiskNameStringId(
|
||||
|
||||
@param OpalDisk The Opal device.
|
||||
|
||||
@retval EFI_SUCESS Initialize the device success.
|
||||
@retval EFI_SUCCESS Initialize the device success.
|
||||
@retval EFI_DEVICE_ERROR Get info from device failed.
|
||||
@retval EFI_INVALID_PARAMETER Not get Msid info before get ownership info.
|
||||
|
||||
@@ -348,7 +348,7 @@ HiiUninstall(
|
||||
|
||||
@param Dev The Opal device.
|
||||
|
||||
@retval EFI_SUCESS Initialize the device success.
|
||||
@retval EFI_SUCCESS Initialize the device success.
|
||||
@retval EFI_DEVICE_ERROR Get info from device failed.
|
||||
|
||||
**/
|
||||
@@ -362,7 +362,7 @@ OpalDiskInitialize (
|
||||
|
||||
@param OpalDisk The Opal device.
|
||||
|
||||
@retval EFI_SUCESS Get ownership success.
|
||||
@retval EFI_SUCCESS Get ownership success.
|
||||
@retval EFI_ACCESS_DENIED Has send BlockSID command, can't change ownership.
|
||||
@retval EFI_INVALID_PARAMETER Not get Msid info before get ownership info.
|
||||
|
||||
|
@@ -31,7 +31,7 @@ LockTpmPhysicalPresence (
|
||||
);
|
||||
|
||||
//
|
||||
// Gobal defintions for lock physical presence PPI and its descriptor.
|
||||
// Global defintions for lock physical presence PPI and its descriptor.
|
||||
//
|
||||
PEI_LOCK_PHYSICAL_PRESENCE_PPI mLockPhysicalPresencePpi = {
|
||||
LockTpmPhysicalPresence
|
||||
|
@@ -16,19 +16,19 @@ formset
|
||||
|
||||
efivarstore TCG2_CONFIGURATION_INFO,
|
||||
varid = TCG2_CONFIGURATION_INFO_VARSTORE_ID,
|
||||
attribute = 0x02, // EFI variable attribures EFI_VARIABLE_BOOTSERVICE_ACCESS
|
||||
attribute = 0x02, // EFI variable attributes EFI_VARIABLE_BOOTSERVICE_ACCESS
|
||||
name = TCG2_CONFIGURATION_INFO,
|
||||
guid = TCG2_CONFIG_FORM_SET_GUID;
|
||||
|
||||
efivarstore TCG2_CONFIGURATION,
|
||||
varid = TCG2_CONFIGURATION_VARSTORE_ID,
|
||||
attribute = 0x03, // EFI variable attribures EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE
|
||||
attribute = 0x03, // EFI variable attributes EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE
|
||||
name = TCG2_CONFIGURATION,
|
||||
guid = TCG2_CONFIG_FORM_SET_GUID;
|
||||
|
||||
efivarstore TCG2_VERSION,
|
||||
varid = TCG2_VERSION_VARSTORE_ID,
|
||||
attribute = 0x03, // EFI variable attribures EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE
|
||||
attribute = 0x03, // EFI variable attributes EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE
|
||||
name = TCG2_VERSION,
|
||||
guid = TCG2_CONFIG_FORM_SET_GUID;
|
||||
|
||||
|
@@ -240,7 +240,7 @@ InitializeTcg2VersionInfo (
|
||||
|
||||
@retval EFI_ALREADY_STARTED The driver already exists in system.
|
||||
@retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack of resources.
|
||||
@retval EFI_SUCCES All the related protocols are installed on the driver.
|
||||
@retval EFI_SUCCESS All the related protocols are installed on the driver.
|
||||
@retval Others Fail to install protocols as indicated.
|
||||
|
||||
**/
|
||||
|
@@ -57,7 +57,7 @@ DetectTpmDevice (
|
||||
@param FileHandle Handle of the file being invoked.
|
||||
@param PeiServices Describes the list of possible PEI Services.
|
||||
|
||||
@retval EFI_SUCCES Convert variable to PCD successfully.
|
||||
@retval EFI_SUCCESS Convert variable to PCD successfully.
|
||||
@retval Others Fail to convert variable to PCD.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -118,7 +118,7 @@ Tcg2ConfigPeimEntryPoint (
|
||||
|
||||
//
|
||||
// Convert variable to PCD.
|
||||
// This is work-around because there is no gurantee DynamicHiiPcd can return correct value in DXE phase.
|
||||
// This is work-around because there is no guarantee DynamicHiiPcd can return correct value in DXE phase.
|
||||
// Using DynamicPcd instead.
|
||||
//
|
||||
// NOTE: Tcg2Configuration variable contains the desired TpmDevice type,
|
||||
|
@@ -86,7 +86,7 @@ Tcg2DxeImageRead (
|
||||
@param[in] PCRIndex TPM PCR index
|
||||
@param[in] ImageAddress Start address of image buffer.
|
||||
@param[in] ImageSize Image size
|
||||
@param[out] DigestList Digeest list of this image.
|
||||
@param[out] DigestList Digest list of this image.
|
||||
|
||||
@retval EFI_SUCCESS Successfully measure image.
|
||||
@retval EFI_OUT_OF_RESOURCES No enough resource to measure image.
|
||||
|
@@ -127,7 +127,7 @@ EFI_HANDLE mImageHandle;
|
||||
@param[in] PCRIndex TPM PCR index
|
||||
@param[in] ImageAddress Start address of image buffer.
|
||||
@param[in] ImageSize Image size
|
||||
@param[out] DigestList Digeest list of this image.
|
||||
@param[out] DigestList Digest list of this image.
|
||||
|
||||
@retval EFI_SUCCESS Successfully measure image.
|
||||
@retval EFI_OUT_OF_RESOURCES No enough resource to measure image.
|
||||
|
@@ -79,7 +79,7 @@ UINT32 mMeasuredMaxChildFvIndex = 0;
|
||||
UINT32 mMeasuredChildFvIndex = 0;
|
||||
|
||||
/**
|
||||
Measure and record the Firmware Volum Information once FvInfoPPI install.
|
||||
Measure and record the Firmware Volume Information once FvInfoPPI install.
|
||||
|
||||
@param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
||||
@param[in] NotifyDescriptor Address of the notification descriptor data structure.
|
||||
@@ -91,14 +91,14 @@ UINT32 mMeasuredChildFvIndex = 0;
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FirmwareVolmeInfoPpiNotifyCallback (
|
||||
FirmwareVolumeInfoPpiNotifyCallback (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
|
||||
IN VOID *Ppi
|
||||
);
|
||||
|
||||
/**
|
||||
Record all measured Firmware Volum Information into a Guid Hob
|
||||
Record all measured Firmware Volume Information into a Guid Hob
|
||||
|
||||
@param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
||||
@param[in] NotifyDescriptor Address of the notification descriptor data structure.
|
||||
@@ -120,12 +120,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] = {
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
|
||||
&gEfiPeiFirmwareVolumeInfoPpiGuid,
|
||||
FirmwareVolmeInfoPpiNotifyCallback
|
||||
FirmwareVolumeInfoPpiNotifyCallback
|
||||
},
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
|
||||
&gEfiPeiFirmwareVolumeInfo2PpiGuid,
|
||||
FirmwareVolmeInfoPpiNotifyCallback
|
||||
FirmwareVolumeInfoPpiNotifyCallback
|
||||
},
|
||||
{
|
||||
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
@@ -136,7 +136,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] = {
|
||||
|
||||
|
||||
/**
|
||||
Record all measured Firmware Volum Information into a Guid Hob
|
||||
Record all measured Firmware Volume Information into a Guid Hob
|
||||
Guid Hob payload layout is
|
||||
|
||||
UINT32 *************************** FIRMWARE_BLOB number
|
||||
@@ -688,7 +688,7 @@ MeasureMainBios (
|
||||
}
|
||||
|
||||
/**
|
||||
Measure and record the Firmware Volum Information once FvInfoPPI install.
|
||||
Measure and record the Firmware Volume Information once FvInfoPPI install.
|
||||
|
||||
@param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
||||
@param[in] NotifyDescriptor Address of the notification descriptor data structure.
|
||||
@@ -700,7 +700,7 @@ MeasureMainBios (
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FirmwareVolmeInfoPpiNotifyCallback (
|
||||
FirmwareVolumeInfoPpiNotifyCallback (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
|
||||
IN VOID *Ppi
|
||||
|
@@ -269,7 +269,7 @@ UpdatePPVersion (
|
||||
|
||||
/**
|
||||
Patch interrupt resources returned by TPM _PRS. ResourceTemplate to patch is determined by input
|
||||
interrupt buffer size. BufferSize, PkgLength and interrupt descirptor in ByteList need to be patched
|
||||
interrupt buffer size. BufferSize, PkgLength and interrupt descriptor in ByteList need to be patched
|
||||
|
||||
@param[in, out] Table The TPM item in ACPI table.
|
||||
@param[in] IrqBuffer Input new IRQ buffer.
|
||||
@@ -304,7 +304,7 @@ UpdatePossibleResource (
|
||||
// to patch TPM ACPI object _PRS returned ResourceTemplate() containing 2 resource descriptors and an auto appended End Tag
|
||||
//
|
||||
// AML data is organized by following rule.
|
||||
// Code need to patch BufferSize and PkgLength and interrupt descirptor in ByteList
|
||||
// Code need to patch BufferSize and PkgLength and interrupt descriptor in ByteList
|
||||
//
|
||||
// ============= Buffer ====================
|
||||
// DefBuffer := BufferOp PkgLength BufferSize ByteList
|
||||
@@ -321,8 +321,8 @@ UpdatePossibleResource (
|
||||
// <bit 3-0: Least significant package length nybble>
|
||||
//
|
||||
//==============BufferSize==================
|
||||
// BufferSize := Integar
|
||||
// Integar := ByteConst|WordConst|DwordConst....
|
||||
// BufferSize := Integer
|
||||
// Integer := ByteConst|WordConst|DwordConst....
|
||||
//
|
||||
// ByteConst := BytePrefix ByteData
|
||||
//
|
||||
@@ -371,7 +371,7 @@ UpdatePossibleResource (
|
||||
}
|
||||
|
||||
//
|
||||
// Include Memory32Fixed Descritor (12 Bytes) + Interrupt Descriptor header(5 Bytes) + End Tag(2 Bytes)
|
||||
// Include Memory32Fixed Descriptor (12 Bytes) + Interrupt Descriptor header(5 Bytes) + End Tag(2 Bytes)
|
||||
//
|
||||
NewPkgLength += 19 + IrqBuffserSize;
|
||||
if (NewPkgLength > 63) {
|
||||
@@ -389,7 +389,7 @@ UpdatePossibleResource (
|
||||
*DataPtr = (UINT8)NewPkgLength;
|
||||
|
||||
//
|
||||
// 1.2 Patch BufferSize = sizeof(Memory32Fixed Descritor + Interrupt Descriptor + End Tag).
|
||||
// 1.2 Patch BufferSize = sizeof(Memory32Fixed Descriptor + Interrupt Descriptor + End Tag).
|
||||
// It is Little endian. So only patch lowest byte of BufferSize due to current interrupt number limit.
|
||||
//
|
||||
*(DataPtr + 2) = (UINT8)(IrqBuffserSize + 19);
|
||||
@@ -445,7 +445,7 @@ UpdatePossibleResource (
|
||||
}
|
||||
|
||||
//
|
||||
// Include Memory32Fixed Descritor (12 Bytes) + Interrupt Descriptor header(5 Bytes) + End Tag(2 Bytes)
|
||||
// Include Memory32Fixed Descriptor (12 Bytes) + Interrupt Descriptor header(5 Bytes) + End Tag(2 Bytes)
|
||||
//
|
||||
NewPkgLength += 19 + IrqBuffserSize;
|
||||
|
||||
@@ -461,7 +461,7 @@ UpdatePossibleResource (
|
||||
*(DataPtr + 1) = (UINT8)((NewPkgLength & 0xFF0) >> 4);
|
||||
|
||||
//
|
||||
// 2.2 Patch BufferSize = sizeof(Memory32Fixed Descritor + Interrupt Descriptor + End Tag).
|
||||
// 2.2 Patch BufferSize = sizeof(Memory32Fixed Descriptor + Interrupt Descriptor + End Tag).
|
||||
// It is Little endian. Only patch lowest byte of BufferSize due to current interrupt number limit.
|
||||
//
|
||||
*(DataPtr + 2 + ((*DataPtr & (BIT7|BIT6)) >> 6)) = (UINT8)(IrqBuffserSize + 19);
|
||||
@@ -485,7 +485,7 @@ UpdatePossibleResource (
|
||||
//
|
||||
DataPtr += NewPkgLength - (5 + IrqBuffserSize + 2);
|
||||
//
|
||||
// 3.1 Patch Length bit[7:0] of Interrupt descirptor patch interrupt descriptor
|
||||
// 3.1 Patch Length bit[7:0] of Interrupt descriptor patch interrupt descriptor
|
||||
//
|
||||
*(DataPtr + 1) = (UINT8)(2 + IrqBuffserSize);
|
||||
//
|
||||
@@ -498,7 +498,7 @@ UpdatePossibleResource (
|
||||
CopyMem(DataPtr + 5, IrqBuffer, IrqBuffserSize);
|
||||
|
||||
//
|
||||
// 4. Jump over Interrupt descirptor and Patch END Tag, set Checksum field to 0
|
||||
// 4. Jump over Interrupt descriptor and Patch END Tag, set Checksum field to 0
|
||||
//
|
||||
DataPtr += 5 + IrqBuffserSize;
|
||||
*DataPtr = ACPI_END_TAG_DESCRIPTOR;
|
||||
@@ -715,7 +715,7 @@ PublishAcpiTable (
|
||||
mTcgNvs->IsShortFormPkgLength = IsShortFormPkgLength;
|
||||
|
||||
//
|
||||
// Publish the TPM ACPI table. Table is re-checksumed.
|
||||
// Publish the TPM ACPI table. Table is re-checksummed.
|
||||
//
|
||||
Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **) &AcpiTable);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
@@ -76,17 +76,17 @@ DefinitionBlock (
|
||||
Field (TNVS, AnyAcc, NoLock, Preserve)
|
||||
{
|
||||
PPIN, 8, // Software SMI for Physical Presence Interface
|
||||
PPIP, 32, // Used for save physical presence paramter
|
||||
PPIP, 32, // Used for save physical presence parameter
|
||||
PPRP, 32, // Physical Presence request operation response
|
||||
PPRQ, 32, // Physical Presence request operation
|
||||
PPRM, 32, // Physical Presence request operation parameter
|
||||
LPPR, 32, // Last Physical Presence request operation
|
||||
FRET, 32, // Physical Presence function return code
|
||||
MCIN, 8, // Software SMI for Memory Clear Interface
|
||||
MCIP, 32, // Used for save the Mor paramter
|
||||
MCIP, 32, // Used for save the Mor parameter
|
||||
MORD, 32, // Memory Overwrite Request Data
|
||||
MRET, 32, // Memory Overwrite function return code
|
||||
UCRQ, 32, // Phyical Presence request operation to Get User Confirmation Status
|
||||
UCRQ, 32, // Physical Presence request operation to Get User Confirmation Status
|
||||
IRQN, 32, // IRQ Number for _CRS
|
||||
SFRB, 8 // Is shortformed Pkglength for resource buffer
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
@retval EFI_ALREADY_STARTED The driver already exists in system.
|
||||
@retval EFI_OUT_OF_RESOURCES Fail to execute entry point due to lack of resources.
|
||||
@retval EFI_SUCCES All the related protocols are installed on the driver.
|
||||
@retval EFI_SUCCESS All the related protocols are installed on the driver.
|
||||
@retval Others Fail to install protocols as indicated.
|
||||
|
||||
**/
|
||||
|
@@ -79,7 +79,7 @@ EFI_TCG_CLIENT_ACPI_TABLE mTcgClientAcpiTemplate = {
|
||||
|
||||
//
|
||||
// The following EFI_TCG_SERVER_ACPI_TABLE default setting is just one example,
|
||||
// the TPM device connectes to LPC, and also defined the ACPI _UID as 0xFF,
|
||||
// the TPM device connects to LPC, and also defined the ACPI _UID as 0xFF,
|
||||
// this _UID can be changed and should match with the _UID setting of the TPM
|
||||
// ACPI device object
|
||||
//
|
||||
@@ -1224,7 +1224,7 @@ InstallAcpiTable (
|
||||
mTcgClientAcpiTemplate.Header.CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
|
||||
mTcgClientAcpiTemplate.Header.CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
|
||||
//
|
||||
// The ACPI table must be checksumed before calling the InstallAcpiTable()
|
||||
// The ACPI table must be checksummed before calling the InstallAcpiTable()
|
||||
// service of the ACPI table protocol to install it.
|
||||
//
|
||||
Checksum = CalculateCheckSum8 ((UINT8 *)&mTcgClientAcpiTemplate, sizeof (mTcgClientAcpiTemplate));
|
||||
@@ -1244,7 +1244,7 @@ InstallAcpiTable (
|
||||
mTcgServerAcpiTemplate.Header.CreatorId = PcdGet32 (PcdAcpiDefaultCreatorId);
|
||||
mTcgServerAcpiTemplate.Header.CreatorRevision = PcdGet32 (PcdAcpiDefaultCreatorRevision);
|
||||
//
|
||||
// The ACPI table must be checksumed before calling the InstallAcpiTable()
|
||||
// The ACPI table must be checksummed before calling the InstallAcpiTable()
|
||||
// service of the ACPI table protocol to install it.
|
||||
//
|
||||
Checksum = CalculateCheckSum8 ((UINT8 *)&mTcgServerAcpiTemplate, sizeof (mTcgServerAcpiTemplate));
|
||||
|
@@ -85,7 +85,7 @@ PhysicalPresencePpiNotifyCallback (
|
||||
);
|
||||
|
||||
/**
|
||||
Measure and record the Firmware Volum Information once FvInfoPPI install.
|
||||
Measure and record the Firmware Volume Information once FvInfoPPI install.
|
||||
|
||||
@param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
||||
@param[in] NotifyDescriptor Address of the notification descriptor data structure.
|
||||
@@ -97,14 +97,14 @@ PhysicalPresencePpiNotifyCallback (
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FirmwareVolmeInfoPpiNotifyCallback (
|
||||
FirmwareVolumeInfoPpiNotifyCallback (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
|
||||
IN VOID *Ppi
|
||||
);
|
||||
|
||||
/**
|
||||
Record all measured Firmware Volum Information into a Guid Hob
|
||||
Record all measured Firmware Volume Information into a Guid Hob
|
||||
|
||||
@param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
||||
@param[in] NotifyDescriptor Address of the notification descriptor data structure.
|
||||
@@ -131,12 +131,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] = {
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
|
||||
&gEfiPeiFirmwareVolumeInfoPpiGuid,
|
||||
FirmwareVolmeInfoPpiNotifyCallback
|
||||
FirmwareVolumeInfoPpiNotifyCallback
|
||||
},
|
||||
{
|
||||
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
|
||||
&gEfiPeiFirmwareVolumeInfo2PpiGuid,
|
||||
FirmwareVolmeInfoPpiNotifyCallback
|
||||
FirmwareVolumeInfoPpiNotifyCallback
|
||||
},
|
||||
{
|
||||
(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
|
||||
@@ -146,7 +146,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyList[] = {
|
||||
};
|
||||
|
||||
/**
|
||||
Record all measured Firmware Volum Information into a Guid Hob
|
||||
Record all measured Firmware Voluem Information into a Guid Hob
|
||||
Guid Hob payload layout is
|
||||
|
||||
UINT32 *************************** FIRMWARE_BLOB number
|
||||
@@ -501,7 +501,7 @@ MeasureMainBios (
|
||||
}
|
||||
|
||||
/**
|
||||
Measure and record the Firmware Volum Information once FvInfoPPI install.
|
||||
Measure and record the Firmware Voluem Information once FvInfoPPI install.
|
||||
|
||||
@param[in] PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
|
||||
@param[in] NotifyDescriptor Address of the notification descriptor data structure.
|
||||
@@ -513,7 +513,7 @@ MeasureMainBios (
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
FirmwareVolmeInfoPpiNotifyCallback (
|
||||
FirmwareVolumeInfoPpiNotifyCallback (
|
||||
IN EFI_PEI_SERVICES **PeiServices,
|
||||
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
|
||||
IN VOID *Ppi
|
||||
@@ -672,7 +672,7 @@ PhysicalPresencePpiNotifyCallback (
|
||||
}
|
||||
|
||||
/**
|
||||
Check if TPM chip is activeated or not.
|
||||
Check if TPM chip is activated or not.
|
||||
|
||||
@param[in] PeiServices Describes the list of possible PEI Services.
|
||||
|
||||
|
@@ -64,16 +64,16 @@ DefinitionBlock (
|
||||
Field (TNVS, AnyAcc, NoLock, Preserve)
|
||||
{
|
||||
PPIN, 8, // Software SMI for Physical Presence Interface
|
||||
PPIP, 32, // Used for save physical presence paramter
|
||||
PPIP, 32, // Used for save physical presence parameter
|
||||
PPRP, 32, // Physical Presence request operation response
|
||||
PPRQ, 32, // Physical Presence request operation
|
||||
LPPR, 32, // Last Physical Presence request operation
|
||||
FRET, 32, // Physical Presence function return code
|
||||
MCIN, 8, // Software SMI for Memory Clear Interface
|
||||
MCIP, 32, // Used for save the Mor paramter
|
||||
MCIP, 32, // Used for save the Mor parameter
|
||||
MORD, 32, // Memory Overwrite Request Data
|
||||
MRET, 32, // Memory Overwrite function return code
|
||||
UCRQ, 32 // Phyical Presence request operation to Get User Confirmation Status
|
||||
UCRQ, 32 // Physical Presence request operation to Get User Confirmation Status
|
||||
}
|
||||
|
||||
Method (PTS, 1, Serialized)
|
||||
|
Reference in New Issue
Block a user