From 2bdfb11df9ca0ea0a136e39baac3548b295732b9 Mon Sep 17 00:00:00 2001 From: Daniil Egranov Date: Mon, 23 Jan 2017 20:01:06 -0600 Subject: [PATCH] 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 Tested-by: Ryan Harkin Reviewed-by: Leif Lindholm --- .../ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c index 47ff5871e3..f13c49559b 100644 --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c @@ -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); - Status = ArmJunoSetNicMacAddress (); - ASSERT_EFI_ERROR (Status); + GetJunoRevision (JunoRevision); + + if (JunoRevision != JUNO_REVISION_R0) { + Status = ArmJunoSetNicMacAddress (); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n")); + } + } } STATIC