From: Sami <[email protected]>

When network functionality is not required, the boot process is
impeded by redundant network timeouts. Moreover Juno is a mobile
platform so it makes sense to have an option to disable the
(ethernet) networking support.  We therefore introduce the
DISABLE_NETWORK build option.

By default ArmJunoDxe configures the MAC address. This is redundant
when networking is disabled, so the MAC Address configuration is
removed when the DISABLE_NETWORK build option is defined.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Sami Mujawar <[email protected]>
Signed-off-by: Evan Lloyd <[email protected]>
---
 ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c 
b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 
18491c7378523f365644658c270de95e711c5ac1..456e21ba47db7ec440ac1ef5554eccd5e4d2bcf9
 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2013-2015, ARM Limited. All rights reserved.
+*  Copyright (c) 2013-2017, ARM Limited. All rights reserved.
 *
 *  This program and the accompanying materials
 *  are licensed and made available under the terms and conditions of the BSD 
License
@@ -71,6 +71,7 @@ STATIC CONST EFI_PCI_ROOT_BRIDGE_DEVICE_PATH 
mPciRootComplexDevicePath = {
 
 EFI_EVENT mAcpiRegistration = NULL;
 
+#ifndef DISABLE_NETWORK
 /**
   This function reads PCI ID of the controller.
 
@@ -355,6 +356,7 @@ ArmJunoSetNicMacAddress ()
 
   return EFI_SUCCESS;
 }
+#endif
 
 /**
   Notification function of the event defined as belonging to the
@@ -395,10 +397,12 @@ OnEndOfDxe (
   Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, 
FALSE);
   ASSERT_EFI_ERROR (Status);
 
+#ifndef DISABLE_NETWORK
   Status = ArmJunoSetNicMacAddress ();
   if (EFI_ERROR (Status)) {
     DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC 
address\n"));
   }
+#endif
 }
 
 EFI_STATUS
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to