These simple fixes get the Versatile Express TC2 board booting properly and restore PL180 functionalily.
[PATCH 1/3] ArmPlatformPkg/PL180MciDxe: fix Depex for TC2 [PATCH 2/3] ArmPlatformPkg/PL180MciDxe: warn on probe fail [PATCH 3/3] ArmPlatformPkg/PL180MciDxe: don't check ID_REG3
PL180 on TC2 has a dependency on gEfiCpuArchProtocolGuid. Without adding the dependency, TC2 will crash in the PL180 driver.
This problem has been present since d340ef7 when TC2 stopped booting. However, it was masked by 300fc77 which prevented PL180 from running on TC2 due to TC2 using a version on PL180 newer than that documented publicly.
[1] https://github.com/tianocore/edk2/commit/d340ef7 2014-08-26 ArmPkg/ArmArchTimerLib: Remove non required [depex] and IoLib [2] https://github.com/tianocore/edk2/commit/300fc77 2015-08-25 ArmPlatformPkg/PL180MciDxe: check PrimeCell ID before initializing
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin ryan.harkin@linaro.org --- ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf index 418fbac..03d5ba5 100644 --- a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf +++ b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180MciDxe.inf @@ -49,4 +49,4 @@ [Pcd] gArmPlatformTokenSpaceGuid.PcdPL180MciBaseAddress
[Depex] - TRUE + gEfiCpuArchProtocolGuid
If the PL180 fails to probe, issue a warning on debug builds.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin ryan.harkin@linaro.org --- ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c index 688cd8a..3e94ea5 100644 --- a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c +++ b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c @@ -534,6 +534,8 @@ PL180MciDxeInitialize ( MmioRead8 (MCI_PCELL_ID_REG2) != MCI_PCELL_ID2 || MmioRead8 (MCI_PCELL_ID_REG3) != MCI_PCELL_ID3) {
+ DEBUG ((EFI_D_WARN, "Probing ID registers at 0x%lx for a PL180" + " failed\n", MCI_PERIPH_ID_REG0)); return EFI_NOT_FOUND; }
TC2 reads 0x02 for the PL180 ID3 register instead of 0x00 as defined in the spec.
However, the spec [1] states that the contents of ID3 register represent the "configuration option of the peripheral" and thus not part of the Prime Cell identification.
For this patch, we drop checking the value in MCI_PERIPH_ID_REG3.
[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0172a/index.h...
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin ryan.harkin@linaro.org --- ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c index 3e94ea5..5526aac 100644 --- a/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c +++ b/ArmPlatformPkg/Drivers/PL180MciDxe/PL180Mci.c @@ -528,7 +528,6 @@ PL180MciDxeInitialize ( if (MmioRead8 (MCI_PERIPH_ID_REG0) != MCI_PERIPH_ID0 || MmioRead8 (MCI_PERIPH_ID_REG1) != MCI_PERIPH_ID1 || MmioRead8 (MCI_PERIPH_ID_REG2) != MCI_PERIPH_ID2 || - MmioRead8 (MCI_PERIPH_ID_REG3) != MCI_PERIPH_ID3 || MmioRead8 (MCI_PCELL_ID_REG0) != MCI_PCELL_ID0 || MmioRead8 (MCI_PCELL_ID_REG1) != MCI_PCELL_ID1 || MmioRead8 (MCI_PCELL_ID_REG2) != MCI_PCELL_ID2 ||
On 1 March 2016 at 18:26, Ryan Harkin ryan.harkin@linaro.org wrote:
These simple fixes get the Versatile Express TC2 board booting properly and restore PL180 functionalily.
[PATCH 1/3] ArmPlatformPkg/PL180MciDxe: fix Depex for TC2 [PATCH 2/3] ArmPlatformPkg/PL180MciDxe: warn on probe fail [PATCH 3/3] ArmPlatformPkg/PL180MciDxe: don't check ID_REG3
Looks fine to me
Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org
On 1 March 2016 at 17:41, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 1 March 2016 at 18:26, Ryan Harkin ryan.harkin@linaro.org wrote:
These simple fixes get the Versatile Express TC2 board booting properly and restore PL180 functionalily.
[PATCH 1/3] ArmPlatformPkg/PL180MciDxe: fix Depex for TC2 [PATCH 2/3] ArmPlatformPkg/PL180MciDxe: warn on probe fail [PATCH 3/3] ArmPlatformPkg/PL180MciDxe: don't check ID_REG3
Looks fine to me
Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org
Thanks!
I've pushed them to my tree to make applying easier should Leif wish to cherry-pick:
https://git.linaro.org/landing-teams/working/arm/edk2.git/shortlog/refs/tags...
On Tue, Mar 01, 2016 at 05:43:24PM +0000, Ryan Harkin wrote:
On 1 March 2016 at 17:41, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 1 March 2016 at 18:26, Ryan Harkin ryan.harkin@linaro.org wrote:
These simple fixes get the Versatile Express TC2 board booting properly and restore PL180 functionalily.
[PATCH 1/3] ArmPlatformPkg/PL180MciDxe: fix Depex for TC2 [PATCH 2/3] ArmPlatformPkg/PL180MciDxe: warn on probe fail [PATCH 3/3] ArmPlatformPkg/PL180MciDxe: don't check ID_REG3
Looks fine to me
Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org
Thanks!
I've pushed them to my tree to make applying easier should Leif wish to cherry-pick:
https://git.linaro.org/landing-teams/working/arm/edk2.git/shortlog/refs/tags...
Many thanks. Reviewed-by: Leif Lindholm leif.lindholm@linaro.org Now pushed. (I wrapped a couple of lines in commit message of 1.)
/ Leif
On 1 March 2016 at 18:08, Leif Lindholm leif.lindholm@linaro.org wrote:
On Tue, Mar 01, 2016 at 05:43:24PM +0000, Ryan Harkin wrote:
On 1 March 2016 at 17:41, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 1 March 2016 at 18:26, Ryan Harkin ryan.harkin@linaro.org wrote:
These simple fixes get the Versatile Express TC2 board booting properly and restore PL180 functionalily.
[PATCH 1/3] ArmPlatformPkg/PL180MciDxe: fix Depex for TC2 [PATCH 2/3] ArmPlatformPkg/PL180MciDxe: warn on probe fail [PATCH 3/3] ArmPlatformPkg/PL180MciDxe: don't check ID_REG3
Looks fine to me
Reviewed-by: Ard Biesheuvel ard.biesheuvel@linaro.org
Thanks!
I've pushed them to my tree to make applying easier should Leif wish to cherry-pick:
https://git.linaro.org/landing-teams/working/arm/edk2.git/shortlog/refs/tags...
Many thanks. Reviewed-by: Leif Lindholm leif.lindholm@linaro.org
Great, thanks Leif.
Now pushed. (I wrapped a couple of lines in commit message of 1.)
Ooops, sorry about that.