From nobody Mon Feb 9 09:05:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53438+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53438+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579780824; cv=none; d=zohomail.com; s=zohoarc; b=keHusJvH9h4fSEjk5Kv0ITe9tgTgKFo8GQyLZ+pLltuA8Szdzgb8sqJ+09GUSuAT+EOQEegWSofaq/EdqEOMdc1sDXRqFwXFOjI9M3Ncupq2K0cEjbYqCJwkfyy7i/X6Yf/zthJrVzgagop0tff5i23txl38dFV+vc5v+Y8bweo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579780824; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=By7PJuIcr2I5rqpZpf+MbBDy79qFX2ld/2g162YZLwQ=; b=GTm3yMzZzwo94xFTJe5cItbUz+QwLJdvihhCUI6gXWxDA0ITYmYTRwcg1hcmOlHatdwj6Y3Gk/SQt53D8D8htPiIUPTaEEBeSKTrpQmLUNOXJs1Q5PBpDiqqViMVQt12nsST35mGNtv16n/p70RpZ/c1VdXPSmRqG9LZp6KWlF0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53438+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579780824094522.5133772929725; Thu, 23 Jan 2020 04:00:24 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id no5cYY1788612xwliRg6hVkS; Thu, 23 Jan 2020 04:00:23 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web12.6519.1579780821998164778 for ; Thu, 23 Jan 2020 04:00:22 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id y17so2775918wrh.5 for ; Thu, 23 Jan 2020 04:00:21 -0800 (PST) X-Gm-Message-State: vVeuhKjhfAzA9fqUDxX8m5tAx1787277AA= X-Google-Smtp-Source: APXvYqwLAZOhcaAsoGZdHITFzXk8x+ynEU7EPlhEDK3eP3XYFAd8Ml7XwFER5ZEvV9Kj+IEdJCYMFA== X-Received: by 2002:a5d:5263:: with SMTP id l3mr16959845wrc.405.1579780820180; Thu, 23 Jan 2020 04:00:20 -0800 (PST) X-Received: from localhost.localdomain ([84.203.95.128]) by smtp.gmail.com with ESMTPSA id t1sm2492281wma.43.2020.01.23.04.00.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jan 2020 04:00:19 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, lintonrjeremy@gmail.com Subject: [edk2-devel] [edk2-platforms][PATCH 1/3] Silicon/Broadcom/Net: Add Genet stub driver to setup MAC Date: Thu, 23 Jan 2020 12:00:03 +0000 Message-Id: <20200123120007.4784-2-pete@akeo.ie> In-Reply-To: <20200123120007.4784-1-pete@akeo.ie> References: <20200123120007.4784-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1579780823; bh=Oifou0d3Vj1pDL419LR7h92EgsZ3NCdsyO0wN01v1WE=; h=Cc:Date:From:Reply-To:Subject:To; b=rsMEzuMrsNXMZuEN+k+N9Yx3h44Owa+V4sZeidbfuGv3NhtLu1x0rJ5n8R73d5FZQHG Dn3NGbBmSnj2rIVCTZHv8Y0XPsWS48+W/Krr6y+rjI1u0dMUt3Hn72TlkhxJIGejcMJqQ 1czBIWE5WmkiwhwJZXNhpqgv9/HYtFpdkwg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Jeremy Linton Add a stub for the Broadcom Genet network interface, that is used by the Raspberry Pi 4 (and that may be used by other platforms). For the time being, the stub only performs UMAC init, using a MAC address PCD, as, even without a working network interface in UEFI environment, it is desirable if the hardware can describe itself for booting in an ACPI environment, rather than pass parameters via DSDT/DSD . Signed-off-by: Pete Batard --- Silicon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf | 40 +++++++ Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c | 114 +++++++++++= +++++++++ Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h | 20 ++++ Silicon/Broadcom/Drivers/Net/BcmNet.dec | 22 ++++ 4 files changed, 196 insertions(+) diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf b/Sil= icon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf new file mode 100644 index 000000000000..9e9301608f24 --- /dev/null +++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf @@ -0,0 +1,40 @@ +## @file +# +# Copyright (c) 2020, Jeremy Linton All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D BcmGenetDxe + FILE_GUID =3D e2b1eaf3-50b7-4ae1-b79e-ec8020cb57ac + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 0.1 + ENTRY_POINT =3D GenetEntryPoint + +[Sources] + Genet.c + +[Packages] + ArmPkg/ArmPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Silicon/Broadcom/Drivers/Net/BcmNet.dec + +[LibraryClasses] + ArmLib + BaseLib + IoLib + UefiDriverEntryPoint + UefiLib + +[FixedPcd] + gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress + +[Pcd] + gBcmNetTokenSpaceGuid.PcdBcmGenetMacAddress + +[Depex] + TRUE diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c b/Silicon/Bro= adcom/Drivers/Net/BcmGenetDxe/Genet.c new file mode 100644 index 000000000000..d135d889cc1f --- /dev/null +++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.c @@ -0,0 +1,114 @@ +/** @file + + Copyright (c) 2020, Jeremy Linton All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + This driver acts like a stub to set the Broadcom + Genet MAC address, until the actual network driver + is in place. + +**/ + +#include +#include +#include +#include +#include +#include + +#include +#include + +STATIC +VOID +RMWRegister ( + UINT32 Offset, + UINT32 Mask, + UINT32 In + ) +{ + EFI_PHYSICAL_ADDRESS Addr; + UINT32 Data; + UINT32 Shift; + + Addr =3D GENET_BASE_ADDRESS + Offset; + Data =3D 0; + Shift =3D 1; + if (In) { + while (!(Mask & Shift)) + Shift <<=3D 1; + Data =3D (MmioRead32 (Addr) & ~Mask) | ((In * Shift) & Mask); + } else { + Data =3D MmioRead32 (Addr) & ~Mask; + } + + MmioWrite32 (Addr, Data); + + ArmDataMemoryBarrier (); +} + +STATIC +VOID +WdRegister ( + UINT32 Offset, + UINT32 In + ) +{ + EFI_PHYSICAL_ADDRESS Base =3D GENET_BASE_ADDRESS; + + MmioWrite32 (Base + Offset, In); + + ArmDataMemoryBarrier (); +} + +STATIC +VOID +SetMacAddress ( + UINT8* MacAddr +) +{ + // Bring the UMAC out of reset + RMWRegister (GENET_SYS_RBUF_FLUSH_CTRL, 0x2, 1); + gBS->Stall (10); + RMWRegister (GENET_SYS_RBUF_FLUSH_CTRL, 0x2, 0); + + // Update the MAC + DEBUG ((DEBUG_INFO, "Setting MAC address %02X:%02X:%02X:%02X:%02X:%02X\n= ", + MacAddr[0], MacAddr[1], MacAddr[2], MacAddr[3], MacAddr[4], MacAddr[5]= )); + + WdRegister (GENET_UMAC_MAC0, (MacAddr[0] << 24) | (MacAddr[1] << 16) | + (MacAddr[2] << 8) | MacAddr[3]); + WdRegister (GENET_UMAC_MAC1, (MacAddr[4] << 8) | MacAddr[5]); + +} + +/** + The entry point of Genet UEFI Driver. + + @param ImageHandle The image handle of the UEFI Driver. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The Driver or UEFI Driver exited norm= ally. + @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than + SystemTable->Hdr.Revision. + +**/ +EFI_STATUS +EFIAPI +GenetEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + UINT64 MacAddr; + + // Read the MAC address + MacAddr =3D PcdGet64 (PcdBcmGenetMacAddress); + + if (MacAddr !=3D 0) { + SetMacAddress ((UINT8*)&MacAddr); + } + + return EFI_SUCCESS; +} diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h b/Silicon/Bro= adcom/Drivers/Net/BcmGenetDxe/Genet.h new file mode 100644 index 000000000000..4a3827c0e0d1 --- /dev/null +++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h @@ -0,0 +1,20 @@ +/** @file + + Copyright (c) 2020, Pete Batard + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef BCM_GENET_H__ +#define BCM_GENET_H__ + +#include + +#define GENET_BASE_ADDRESS (FixedPcdGet64 (PcdBcmGenetRegistersAdd= ress)) + +#define GENET_SYS_RBUF_FLUSH_CTRL 0x0008 +#define GENET_UMAC_MAC0 0x080c +#define GENET_UMAC_MAC1 0x0810 + +#endif /* BCM_GENET_H__ */ diff --git a/Silicon/Broadcom/Drivers/Net/BcmNet.dec b/Silicon/Broadcom/Dri= vers/Net/BcmNet.dec new file mode 100644 index 000000000000..d80aac27ed9e --- /dev/null +++ b/Silicon/Broadcom/Drivers/Net/BcmNet.dec @@ -0,0 +1,22 @@ +## @file +# +# Copyright (c) 2020, Pete Batard +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + DEC_SPECIFICATION =3D 0x0001001A + PACKAGE_NAME =3D BcmNetPkg + PACKAGE_GUID =3D 34E19823-D23A-41AB-9C09-ED1225B32DFF + PACKAGE_VERSION =3D 1.0 + +[Guids] + gBcmNetTokenSpaceGuid =3D {0x12b97d70, 0x9149, 0x4c2f, {0x82, 0xd5, 0xad= , 0xa9, 0x1e, 0x92, 0x75, 0xa1}} + +[PcdsFixedAtBuild] + gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress|0x0|UINT32|0x00000001 + +[PcdsDynamic] + gBcmNetTokenSpaceGuid.PcdBcmGenetMacAddress|0x0|UINT64|0x00000002 --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53438): https://edk2.groups.io/g/devel/message/53438 Mute This Topic: https://groups.io/mt/70045879/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:05:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53439+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53439+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579780825; cv=none; d=zohomail.com; s=zohoarc; b=MUspNcZM6L5+8HcohqhzKIHVOhgjqRHNqM69mVS5LMCXoapp9wIyYLLPE6JxkRhpAxj9jqK5Nk5PjxD6e+O9cuiB65ApZfoMJs52k5Q97m6v4sY6KoLX/eB5gLqLU9b4zrfwa43mJWrscOC0w88vsE8VZJaM7ur5tX5grkREmVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579780825; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Y56DoZHlsw7Csw5SCuxVyaDe+CvUoJJZGoaIS1mgL/Q=; b=U89aHuLhNUhtIr0EdyMjaNanP8za+kzRWsTfvL1DfCmWu9F9Lg+9hRk6gt20mlkNCSLuu4pF1Y/mC+zVd06yQq4FI5LXSZSyKXVEvs993jolPCUmLjIl01aStCwkCpyqgn/zDbH61yPxVfkuPhpfE2MlSZdcOrPJmSAdJGtjjFc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53439+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579780825189798.2445037033212; Thu, 23 Jan 2020 04:00:25 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id h6SmYY1788612xrqzxsDM1Il; Thu, 23 Jan 2020 04:00:24 -0800 X-Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web09.6560.1579780823129833984 for ; Thu, 23 Jan 2020 04:00:23 -0800 X-Received: by mail-wm1-f68.google.com with SMTP id b19so2266139wmj.4 for ; Thu, 23 Jan 2020 04:00:22 -0800 (PST) X-Gm-Message-State: SaPwm4mBLhZBLjfN4iTvQV67x1787277AA= X-Google-Smtp-Source: APXvYqyjarzOKvyJOrBSUIep1i3GrFbNin2ZxF9CqUeCNC6VYAVw8QmU2xhYCbevxs6Sb29m7juWhQ== X-Received: by 2002:a1c:6588:: with SMTP id z130mr3853873wmb.0.1579780821506; Thu, 23 Jan 2020 04:00:21 -0800 (PST) X-Received: from localhost.localdomain ([84.203.95.128]) by smtp.gmail.com with ESMTPSA id t1sm2492281wma.43.2020.01.23.04.00.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jan 2020 04:00:20 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, lintonrjeremy@gmail.com Subject: [edk2-devel] [edk2-platforms][PATCH 2/3] Platform/RPi: Add PlatformPcdLib to set the Genet MAC address Date: Thu, 23 Jan 2020 12:00:04 +0000 Message-Id: <20200123120007.4784-3-pete@akeo.ie> In-Reply-To: <20200123120007.4784-1-pete@akeo.ie> References: <20200123120007.4784-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1579780824; bh=fJlWroX3757fPjMv9lKLOIbCPhEDL8gjeCi+i76n0ig=; h=Cc:Date:From:Reply-To:Subject:To; b=d6DzcEPwee7s6A7eBs5z/ucPpoFYhp0raGAn81qvbLykRO+HYy7+p3vleIZaCD5ocOL pfNscMGJzTnQbT1Uy1UNlFVCX5u/rynmrme42v1q8hc1CW2TnBIzxsr7bhP2Ar/oO0Jxr 4ZoZS9AJAyFmuUnUX5oaU4ZU5SgzoZwi1Bs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The Genet driver stub used by the Raspberry Pi 4 platform is designed to set the MAC address according to a PCD. To be able to set that PCD at runtime, by using the Raspberry Pi firmware interface, that has a dedicated call to retrieve the MAC address, and satisfy driver dependencies in a generic manner, we create a new PlatformPcdLib that can be referenced by the Genet driver, to set the MAC PCD before use there. While it is currently only tailored around MAC PCD population for Genet, we do expect this PCD library to be extended in the future, to provide additional PCD facilities for other drivers. Signed-off-by: Pete Batard --- Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c | 61 ++++++= ++++++++++++++ Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf | 44 ++++++= ++++++++ 2 files changed, 105 insertions(+) diff --git a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c b= /Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c new file mode 100644 index 000000000000..78f3679e2e48 --- /dev/null +++ b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c @@ -0,0 +1,61 @@ +/** @file + * + * Copyright (c) 2020, Pete Batard + * + * SPDX-License-Identifier: BSD-2-Clause-Patent + * + **/ + +#include +#include +#include +#include +#include +#include +#include + +EFI_STATUS +EFIAPI +PlatformPcdLibConstructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + + // + // If Genet is in use and a MAC address PCD has not been set, do it here. + // +#if (FixedPcdGet64 (PcdBcmGenetRegistersAddress) !=3D 0) + EFI_STATUS Status; + UINT64 MacAddr; + RASPBERRY_PI_FIRMWARE_PROTOCOL *mFwProtocol; + + if (PcdGet64 (PcdBcmGenetMacAddress) =3D=3D 0) { + Status =3D gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NUL= L, + (VOID**)&mFwProtocol); + ASSERT_EFI_ERROR(Status); + + // + // Get the MAC address from the firmware + // + Status =3D mFwProtocol->GetMacAddress ((UINT8*) &MacAddr); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "%a: failed to retrieve MAC address\n", __FUNCTI= ON__)); + } else { + PcdSet64 (PcdBcmGenetMacAddress, MacAddr); + } + } +#endif + + return EFI_SUCCESS; +} + +EFI_STATUS +EFIAPI +PlatformPcdLibDestructor ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + return EFI_SUCCESS; +} diff --git a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf= b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf new file mode 100644 index 000000000000..a564ddfbb2a3 --- /dev/null +++ b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf @@ -0,0 +1,44 @@ +#/** @file +# +# Copyright (c) 2020, Pete Batard +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +#**/ + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D PlatformPcdLib + FILE_GUID =3D 3B8409D7-D3C7-4006-823B-BFB184435363 + MODULE_TYPE =3D DXE_DRIVER + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D NULL|DXE_DRIVER UEFI_APPLICATION + CONSTRUCTOR =3D PlatformPcdLibConstructor + DESTRUCTOR =3D PlatformPcdLibDestructor + +[Sources] + PlatformPcdLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + Platform/RaspberryPi/RaspberryPi.dec + Silicon/Broadcom/Drivers/Net/BcmNet.dec + +[LibraryClasses] + UefiLib + DebugLib + PrintLib + +[Protocols] + gRaspberryPiFirmwareProtocolGuid ## CONSUMES + +[Pcd] + gBcmNetTokenSpaceGuid.PcdBcmGenetMacAddress ## SOMETIMES_PRODUCES + +[FixedPcd] + gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress + +[Depex] + gPcdProtocolGuid AND gRaspberryPiFirmwareProtocolGuid + --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53439): https://edk2.groups.io/g/devel/message/53439 Mute This Topic: https://groups.io/mt/70045881/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:05:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53442+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53442+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579780829; cv=none; d=zohomail.com; s=zohoarc; b=PLh2O78jKX3zz+WlvN6YrzeA7DCy7mp3mEn4bEAq31BaBozItn36K7L0lf6FCPVQuzALHPDjwkQb/qJ0TU/KIhDVt/v7zJBkkJoa7Eakhu7WfiEAGet1ReTVugAvo9btELWUlWgYISME2naPbr5Jdr1npNbueQRnuFy6EIuBJSc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579780829; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=7vyOrwlvYuMiuPOwZVjJO3wz20Po8ntbht5Mq85wiJA=; b=Q6wQQhkyi9I6h1qr46rrtrV/LZUJE2TKfrjpQUXDlM/4hx+NSfQRD5nFQuip+a3YtTWeu+lAorBnyLzt9O+H+17kuAOnYUBB6T/HVyhPM/htHXdvw7cyuSU+DpR6b2TaToUn5/Sw/bUgY9zOsfq+QpEpTIYET6h9hZMNa9QUwW4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53442+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579780829907830.1328014858465; Thu, 23 Jan 2020 04:00:29 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id FP0aYY1788612xxbKXT4OT3o; Thu, 23 Jan 2020 04:00:29 -0800 X-Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by mx.groups.io with SMTP id smtpd.web11.6689.1579780827756452750 for ; Thu, 23 Jan 2020 04:00:28 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id w15so2787762wru.4 for ; Thu, 23 Jan 2020 04:00:27 -0800 (PST) X-Gm-Message-State: wCNTnTUbxItuapZmg5DWGGS2x1787277AA= X-Google-Smtp-Source: APXvYqwrq2CKvOgzRubhv3ql+0KCrmAZ9oo9pO/CTE7HFE6S89niBO01Di66dLBQUMcNv+5WiqYFxQ== X-Received: by 2002:a05:6000:118e:: with SMTP id g14mr18220450wrx.39.1579780822562; Thu, 23 Jan 2020 04:00:22 -0800 (PST) X-Received: from localhost.localdomain ([84.203.95.128]) by smtp.gmail.com with ESMTPSA id t1sm2492281wma.43.2020.01.23.04.00.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jan 2020 04:00:22 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, lintonrjeremy@gmail.com Subject: [edk2-devel] [edk2-platforms][PATCH 3/3] Platform/Rpi4: Enable Broadcom Genet stub driver Date: Thu, 23 Jan 2020 12:00:05 +0000 Message-Id: <20200123120007.4784-4-pete@akeo.ie> In-Reply-To: <20200123120007.4784-1-pete@akeo.ie> References: <20200123120007.4784-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1579780829; bh=C0d9w3Yss0yZiRkd9Rixaw9WjKIqhSt5NiMquS1Z28k=; h=Cc:Date:From:Reply-To:Subject:To; b=IZMzY720VA/BU3e+zpok+MzCOorMIEy9HbprvbBSXcBJaUMftE/B6IhDzbwYEVBPR/U XG2nkBcxz/UJWj0k37zQT/hIIlSDnXuguWfJMQPtVbNHpVfe1LWMdvszTd9tZmeplZf8p p7GzyWbSiHz9LJBpsaqZXZ+MjOX2pVQj/JM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Jeremy Linton This adds the required references to use the Genet stub driver in order to dynamically populate the MAC address for OS consumption. Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi4/RPi4.dsc | 5 +++++ Platform/RaspberryPi/RPi4/RPi4.fdf | 1 + 2 files changed, 6 insertions(+) diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index b3a114b6e0ed..bd3800c1d653 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -402,6 +402,7 @@ [PcdsFixedAtBuild.common] gRaspberryPiTokenSpaceGuid.PcdExtendedMemoryBase|0x40000000 gBcm27xxTokenSpaceGuid.PcdBcm27xxRegistersAddress|0xfc000000 gBcm283xTokenSpaceGuid.PcdBcm283xRegistersAddress|0xfe000000 + gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress|0xfd580000 =20 # PCIe specific addresses gBcm27xxTokenSpaceGuid.PcdBcm27xxPciRegBase|0xfd500000 @@ -648,6 +649,10 @@ [Components.common] # Networking stack # !include NetworkPkg/Network.dsc.inc + Silicon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf { + + NULL|Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf + } =20 # # RNG diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4= /RPi4.fdf index 2bcfdb3244f6..db393d47bcea 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -269,6 +269,7 @@ [FV.FvMain] # Networking stack # !include NetworkPkg/Network.fdf.inc + INF Silicon/Broadcom/Drivers/Net/BcmGenetDxe/BcmGenetDxe.inf =20 # # RNG --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53442): https://edk2.groups.io/g/devel/message/53442 Mute This Topic: https://groups.io/mt/70045885/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:05:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53441+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53441+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579780829; cv=none; d=zohomail.com; s=zohoarc; b=WtTGMevyoLFwDFQVWF+As13r9anCUPFzRFpZzG3HM8qRjOscvNvm0knxKhuHEyNAKlA86ALk+PkRqW5+FaigHCM1NgSvUSa+0pfwwxp0s0k+vFo0SjZc9LMKVcMC9w/XOOqGMdF9N74vi/32yKsar+LqASSjwaVq+CqOwEGcdC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579780829; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=btGmPEMEOLdL8DPD9ESj7AasWlhGze2ikE7bZKVDc1M=; b=ZQsmhPjCRjyYM3+T32ek2RTEWphrNEueKFdQey8WO0rXnGnyqOg00W4zarlhXQ53APy+7ytjlHP+vZ33ciNZbbuu1h+C8uysFfh7PNs7+gElS11R8YqNXytxB85AuPfMRaVC5hKtZbYma1QQhP7hy/mYb3eUGUQFfre/uTgQLW8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53441+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579780829256688.113325280716; Thu, 23 Jan 2020 04:00:29 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id SYI3YY1788612xn6AffzI2uh; Thu, 23 Jan 2020 04:00:28 -0800 X-Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.6688.1579780827227718077 for ; Thu, 23 Jan 2020 04:00:27 -0800 X-Received: by mail-wr1-f66.google.com with SMTP id t2so2807369wrr.1 for ; Thu, 23 Jan 2020 04:00:27 -0800 (PST) X-Gm-Message-State: XfSff1aAoUhhB3pY6N6lYqKzx1787277AA= X-Google-Smtp-Source: APXvYqyalX8WOz0A44ZFY83fY+cM7q8Xb7sENExq9IKrGqfi3Ugj5v+IsyOI2VHppVtb1SI4uL/sNg== X-Received: by 2002:a5d:528e:: with SMTP id c14mr17523776wrv.308.1579780823600; Thu, 23 Jan 2020 04:00:23 -0800 (PST) X-Received: from localhost.localdomain ([84.203.95.128]) by smtp.gmail.com with ESMTPSA id t1sm2492281wma.43.2020.01.23.04.00.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jan 2020 04:00:23 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, lintonrjeremy@gmail.com Subject: [edk2-devel] [PATCH] Platform/RPi/Genet: Add Genet stub driver to setup MAC Date: Thu, 23 Jan 2020 12:00:06 +0000 Message-Id: <20200123120007.4784-5-pete@akeo.ie> In-Reply-To: <20200123120007.4784-1-pete@akeo.ie> References: <20200123120007.4784-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1579780828; bh=C3ZoB8/I0YvaxIlyDlYE26LbM4xLdyjYmJjYi0nDzPs=; h=Cc:Date:From:Reply-To:Subject:To; b=dIbvBszpxPTEWKMEup7X2hbHeuCJOh77tC8VaDzgWbNGnS5tSNw6s2JH/Nx1jN0F112 XHBGK0oDQUNesj9anMmABVc3NOZ8Dfhz6zgmeeeT7fx49i4AoDNT4yZx1UUw/oWkeJlpT 0b/CTprTixBg2q5P1GxMDXNQK5VtP0IPrW8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Jeremy Linton The RPi4 has a 1G BCM Genet platform device. In order to assist in booting the platform in an ACPI environment, it is desirable if the hardware can describe itself rather than passing parameters via DSDT/DSD. One way to achieve this is to assure that the adapter is preprogrammed with the correct ethernet mac address as it would be if the adapter were used during the boot process. While we currently lack a fully functional uefi driver for the genet, it is fairly trivial to assure that the mac address is set. That is what this driver does. Signed-off-by: Jeremy Linton --- Platform/RaspberryPi/Drivers/Genet/Genet.c | 132 +++++++++++++++++++ Platform/RaspberryPi/Drivers/Genet/Genet.inf | 39 ++++++ 2 files changed, 171 insertions(+) create mode 100644 Platform/RaspberryPi/Drivers/Genet/Genet.c create mode 100644 Platform/RaspberryPi/Drivers/Genet/Genet.inf diff --git a/Platform/RaspberryPi/Drivers/Genet/Genet.c b/Platform/Raspberr= yPi/Drivers/Genet/Genet.c new file mode 100644 index 0000000000..c4180f1d9d --- /dev/null +++ b/Platform/RaspberryPi/Drivers/Genet/Genet.c @@ -0,0 +1,132 @@ +/** @file + + Copyright (c) 2019, Jeremy Linton All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + This driver acts like a stub to set the BCM=20 + Genet MAC address, until the actual network driver + is in place. This should allow us to retrieve the + mac address directly from the hardware in supported + OS's rather than passing it via DSDT (which isn't=20 + ideal for a number of reasons, foremost the hardware + should be self describing). + +**/ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#define GENET_BASE 0xfd580000 // len =3D 0x10000 +#define GENET_SYS_RBUF_FLUSH_CTRL 0x0008 +#define GENET_UMAC_MAC0 0x080C +#define GENET_UMAC_MAC1 0x0810 + +STATIC +VOID +RMWRegister ( + UINT32 Offset, + UINT32 Mask, + UINT32 In + ) +{ + EFI_PHYSICAL_ADDRESS Addr =3D GENET_BASE; + UINT32 Data =3D 0; + UINT32 Shift; + + Addr +=3D Offset; + Shift =3D 1; + if (In) { + while (!(Mask & Shift)) + Shift <<=3D 1; + Data =3D (MmioRead32 (Addr) & ~Mask) | ((In * Shift) & Mask); + } else { + Data =3D MmioRead32 (Addr) & ~Mask; + } + + MmioWrite32 (Addr, Data); + + ArmDataMemoryBarrier (); +} + +STATIC +VOID +WdRegister ( + UINT32 Offset, + UINT32 In + ) +{ + EFI_PHYSICAL_ADDRESS Base =3D GENET_BASE; + + MmioWrite32 (Base + Offset, In); + + ArmDataMemoryBarrier (); +} + + + +STATIC VOID +GenetMacInit (UINT8 *addr) +{ + + // bring the umac out of reset + RMWRegister (GENET_SYS_RBUF_FLUSH_CTRL, 0x2, 1); + gBS->Stall (10); + RMWRegister (GENET_SYS_RBUF_FLUSH_CTRL, 0x2, 0); + + // Update the MAC + + WdRegister(GENET_UMAC_MAC0, (addr[0] << 24) | (addr[1] << 16) | (addr[2]= << 8) | addr[3]); + WdRegister(GENET_UMAC_MAC1, (addr[4] << 8) | addr[5]); +} + +/** + The entry point of Genet UEFI Driver. + + @param ImageHandle The image handle of the UEFI Driver. + @param SystemTable A pointer to the EFI System Table. + + @retval EFI_SUCCESS The Driver or UEFI Driver exited norm= ally. + @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than + SystemTable->Hdr.Revision. + +**/ +EFI_STATUS +EFIAPI +GenetEntryPoint ( + IN EFI_HANDLE ImageHandle, + IN EFI_SYSTEM_TABLE *SystemTable + ) +{ + RASPBERRY_PI_FIRMWARE_PROTOCOL *mFwProtocol; + EFI_STATUS Status; + UINT8 MacAddr[6]; + + DEBUG ((DEBUG_ERROR, "GENET:%a(): Init\n", __FUNCTION__)); + + Status =3D gBS->LocateProtocol (&gRaspberryPiFirmwareProtocolGuid, NULL, + (VOID**)&mFwProtocol); + if (EFI_ERROR(Status)) { + DEBUG ((DEBUG_ERROR, "%a: failed to locate RPi firmware protocol\n", _= _FUNCTION__)); + return Status; + } + =20 + // Get the MAC address from the firmware + Status =3D mFwProtocol->GetMacAddress (MacAddr); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: failed to retrieve MAC address\n", __FUNCTIO= N__)); + return Status; + } + + // Write it to the hardware + GenetMacInit (MacAddr); + + return EFI_SUCCESS; +} diff --git a/Platform/RaspberryPi/Drivers/Genet/Genet.inf b/Platform/Raspbe= rryPi/Drivers/Genet/Genet.inf new file mode 100644 index 0000000000..3599e5a6e5 --- /dev/null +++ b/Platform/RaspberryPi/Drivers/Genet/Genet.inf @@ -0,0 +1,39 @@ +## @file +# +# Copyright (c) 2020, Jeremy Linton All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D Genet + FILE_GUID =3D e2b1eaf3-50b7-4ae1-b79e-ec8020cb57ac + MODULE_TYPE =3D UEFI_DRIVER + VERSION_STRING =3D 0.1 + ENTRY_POINT =3D GenetEntryPoint + +[Sources] + Genet.c + +[Packages] + ArmPkg/ArmPkg.dec + MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec + Platform/RaspberryPi/RaspberryPi.dec + +[LibraryClasses] + BaseLib + IoLib + SynchronizationLib + UefiDriverEntryPoint + UefiLib + +[Protocols] + gRaspberryPiFirmwareProtocolGuid ## CONSUMES + + +[Depex] + gRaspberryPiFirmwareProtocolGuid + -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53441): https://edk2.groups.io/g/devel/message/53441 Mute This Topic: https://groups.io/mt/70045883/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Feb 9 09:05:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+53440+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53440+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579780828; cv=none; d=zohomail.com; s=zohoarc; b=PHCERgxqJReJ+8vc8tJxZLxNLxcomONPE32jTD2r93YT6Gv67sZCZ7YENO5/btwn4HsCM2qA2o2QZpZ1yLdp6iC0IfbFFR1FZ2JhzhwxC1bsvCh1yFOdJx6SDZmuKQwJv1FwPIUnFpFBXR9jz1OhCaYOUKVRpWAHWsI1vC7hbz8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579780828; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=mAXska5CKb4km/BsnoQsGxMQLMFUt+larkxyjjkjujs=; b=IUFL8cu8GW/7j9OgPG9g64aKQ6I0iGqOFuPvJu2ahhAUGrca7G/+7afMW68ZxeOgw9BNK7mFRLkD68dfs6PG0S/PWwp6FklSC6+9RmVJHgxw56yQRzcIw4VLNJy8GzbxjOL1JUYpO5lPEx9jIexjXBmTbeGs1XYPr8UmpSWWIXE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+53440+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579780828666465.116600893449; Thu, 23 Jan 2020 04:00:28 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 4qAiYY1788612xIW7yOPAKus; Thu, 23 Jan 2020 04:00:27 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web09.6562.1579780826733542818 for ; Thu, 23 Jan 2020 04:00:27 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id y17so2776235wrh.5 for ; Thu, 23 Jan 2020 04:00:26 -0800 (PST) X-Gm-Message-State: 3fglLEvNt4SXKaPDKCVyC3tNx1787277AA= X-Google-Smtp-Source: APXvYqx69CdtN2R7xvpX+u8DGDhIe8tFIaR8ak+oZxzfeKt2Mx3Wa3290yxxCRw35HE4X7e6AMf47w== X-Received: by 2002:a5d:5263:: with SMTP id l3mr16960261wrc.405.1579780824943; Thu, 23 Jan 2020 04:00:24 -0800 (PST) X-Received: from localhost.localdomain ([84.203.95.128]) by smtp.gmail.com with ESMTPSA id t1sm2492281wma.43.2020.01.23.04.00.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Jan 2020 04:00:24 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com, lintonrjeremy@gmail.com Subject: [edk2-devel] [PATCH] Platform/RPi4: Enable BCM GENET stub driver Date: Thu, 23 Jan 2020 12:00:07 +0000 Message-Id: <20200123120007.4784-6-pete@akeo.ie> In-Reply-To: <20200123120007.4784-1-pete@akeo.ie> References: <20200123120007.4784-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1579780827; bh=/qLxwz/rjkvorBhc+SwMI6biPHHibt63SBaqO2sj1Uc=; h=Cc:Date:From:Reply-To:Subject:To; b=U0tTAlDOZFhYt1pzQP2ekPrujFhKwF2IRDNWEEF6NBFdduBX7fn+RqK/YWN2diZrGrf fNvQDiOsbm7Bm8q+oDzNHx4w7Rz15JH+HMfhMYPgS52Ccl0Hr/4eMI9XjNDCGluO38WY6 I8b1pF4XbTF1x6unscFehURcvavJ1L/+33w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Jeremy Linton We have a stub driver, which retrieves the rpi's MAC address via the mailbox interface and programs the NIC. Lets enable it. Signed-off-by: Jeremy Linton --- Platform/RaspberryPi/RPi4/RPi4.dsc | 1 + Platform/RaspberryPi/RPi4/RPi4.fdf | 1 + 2 files changed, 2 insertions(+) diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index 9aead4de32..97972382d5 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -660,6 +660,7 @@ DEFINE TFA_BUILD_ARTIFACT =3D Platform/RaspberryPi/$(PL= ATFORM_NAME)/TrustedFirmwar # Networking stack # !include NetworkPkg/Network.dsc.inc + Platform/RaspberryPi/Drivers/Genet/Genet.inf =20 # # RNG diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4= /RPi4.fdf index e00a45b8a4..c44ec839c2 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -265,6 +265,7 @@ READ_LOCK_STATUS =3D TRUE # Networking stack # !include NetworkPkg/Network.fdf.inc + INF Platform/RaspberryPi/Drivers/Genet/Genet.inf =20 # # RNG -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53440): https://edk2.groups.io/g/devel/message/53440 Mute This Topic: https://groups.io/mt/70045882/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-