ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe: Fixed crash on Juno R0

The Marvell Yukon MAC address load supported only on Juno R1 and R2.
It disabled for Juno R0 due to PCI issues on this board.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Daniil Egranov 2017-01-23 20:01:06 -06:00 committed by Leif Lindholm
parent 26ca6f7e1e
commit 2bdfb11df9
1 changed files with 9 additions and 2 deletions

View File

@ -378,6 +378,7 @@ OnEndOfDxe (
EFI_DEVICE_PATH_PROTOCOL* PciRootComplexDevicePath;
EFI_HANDLE Handle;
EFI_STATUS Status;
UINT32 JunoRevision;
//
// PCI Root Complex initialization
@ -393,8 +394,14 @@ OnEndOfDxe (
Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, FALSE);
ASSERT_EFI_ERROR (Status);
GetJunoRevision (JunoRevision);
if (JunoRevision != JUNO_REVISION_R0) {
Status = ArmJunoSetNicMacAddress ();
ASSERT_EFI_ERROR (Status);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n"));
}
}
}
STATIC