From nobody Mon Apr 29 12:56:52 2024 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+53475+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+53475+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579866869; cv=none; d=zohomail.com; s=zohoarc; b=ksfx0iuAg8cqShRp4HuiDuRLCYIrxaPFb0mUrnplpkGA9FqQvEmE7zygk7aLkYEqzkBEK4VsYKCCq24BKZ/V4rgdyEgcVi7z+4j+T8zwPFXsx/H814WuLTLvDAF7XHeWQyR8aDmb2GRbPagM1N/07MCzsy3u+VkOHSnjcZ4MYMY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579866869; 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=zN4kbpJemDqCwyFoFyM2/r4Xm8vlxBWuEkchgH9HH0k=; b=hi1cQumEwKdLDYlQ13CpgkTvn5Qo54TW6ju3zAae1gV+1cukKHrkbuFOonOOL7aBk6PLC4LDduspzsQEuvUG4oCCLuD0OYsx+aNHmqBHJOm8+RNgW6KVGJsVf2KlGIPFu9/m7fic1R4LhvKwbzw2IrmOPgQe98sf1V2I9VM/3Ws= 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+53475+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579866868917721.8267104715104; Fri, 24 Jan 2020 03:54:28 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id UgxMYY1788612xiNZdxg1Rd5; Fri, 24 Jan 2020 03:54:27 -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.web09.11744.1579866867115240826 for ; Fri, 24 Jan 2020 03:54:27 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id q6so1622557wro.9 for ; Fri, 24 Jan 2020 03:54:26 -0800 (PST) X-Gm-Message-State: NgqT5y7qeoBuoy9jFEnk3H5fx1787277AA= X-Google-Smtp-Source: APXvYqxX/IU81Ir9ogBhE5zd+mBXcMOpWxPli23s90CntW3ezh0xCZQHCT8g9XPZjCkLi2dmyxQHCA== X-Received: by 2002:a5d:6144:: with SMTP id y4mr3783470wrt.367.1579866865188; Fri, 24 Jan 2020 03:54:25 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id p17sm7003840wrx.20.2020.01.24.03.54.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jan 2020 03:54: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] [edk2-platforms][PATCH v2 1/3] Silicon/Broadcom/Net: Add Genet stub driver to setup MAC Date: Fri, 24 Jan 2020 11:54:09 +0000 Message-Id: <20200124115411.9364-2-pete@akeo.ie> In-Reply-To: <20200124115411.9364-1-pete@akeo.ie> References: <20200124115411.9364-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=1579866867; bh=XdzuEwY3r2nGxTsLS5M4qHxErtWp1+bKk0P/u+vX2X8=; h=Cc:Date:From:Reply-To:Subject:To; b=Oz/l9ni/mD11y9+a+3XIJRHyrQv9b9R8wkrQc5CfwqXGf/9t8CTGCJ/SfP7DZcxNRFJ N45Syl4vRIIZFE4StRVgIX9VZDO5CV4FKNeRUg//P0nMInTw5naVktMpww7WCnFY2QUO3 JWYZg81HVzGzBTxtW/2YI9eVXjBhKROsO+U= 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..9f29bc0c0894 --- /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, "Using 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..2a8688cb09a7 --- /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|UINT64|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 (#53475): https://edk2.groups.io/g/devel/message/53475 Mute This Topic: https://groups.io/mt/70068666/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 Apr 29 12:56:52 2024 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+53476+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+53476+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579866871; cv=none; d=zohomail.com; s=zohoarc; b=KKbk38RXEqWHNYtZWseiHhI6IwTWDL81LIw8xQcpUVbY2/y+mrh0yWtHELzQ9wgMWl0EfE72fAPsGsuYqWQleQCUcYgy/0VRZ90H14Zt1yTmEPxj3z/qsqFLnK9cG2N36YGDBCNwUyg2sINea0CKQ8hGuCnAzfhyHlVZi7WVqfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579866871; 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=/RvWv5NaNYye/I/ATCo1Eey9P56bR9NJkzfrSf3evfs=; b=GA+rQXPVYXIPF4ndn/S5STxiAie4R1WUsblpxLmrr7jFDFX+Dr3Gjc1J4TjYPBDm5Pd1rsbaR8vtqCw7WFsQGBV8XA6mToLBJ5kFZo1FPmzLXINGBbtdyDFt09dFBCqTWrcmuooWWg6Ccy6ZeEyG1tUch9nD6PaYgLRf/zSsJVc= 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+53476+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579866871204852.3896451131154; Fri, 24 Jan 2020 03:54:31 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id tf89YY1788612xi737yMvmxS; Fri, 24 Jan 2020 03:54:30 -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.11746.1579866869458401001 for ; Fri, 24 Jan 2020 03:54:29 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id q10so1620449wrm.11 for ; Fri, 24 Jan 2020 03:54:29 -0800 (PST) X-Gm-Message-State: hvCwmUEuoGgVoHGIT6k9Pqmyx1787277AA= X-Google-Smtp-Source: APXvYqzxvn4BuRpw7n+e9wPtHNlYDJ1+6zTPjhSbI3iI+oAo0Whw+G2fPF+9teZ0kRa/SDwY4GZHhQ== X-Received: by 2002:adf:dd4d:: with SMTP id u13mr4192829wrm.394.1579866867810; Fri, 24 Jan 2020 03:54:27 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id p17sm7003840wrx.20.2020.01.24.03.54.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jan 2020 03:54:27 -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 v2 2/3] Platform/RPi: Add PlatformPcdLib to set the Genet MAC address Date: Fri, 24 Jan 2020 11:54:10 +0000 Message-Id: <20200124115411.9364-3-pete@akeo.ie> In-Reply-To: <20200124115411.9364-1-pete@akeo.ie> References: <20200124115411.9364-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=1579866870; bh=i8QJPrJrUhpSdqJxTQ47OgDLZyQLZPBuvDGvazQMzXE=; h=Cc:Date:From:Reply-To:Subject:To; b=WcojTNMY3IWZphLQ8lx3SnjKWJoujIdnFPsbG4FljDi567rRZXW80dpV5Xh+i6ZqfDL 0RMoRMaDNC0fw8I5IlvRpMwyW4TDXUDQgI7rm3dCTULRJpF4G/LKTVPd/X/+RQVEAURjn CcuxlHVfEl14zakiOah7KUVRKsw50fQFTqg= 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 | 51 ++++++= ++++++++++++++ Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf | 43 ++++++= +++++++++++ 2 files changed, 94 insertions(+) diff --git a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c b= /Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c new file mode 100644 index 000000000000..792073a903e9 --- /dev/null +++ b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c @@ -0,0 +1,51 @@ +/** @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 { + PcdSet64S (PcdBcmGenetMacAddress, MacAddr); + } + } +#endif + + 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..2a207d2b3e54 --- /dev/null +++ b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf @@ -0,0 +1,43 @@ +#/** @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 + +[Sources] + PlatformPcdLib.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + Platform/RaspberryPi/RaspberryPi.dec + Silicon/Broadcom/Drivers/Net/BcmNet.dec + +[LibraryClasses] + DebugLib + PcdLib + UefiLib + PrintLib + +[Protocols] + gRaspberryPiFirmwareProtocolGuid ## CONSUMES + +[Pcd] + gBcmNetTokenSpaceGuid.PcdBcmGenetMacAddress ## SOMETIMES_PRODUCES + +[FixedPcd] + gBcmNetTokenSpaceGuid.PcdBcmGenetRegistersAddress + +[Depex] + 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 (#53476): https://edk2.groups.io/g/devel/message/53476 Mute This Topic: https://groups.io/mt/70068668/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 Apr 29 12:56:52 2024 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+53477+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+53477+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1579866874; cv=none; d=zohomail.com; s=zohoarc; b=YOji+hpN0vu1diS+umVXsh+N8U5BnnwqasbzXtVgcgJsyUl1Lw/SkBYJXlsVyIu/ccyW8+8LfPKOr7IJbo2YVznp0Jw8sezfanOj3FyiINpoIGEoDJGvSe61jTxqXZw5jzWd9/MYjCyEZmual6cE6c/7BC7dW1KYV2eN75jwSww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579866874; 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=zpZwzjwJiiFOHAOQjE/lRYb21//k+NJdqnkpAJ2tApk=; b=PdYjiUOc+rQR/AjH8DdxB8GiC2Gp1I82RCg1PxFDdhZtBCLQaYMbf8AuXS2NA0RDwbpip+FoIqmnDKtT8NJ5oBbxl64BgdbXMGxto5UWRTi1cOhfnX0RJ1Pxjc39bJASZ2y83AFlTRLVqEiV2+kpsYo/K+sZAhMQTjYMSg0LUKU= 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+53477+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1579866874648472.7014457184389; Fri, 24 Jan 2020 03:54:34 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id ly5lYY1788612xeBvhkBr8Eo; Fri, 24 Jan 2020 03:54:33 -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.web09.11747.1579866872907025232 for ; Fri, 24 Jan 2020 03:54:33 -0800 X-Received: by mail-wr1-f68.google.com with SMTP id q6so1622885wro.9 for ; Fri, 24 Jan 2020 03:54:32 -0800 (PST) X-Gm-Message-State: IbIHkDcFWhUXVttticopz5Cwx1787277AA= X-Google-Smtp-Source: APXvYqxnJmJWhbFrb+dfhjvnKuRZggXBqhsilQaNy/6jm0H/K5aH0mXgWGbWPAXECc8/6lt7YdZlSA== X-Received: by 2002:a5d:484d:: with SMTP id n13mr3848671wrs.420.1579866871233; Fri, 24 Jan 2020 03:54:31 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id p17sm7003840wrx.20.2020.01.24.03.54.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Jan 2020 03:54:30 -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 v2 3/3] Platform/RPi4: Enable Broadcom Genet stub driver Date: Fri, 24 Jan 2020 11:54:11 +0000 Message-Id: <20200124115411.9364-4-pete@akeo.ie> In-Reply-To: <20200124115411.9364-1-pete@akeo.ie> References: <20200124115411.9364-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=1579866873; bh=fQtqLzsTCLtmQMbOyfyn6YxMkUREaFO6Wtm/R9Dy8HU=; h=Cc:Date:From:Reply-To:Subject:To; b=UneEAWgRkb+9TvP0AbHQRrFnJI7/cLVCIYjEMg4kDAnDCG4dTQHbC3DKBycjVNMffqb a5ajBwGTxOKBLhszgDwA6CPQd32XDyrFvEXucJvGDbJ9kNN6mnxjGWad7uNSjjQpHs2Ur bDqZnIbPrYzEDrIFUajiOATQ/WuC8ll72tU= 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 (#53477): https://edk2.groups.io/g/devel/message/53477 Mute This Topic: https://groups.io/mt/70068670/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-