audk/MdeModulePkg
Marcin Wojtas 6052a15f4a MdeModulePkg/AtaAtapiPassThru: Ensure GHC.AE bit is always set in Ahci
According to AHCI Spec 1.3 GHC.AE bit description:
"The implementation of this bit is dependent upon the value of the
CAP.SAM bit. If CAP.SAM is '0', then GHC.AE shall be read-write and shall
have a reset value of '0'. If CAP.SAM is '1', then AE shall be read-only
and shall have a reset value of '1'."

Being in AhciMode, for proper operation it is required, that GHC.AE bit
is always set, before any other AHCI registers are written to. Current
AhciMode implementation, both in AhciReset() and AhciModeInitialization()
functions, set GHC.AE bit only depending on 'CAP.SAM == 0' condition,
assuming (according to the AHCI spec), that otherwise it has to be set
anyway. It may however happen, that even if 'CAP.SAM == 1', GHC.AE
requires updating by software.

This patch enables in AhciMode setting GHC.AE in case its initial value
is '0'. It fixes AHCI support for Marvell Armada 70x0 and 80x0 SoC
families. The change is transparent to all other platforms.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2016-11-24 15:54:55 +00:00
..
Application MdeModulePkg CapsuleApp: ASSERT to ensure 'CapsuleIndex' is not NULL 2016-11-22 16:31:23 +08:00
Bus MdeModulePkg/AtaAtapiPassThru: Ensure GHC.AE bit is always set in Ahci 2016-11-24 15:54:55 +00:00
Core MdeModulePkg/PiSmmCore: Cache CommunicationBuffer info before using it 2016-11-22 15:22:17 +08:00
Include MdeModulePkg/EbcDxe: reorganize EBC header definitions 2016-11-23 10:20:28 +08:00
Library MdeModulePkg/DxeNetLib: Allow the IPv4/prefix case when AsciiStrToIp4 2016-11-23 14:01:52 +08:00
Logo MdeModulePkg/Logo: rebase to ARRAY_SIZE() 2016-10-27 11:10:57 +02:00
Universal MdeModulePkg/EbcDxe: reorganize EBC header definitions 2016-11-23 10:20:28 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec MdeModulePkg/dec: Add gEdkiiPiSmmMemoryAttributesTableGuid. 2016-11-17 16:30:03 +08:00
MdeModulePkg.dsc MdeModulePkg/EbcDxe: add EBC Debugger 2016-11-23 10:20:26 +08:00
MdeModulePkg.uni MdeModulePkg: Add PcdPciDegradeResourceForOptionRom prompt&help to UNI 2016-10-25 10:52:44 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00