Add TperReset Logic By using MOR bit - Remove the unnecessary parameter.
Signed-off-by: Ouyang, Qian <Qian.Ouyang@intel.com> Reviewed-by: Yao, Jiewen <jiewen.yao@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13734 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -19,7 +19,6 @@
|
|||||||
#include "AtaBus.h"
|
#include "AtaBus.h"
|
||||||
|
|
||||||
UINT8 mMorControl;
|
UINT8 mMorControl;
|
||||||
BOOLEAN mHasMor;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ATA Bus Driver Binding Protocol Instance
|
// ATA Bus Driver Binding Protocol Instance
|
||||||
@ -370,16 +369,15 @@ RegisterAtaDevice (
|
|||||||
DEBUG ((EFI_D_INFO, "Successfully Install Storage Security Protocol on the ATA device\n"));
|
DEBUG ((EFI_D_INFO, "Successfully Install Storage Security Protocol on the ATA device\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mHasMor) {
|
|
||||||
if (((mMorControl & 0x01) == 0x01) && ((AtaDevice->IdentifyData->trusted_computing_support & BIT0) != 0)) {
|
if (((mMorControl & 0x01) == 0x01) && ((AtaDevice->IdentifyData->trusted_computing_support & BIT0) != 0)) {
|
||||||
DEBUG ((EFI_D_INFO,
|
DEBUG ((EFI_D_INFO,
|
||||||
"mMorControl = %x, AtaDevice->IdentifyData->trusted_computing_support & BIT0 = %x\n",
|
"mMorControl = %x, AtaDevice->IdentifyData->trusted_computing_support & BIT0 = %x\n",
|
||||||
mMorControl,
|
mMorControl,
|
||||||
(AtaDevice->IdentifyData->trusted_computing_support & BIT0)
|
(AtaDevice->IdentifyData->trusted_computing_support & BIT0)
|
||||||
));
|
));
|
||||||
DEBUG ((EFI_D_INFO, "Try to lock device by sending TPer Reset command...\n"));
|
DEBUG ((EFI_D_INFO, "Try to lock device by sending TPer Reset command...\n"));
|
||||||
InitiateTPerReset(AtaDevice);
|
InitiateTPerReset(AtaDevice);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gBS->OpenProtocol (
|
gBS->OpenProtocol (
|
||||||
@ -1683,12 +1681,10 @@ InitializeAtaBus(
|
|||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
DEBUG ((EFI_D_INFO, "AtaBus:gEfiMemoryOverwriteControlDataGuid doesn't exist!!***\n"));
|
DEBUG ((EFI_D_INFO, "AtaBus:gEfiMemoryOverwriteControlDataGuid doesn't exist!!***\n"));
|
||||||
mHasMor = FALSE;
|
|
||||||
mMorControl = 0;
|
mMorControl = 0;
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
DEBUG ((EFI_D_INFO, "AtaBus:Get the gEfiMemoryOverwriteControlDataGuid = %x!!***\n", mMorControl));
|
DEBUG ((EFI_D_INFO, "AtaBus:Get the gEfiMemoryOverwriteControlDataGuid = %x!!***\n", mMorControl));
|
||||||
mHasMor = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
Reference in New Issue
Block a user