aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2016-08-18 18:01:47 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2016-08-18 18:02:36 +0100
commit222464334a9cb7aa626c61d59b621b4362cb5268 (patch)
treef977d51709be035b424aaabb92d688db97ee8f31
parent3875eb32febd4c301896a3b9507d8d5af791ede2 (diff)
downloadOpenPlatformPkg-yukon.tar.gz
Marvell Yukon: drop Juno specific requirementsyukon
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rw-r--r--Drivers/Net/MarvellYukonDxe/DeviceConfig.c336
-rw-r--r--Drivers/Net/MarvellYukonDxe/DeviceConfig.h98
-rw-r--r--Drivers/Net/MarvellYukonDxe/DriverBinding.c22
-rw-r--r--Drivers/Net/MarvellYukonDxe/MarvellYukon.h1
-rw-r--r--Drivers/Net/MarvellYukonDxe/MarvellYukonDxe.inf32
-rw-r--r--Drivers/Net/MarvellYukonDxe/if_msk.c19
6 files changed, 15 insertions, 493 deletions
diff --git a/Drivers/Net/MarvellYukonDxe/DeviceConfig.c b/Drivers/Net/MarvellYukonDxe/DeviceConfig.c
deleted file mode 100644
index a56399b..0000000
--- a/Drivers/Net/MarvellYukonDxe/DeviceConfig.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/** @file
-*
-* Copyright (c) 2016, 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
-* which accompanies this distribution. The full text of the license may be found at
-* http://opensource.org/licenses/bsd-license.php
-*
-* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-*
-**/
-
-#include <Protocol/PciIo.h>
-#include <IndustryStandard/Pci.h>
-#include <Library/IoLib.h>
-#include "MarvellYukon.h"
-#include "miivar.h"
-#include "if_media.h"
-#include "if_mskreg.h"
-#include "if_msk.h"
-#include "DeviceConfig.h"
-
-/**
- Initialize device configuration protocol.
-
- @param DeviceConfigProtocol A pointer to the protocol structure.
-
- @retval EFI_SUCCESS Protocol initialized successfully.
-**/
-
-EFI_STATUS
-EFIAPI
-InitializeDeviceConfigProtocol (
- IN OUT EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *DeviceConfigProtocol
- )
-{
- DeviceConfigProtocol->Revision = EFI_EMBEDDED_DEVICE_CONFIG_REVISION;
- DeviceConfigProtocol->Supported = DeviceConfigSupported;
- DeviceConfigProtocol->Get = DeviceConfigGet;
- DeviceConfigProtocol->Set = DeviceConfigSet;
-
- return RETURN_SUCCESS;
-}
-
-/**
- This function reads or update Marvell Yukon MAC address.
-
- @param Controller Device handle.
- @param ReadMacAddress If flags set to TRUE - read MAC address, otherwise
- write new MAC address value.
- @param MacAddress Pointer to MAC address buffer.
-
- @retval MacAddress Device MAC address.
- @retval EFI_SUCCESS Configuration data is available.
- @retval EFI_UNSUPPORTED Device does not support specified configuration.
- @retval EFI_DEVICE_ERROR Device configuration read error.
-
-**/
-EFI_STATUS
-EFIAPI
-ConfigMACAddress (
- IN EFI_HANDLE Controller,
- IN BOOLEAN ReadMacAddress,
- IN OUT EFI_MAC_ADDRESS *MacAddress
- )
-{
- EFI_STATUS Status;
- UINT32 PciRegBase;
- UINT64 OldPciAttributes;
- UINT64 AttrSupports;
- UINT8 *PciBarAttributes;
- UINTN AddrIndex;
- EFI_PCI_IO_PROTOCOL *PciIo;
-
- if (MacAddress == NULL) {
- DEBUG ((EFI_D_ERROR, "Marvell Yukon: ConfigMACAddress() failed with Status = %r\n", EFI_INVALID_PARAMETER));
- return EFI_INVALID_PARAMETER;
- }
-
- Status = gBS->OpenProtocol (
- Controller,
- &gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
- NULL,
- NULL,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL);
-
- if (EFI_ERROR (Status)) {
- return EFI_DEVICE_ERROR;
- }
-
- Status = mskc_probe (PciIo);
-
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Status = PciIo->Attributes (PciIo,
- EfiPciIoAttributeOperationGet, 0,
- &OldPciAttributes);
- if (!EFI_ERROR (Status)) {
- Status = PciIo->Attributes (PciIo,
- EfiPciIoAttributeOperationSupported, 0,
- &AttrSupports);
- if (!EFI_ERROR (Status)) {
- AttrSupports &= EFI_PCI_DEVICE_ENABLE;
- Status = PciIo->Attributes ( PciIo,
- EfiPciIoAttributeOperationEnable,
- AttrSupports, NULL );
- if(!EFI_ERROR (Status)) {
- Status = PciIo->GetBarAttributes (PciIo, 0, &AttrSupports, (VOID**)&PciBarAttributes);
-
- if (!EFI_ERROR (Status) &&
- (((EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)PciBarAttributes)->Desc == ACPI_ADDRESS_SPACE_DESCRIPTOR)) {
- if (((EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)PciBarAttributes)->ResType == ACPI_ADDRESS_SPACE_TYPE_MEM) {
- if (!(((EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)PciBarAttributes)->SpecificFlag & ACPI_SPECFLAG_PREFETCHABLE)) {
-
- PciRegBase = ((EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *)PciBarAttributes)->AddrRangeMin;
-
- Status = EFI_SUCCESS;
-
- if (ReadMacAddress) {
- // Read MAC address
- for (AddrIndex = 0; AddrIndex < NET_ETHER_ADDR_LEN; AddrIndex++) {
- MacAddress->Addr[NET_ETHER_ADDR_LEN - AddrIndex - 1] = MmioRead8 (PciRegBase + B2_MAC_1 + AddrIndex);
- }
- } else {
- // Clear Software Reset
- MmioWrite16 (PciRegBase + B0_CTST, CS_RST_CLR);
-
- // Set MAC Address
- MmioWrite8 (PciRegBase + B2_TST_CTRL1, TST_CFG_WRITE_ON);
- for (AddrIndex = 0; AddrIndex < NET_ETHER_ADDR_LEN; AddrIndex++) {
- MmioWrite8 (PciRegBase + B2_MAC_1 + AddrIndex, MacAddress->Addr[NET_ETHER_ADDR_LEN - AddrIndex - 1]);
- }
- MmioWrite8 (PciRegBase + B2_TST_CTRL1, TST_CFG_WRITE_OFF);
-
- // Soft reset
- MmioWrite16 (PciRegBase + B0_CTST, CS_RST_SET);
- MmioWrite16 (PciRegBase + B0_CTST, CS_RST_CLR);
- }
- }
- }
- }
- }
-
- PciIo->Attributes (PciIo,
- EfiPciIoAttributeOperationSet, OldPciAttributes,
- NULL);
- }
- }
-
- return Status;
-}
-/**
- This function provides Marvell Yukon configuration support status.
-
- @param This Instance pointer for this protocol
-
- @retval Buffer Array of configuration records.
- @retval RecordCount Number of configuration records.
- @retval EFI_SUCCESS Device supports external configuration.
- @retval EFI_UNSUPPORTED Device does not support external configuration.
- @retval EFI_DEVICE_ERROR Device configuration read error.
-**/
-EFI_STATUS
-EFIAPI
-DeviceConfigSupported (
- IN EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *This,
- OUT EFI_DEVICE_CONFIGURATION_RECORD **Buffer,
- OUT UINTN *RecordCount
- )
-{
- EFI_STATUS Status;
- EFI_PCI_IO_PROTOCOL *PciIo;
- UINTN HandleCount;
- EFI_HANDLE *HandleBuffer;
- UINTN HIndex;
- UINTN RIndex;
- EFI_HANDLE *ConfigHandles;
-
- *Buffer = NULL;
- *RecordCount = 0;
-
- // Query for all devices supporting PCI IO protocol
- Status = gBS->LocateHandleBuffer (
- ByProtocol,
- &gEfiPciIoProtocolGuid,
- NULL,
- &HandleCount,
- &HandleBuffer
- );
-
- if (EFI_ERROR (Status)) {
- return EFI_UNSUPPORTED;
- }
-
- Status = gBS->AllocatePool (EfiBootServicesData,
- sizeof (EFI_HANDLE) * HandleCount,
- (VOID**) &ConfigHandles);
- if (EFI_ERROR (Status)) {
- gBS->FreePool(HandleBuffer);
- return Status;
- }
-
- gBS->SetMem (ConfigHandles, sizeof (EFI_HANDLE) * HandleCount, 0);
-
- // Loop through all device handles and probe for the Marvel Yukon
- for (HIndex = 0; HIndex < HandleCount; ++HIndex) {
-
- Status = gBS->OpenProtocol (
- HandleBuffer[HIndex],
- &gEfiPciIoProtocolGuid,
- (VOID **) &PciIo,
- NULL,
- NULL,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL);
-
- if (!EFI_ERROR (Status)) {
- Status = mskc_probe (PciIo);
- if (EFI_ERROR (Status)) {
- continue;
- }
- ConfigHandles[*RecordCount] = HandleBuffer[HIndex];
- (*RecordCount)++;
- }
- }
-
- Status = EFI_SUCCESS;
-
- if (*RecordCount != 0) {
- Status = gBS->AllocatePool (EfiBootServicesData,
- sizeof (EFI_DEVICE_CONFIGURATION_RECORD) * (*RecordCount),
- (VOID**) &(*Buffer));
- if (!EFI_ERROR (Status)) {
- gBS->SetMem (Buffer,
- sizeof (EFI_DEVICE_CONFIGURATION_RECORD) * (*RecordCount),
- 0);
- for (RIndex = 0; RIndex < *RecordCount; ++RIndex) {
- (*Buffer)[RIndex].Controller = ConfigHandles[RIndex];
- (*Buffer)[RIndex].SupportedConfigs = 0;
- (*Buffer)[RIndex].ConfigList[(*Buffer)[RIndex].SupportedConfigs].Type
- = EfiConfigMacAddress;
- (*Buffer)[RIndex].ConfigList[(*Buffer)[RIndex].SupportedConfigs].Writable
- = TRUE;
- (*Buffer)[RIndex].SupportedConfigs++;
- }
- }
- } else {
- Status = EFI_UNSUPPORTED;
- }
-
- gBS->FreePool(HandleBuffer);
- gBS->FreePool(ConfigHandles);
-
- return Status;
-}
-
-/**
- This function returns Marvell Yukon device configuration.
-
- @param This Instance pointer for this protocol
- @param Controller Handle of device to get a configuration.
- @param ConfigType Configuration type to update.
-
- @retval Buffer Configuration data.
- @retval EFI_SUCCESS Configuration data is available.
- @retval EFI_UNSUPPORTED Device does not support specified configuration.
- @retval EFI_DEVICE_ERROR Device configuration read error.
-
-**/
-EFI_STATUS
-EFIAPI
-DeviceConfigGet (
- IN EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_CONFIGURATION_TYPE ConfigType,
- OUT VOID **Buffer
- )
-{
- EFI_MAC_ADDRESS *MacAddress;
- EFI_STATUS Status;
-
- Status = EFI_UNSUPPORTED;
-
- if (ConfigType == EfiConfigMacAddress) {
- Status = gBS->AllocatePool (EfiBootServicesData,
- sizeof (EFI_MAC_ADDRESS),
- (VOID**) &MacAddress);
- if (!EFI_ERROR (Status)) {
- gBS->SetMem (MacAddress, sizeof (EFI_MAC_ADDRESS), 0);
- Status = ConfigMACAddress (Controller, TRUE, MacAddress);
- if (!EFI_ERROR (Status)) {
- *Buffer = MacAddress;
- }
- }
- }
-
- return Status;
-}
-
-/**
- This function sets Marvell Yukon configuration.
-
- @param This Instance pointer for this protocol
- @param Controller Handle of device to configure.
- @param ConfigType Configuration type.
- @param Buffer Configuration data.
-
- @retval EFI_SUCCESS Device configured successfully.
- @retval EFI_UNSUPPORTED Device does not support specified configuration or
- device configuration is read only.
- @retval EFI_DEVICE_ERROR Device configuration failed.
-
-**/
-EFI_STATUS
-EFIAPI
-DeviceConfigSet (
- IN EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_CONFIGURATION_TYPE ConfigType,
- IN VOID *Buffer
- )
-{
- EFI_STATUS Status;
-
- Status = EFI_UNSUPPORTED;
-
- if (ConfigType == EfiConfigMacAddress) {
- Status = ConfigMACAddress (Controller, FALSE, Buffer);
- }
-
- return Status;
-}
diff --git a/Drivers/Net/MarvellYukonDxe/DeviceConfig.h b/Drivers/Net/MarvellYukonDxe/DeviceConfig.h
deleted file mode 100644
index 67ce169..0000000
--- a/Drivers/Net/MarvellYukonDxe/DeviceConfig.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/** @file
-*
-* Copyright (c) 2016, 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
-* which accompanies this distribution. The full text of the license may be found at
-* http://opensource.org/licenses/bsd-license.php
-*
-* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-*
-**/
-
-#ifndef __DEVICE_CONFIG_H__
-#define __DEVICE_CONFIG_H__
-
-#include <Uefi.h>
-
-/**
- Initialize device configuration protocol.
-
- @param DeviceConfigProtocol A pointer to the protocol structure.
-
- @retval EFI_SUCCESS Protocol initialized successfully.
-**/
-
-EFI_STATUS
-EFIAPI
-InitializeDeviceConfigProtocol (
- IN OUT EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *DeviceConfigProtocol
- );
-
-/**
- This function provides Marvell Yukon configuration support status.
-
- @param This Instance pointer for this protocol
-
- @retval Buffer Array of configuration records.
- @retval RecordCount Number of configuration records.
- @retval EFI_SUCCESS Device supports external configuration.
- @retval EFI_UNSUPPORTED Device does not support external configuration.
- @retval EFI_DEVICE_ERROR Device configuration read error.
-**/
-EFI_STATUS
-EFIAPI
-DeviceConfigSupported (
- IN EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *This,
- OUT EFI_DEVICE_CONFIGURATION_RECORD **Buffer,
- OUT UINTN *RecordCount
- );
-
-/**
- This function returns Marvell Yukon device configuration.
-
- @param This Instance pointer for this protocol
- @param Controller Handle of device to get a configuration.
- @param ConfigType Configuration type to update.
-
- @retval Buffer Configuration data.
- @retval EFI_SUCCESS Configuration data is available.
- @retval EFI_UNSUPPORTED Device does not support specified configuration.
- @retval EFI_DEVICE_ERROR Device configuration read error.
-
-**/
-EFI_STATUS
-EFIAPI
-DeviceConfigGet (
- IN EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_CONFIGURATION_TYPE ConfigType,
- OUT VOID **Buffer
- );
-
-/**
- This function sets Marvell Yukon configuration.
-
- @param This Instance pointer for this protocol
- @param Controller Handle of device to configure.
- @param ConfigType Configuration type.
- @param Buffer Configuration data.
-
- @retval EFI_SUCCESS Device configured successfully.
- @retval EFI_UNSUPPORTED Device does not support specified configuration or
- device configuration is read only.
- @retval EFI_DEVICE_ERROR Device configuration failed.
-
-**/
-EFI_STATUS
-EFIAPI
-DeviceConfigSet (
- IN EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *This,
- IN EFI_HANDLE Controller,
- IN EFI_DEVICE_CONFIGURATION_TYPE ConfigType,
- IN VOID *Buffer
- );
-
-#endif // __DEVICE_CONFIG_H__
diff --git a/Drivers/Net/MarvellYukonDxe/DriverBinding.c b/Drivers/Net/MarvellYukonDxe/DriverBinding.c
index d02b55f..95068fa 100644
--- a/Drivers/Net/MarvellYukonDxe/DriverBinding.c
+++ b/Drivers/Net/MarvellYukonDxe/DriverBinding.c
@@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Library/DevicePathLib.h>
#include "MarvellYukon.h"
#include "if_msk.h"
-#include "DeviceConfig.h"
/**
Test to see if this driver supports ControllerHandle. This service
@@ -468,8 +467,6 @@ InitializeMarvellYukonDriver (
IN EFI_SYSTEM_TABLE *SystemTable
)
{
- EFI_HANDLE ControllerHandle;
- EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL *CfgProtocol;
EFI_STATUS Status;
DEBUG ((EFI_D_NET, "Marvell Yukon: InitializeMarvellYukonDriver()\n"));
@@ -488,24 +485,7 @@ InitializeMarvellYukonDriver (
&gSimpleNetworkComponentName2
);
- if (!EFI_ERROR (Status)) {
- ControllerHandle = NULL;
- Status = gBS->AllocatePool (EfiBootServicesData,
- sizeof (EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL),
- (VOID**) &CfgProtocol);
- if(!EFI_ERROR (Status)) {
- gBS->SetMem (CfgProtocol, sizeof (EFI_EMBEDDED_DEVICE_CONFIG_PROTOCOL), 0);
- InitializeDeviceConfigProtocol(CfgProtocol);
- Status = gBS->InstallProtocolInterface (
- &ControllerHandle,
- &gEfiEmbeddedDeviceConfigProtocolGuid,
- EFI_NATIVE_INTERFACE,
- CfgProtocol
- );
- } else {
- DEBUG ((EFI_D_ERROR, "Marvell Yukon: InitializeMarvellYukonDriver(): Device configuration protocol init failed\n"));
- }
- } else {
+ if (EFI_ERROR (Status)) {
DEBUG ((EFI_D_ERROR, "Marvell Yukon: InitializeMarvellYukonDriver(): Driver binding failed\n"));
}
diff --git a/Drivers/Net/MarvellYukonDxe/MarvellYukon.h b/Drivers/Net/MarvellYukonDxe/MarvellYukon.h
index 6d03811..e6110cb 100644
--- a/Drivers/Net/MarvellYukonDxe/MarvellYukon.h
+++ b/Drivers/Net/MarvellYukonDxe/MarvellYukon.h
@@ -21,7 +21,6 @@
#include <Protocol/SimpleNetwork.h>
#include <Protocol/PciIo.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/EmbeddedDeviceConfig.h>
#include <Guid/EventGroup.h>
diff --git a/Drivers/Net/MarvellYukonDxe/MarvellYukonDxe.inf b/Drivers/Net/MarvellYukonDxe/MarvellYukonDxe.inf
index 2c44f90..42e1f93 100644
--- a/Drivers/Net/MarvellYukonDxe/MarvellYukonDxe.inf
+++ b/Drivers/Net/MarvellYukonDxe/MarvellYukonDxe.inf
@@ -35,42 +35,32 @@
ComponentName.c
e1000phy.c
if_msk.c
- DeviceConfig.c
-
[Packages]
- EmbeddedPkg/EmbeddedPkg.dec
- NetworkPkg/NetworkPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
+ NetworkPkg/NetworkPkg.dec
OpenPlatformPkg/Drivers/Net/MarvellYukonDxe/MarvellYukonDxe.dec
[LibraryClasses]
- UefiLib
BaseLib
- UefiBootServicesTableLib
- UefiDriverEntryPoint
BaseMemoryLib
- MemoryAllocationLib
- IoLib
DebugLib
- TimerLib
- NetLib
DevicePathLib
-
-[Pcd]
- gEmbeddedTokenSpaceGuid.PcdYukonMacAddress
-
-#[Guids]
-# gEfiEventExitBootServicesGuid ## CONSUMES
+ IoLib
+ MemoryAllocationLib
+ NetLib
+ TimerLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiLib
[Protocols]
- gEfiPciIoProtocolGuid
- gEfiSimpleNetworkProtocolGuid
+ gEfiDevicePathProtocolGuid
gEfiMetronomeArchProtocolGuid
+ gEfiPciIoProtocolGuid
gEfiPxeBaseCodeProtocolGuid
- gEfiDevicePathProtocolGuid
- gEfiEmbeddedDeviceConfigProtocolGuid
+ gEfiSimpleNetworkProtocolGuid
[Depex]
TRUE
diff --git a/Drivers/Net/MarvellYukonDxe/if_msk.c b/Drivers/Net/MarvellYukonDxe/if_msk.c
index bf3b9a5..00be23e 100644
--- a/Drivers/Net/MarvellYukonDxe/if_msk.c
+++ b/Drivers/Net/MarvellYukonDxe/if_msk.c
@@ -1134,8 +1134,6 @@ mskc_attach (
struct msk_mii_data *mmd;
UINT64 Supports;
UINT8 *PciBarResources;
- UINT32 MacAddrL;
- UINT32 MacAddrH;
EFI_STATUS Status;
struct msk_if_softc *ScIf;
@@ -1222,20 +1220,9 @@ mskc_attach (
mSoftc->msk_process_limit = MSK_PROC_DEFAULT;
mSoftc->msk_int_holdoff = MSK_INT_HOLDOFF_DEFAULT;
- // Set the MAC Address if needed
- if (PcdGet64 (PcdYukonMacAddress) != 0)
- {
- MacAddrH = (UINT32) (((UINT64) PcdGet64 (PcdYukonMacAddress)));
- MacAddrL = (UINT32) (((UINT64) PcdGet64 (PcdYukonMacAddress) >> 32) & 0xFFFF);
-
- CSR_WRITE_1 (mSoftc, B2_TST_CTRL1, TST_CFG_WRITE_ON);
- CSR_WRITE_4 (mSoftc, B2_MAC_1, MacAddrH);
- CSR_WRITE_4 (mSoftc, B2_MAC_1+4, MacAddrL);
- CSR_WRITE_1 (mSoftc, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
- } else {
- if ((CSR_READ_4 (mSoftc, B2_MAC_1) == 0) && (CSR_READ_4 (mSoftc, B2_MAC_1+4) == 0)) {
- DEBUG ((EFI_D_NET, "Marvell Yukon: MAC address is invalid (00:00:00:00:00:00)\n"));
- }
+ // Check if MAC address is valid
+ if ((CSR_READ_4 (mSoftc, B2_MAC_1) == 0) && (CSR_READ_4 (mSoftc, B2_MAC_1+4) == 0)) {
+ DEBUG ((EFI_D_NET, "Marvell Yukon: MAC address is invalid (00:00:00:00:00:00)\n"));
}
// Soft reset