diff options
author | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-19 02:14:51 +0000 |
---|---|---|
committer | qianouyang <qianouyang@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-09-19 02:14:51 +0000 |
commit | 2ca8548911013db4211172e8546fcff3db27f302 (patch) | |
tree | 88dae8fa149d306bd8f6b696a9662d231e1d968a /MdeModulePkg/Bus | |
parent | 0357efe3f564bed2e20e4dfad6496bf6db179747 (diff) | |
download | edk2-2ca8548911013db4211172e8546fcff3db27f302.zip edk2-2ca8548911013db4211172e8546fcff3db27f302.tar.gz edk2-2ca8548911013db4211172e8546fcff3db27f302.tar.bz2 |
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
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r-- | MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c index 17e2614..625ba1b 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBus.c @@ -19,7 +19,6 @@ #include "AtaBus.h"
UINT8 mMorControl;
-BOOLEAN mHasMor;
//
// 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"));
}
- if (mHasMor) {
- if (((mMorControl & 0x01) == 0x01) && ((AtaDevice->IdentifyData->trusted_computing_support & BIT0) != 0)) {
- DEBUG ((EFI_D_INFO,
- "mMorControl = %x, AtaDevice->IdentifyData->trusted_computing_support & BIT0 = %x\n",
- mMorControl,
- (AtaDevice->IdentifyData->trusted_computing_support & BIT0)
- ));
- DEBUG ((EFI_D_INFO, "Try to lock device by sending TPer Reset command...\n"));
- InitiateTPerReset(AtaDevice);
- }
+
+ if (((mMorControl & 0x01) == 0x01) && ((AtaDevice->IdentifyData->trusted_computing_support & BIT0) != 0)) {
+ DEBUG ((EFI_D_INFO,
+ "mMorControl = %x, AtaDevice->IdentifyData->trusted_computing_support & BIT0 = %x\n",
+ mMorControl,
+ (AtaDevice->IdentifyData->trusted_computing_support & BIT0)
+ ));
+ DEBUG ((EFI_D_INFO, "Try to lock device by sending TPer Reset command...\n"));
+ InitiateTPerReset(AtaDevice);
}
gBS->OpenProtocol (
@@ -1683,12 +1681,10 @@ InitializeAtaBus( if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_INFO, "AtaBus:gEfiMemoryOverwriteControlDataGuid doesn't exist!!***\n"));
- mHasMor = FALSE;
mMorControl = 0;
Status = EFI_SUCCESS;
} else {
DEBUG ((EFI_D_INFO, "AtaBus:Get the gEfiMemoryOverwriteControlDataGuid = %x!!***\n", mMorControl));
- mHasMor = TRUE;
}
return Status;
|