]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Ata: Use a new Pcd named "PcdAtaSmartEnable" to control if enabling...
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 May 2012 06:59:26 +0000 (06:59 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 May 2012 06:59:26 +0000 (06:59 +0000)
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Sun Rui <rui.sun@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13369 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c
MdeModulePkg/MdeModulePkg.dec

index 5a6a3d7d0f862d5f7bbdb4a87e8b5ef67afcacfb..42ee5bc58091cdffc852c6fe99011cfbd1197f96 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The file for AHCI mode of ATA host controller.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -2349,7 +2349,7 @@ AhciModeInitialization (
       //\r
       // If the device is a hard disk, then try to enable S.M.A.R.T feature\r
       //\r
-      if (DeviceType == EfiIdeHarddisk) {\r
+      if ((DeviceType == EfiIdeHarddisk) && PcdGetBool (PcdAtaSmartEnable)) {\r
         AhciAtaSmartSupport (\r
           PciIo,\r
           AhciRegisters,\r
index 771eae2c76286064df988bd494d61c2f2652fd6b..7f4a668433d941cf9f3a3832bea84d1932590a56 100644 (file)
@@ -4,7 +4,7 @@
 #  This driver installs AtaPassThru and ExtScsiPassThru protocol in each ide/sata controller\r
 #  to access to all attached Ata/Atapi devices.\r
 #\r
-#  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -65,3 +65,6 @@
   gEfiIdeControllerInitProtocolGuid             # TO_START\r
   gEfiDevicePathProtocolGuid                    # TO_START\r
   gEfiPciIoProtocolGuid                         # TO_START\r
+\r
+[Pcd]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAtaSmartEnable\r
index 768b51c1fe1e7c5ae7ecdfb4ed417cd604b2b8a4..caffc1cde86f7e3adebdcbf729f2b5c71dfe2a58 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for AHCI mode of ATA host controller.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -2667,7 +2667,7 @@ DetectAndConfigIdeDevice (
     //\r
     // If the device is a hard disk, then try to enable S.M.A.R.T feature\r
     //\r
-    if (DeviceType == EfiIdeHarddisk) {\r
+    if ((DeviceType == EfiIdeHarddisk) && PcdGetBool (PcdAtaSmartEnable)) {\r
       IdeAtaSmartSupport (\r
         Instance,\r
         IdeChannel,\r
index ba9e3300cdbf5f8c86532fb5cac99975ce93a854..62c0bf61b30c0aa70fc6a42b8bc6bb8837486570 100644 (file)
   ## If TRUE, S3 performance data will be supported in ACPI FPDT table.\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwarePerformanceDataTableS3Support|TRUE|BOOLEAN|0x00010064\r
 \r
+  ## This PCD specified whether the S.M.A.R.T feature of attached ATA hard disks are enabled.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAtaSmartEnable|TRUE|BOOLEAN|0x00010065\r
+\r
 [PcdsFeatureFlag.IA32, PcdsFeatureFlag.X64]\r
   ##\r
   # This feature flag specifies whether DxeIpl switches to long mode to enter DXE phase.\r