From nobody Thu May 2 23:56:27 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+53657+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+53657+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1580735655126221.75165869112868; Mon, 3 Feb 2020 05:14:15 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id uUuVYY1788612xi4Kytp6BAV; Mon, 03 Feb 2020 05:14:14 -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.web12.6424.1580735653894171889 for ; Mon, 03 Feb 2020 05:14:14 -0800 X-Received: by mail-wr1-f66.google.com with SMTP id k11so18026378wrd.9 for ; Mon, 03 Feb 2020 05:14:13 -0800 (PST) X-Gm-Message-State: m6NkH19xTIyKJGGrScu3gt2zx1787277AA= X-Google-Smtp-Source: APXvYqwxNNBQSwyn5FWwoYLmganI72e2BmvvvIQmx4jNRfycK0ljziupnZ5bnfn1t6nUKDxtanUNLw== X-Received: by 2002:adf:8b59:: with SMTP id v25mr14427868wra.419.1580735652232; Mon, 03 Feb 2020 05:14:12 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id k10sm1176950wrd.68.2020.02.03.05.14.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Feb 2020 05:14:11 -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 v3 1/3] Silicon/Broadcom/Net: Add Genet stub driver to setup MAC Date: Mon, 3 Feb 2020 13:13:56 +0000 Message-Id: <20200203131358.16796-2-pete@akeo.ie> In-Reply-To: <20200203131358.16796-1-pete@akeo.ie> References: <20200203131358.16796-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=1580735654; bh=1adSCq1nhw/NCVmm4RlCw7hpCxraICXyJflzQNvBSOM=; h=Cc:Date:From:Reply-To:Subject:To; b=m43SSmU13NYzFjB2mAeP2h+jNKY5o+7k/WY9VLg9mN5XZ6O+rIlYbHRmN+1zAo5Bas+ yBtofsXdT/vYwGWFyUWWDMh+bLmsrnKQVELwdDl9ylVmZ9CFTmrf1RCUIsVyX+zFHPx04 dkTdTYfCNMWazLn7Fh8kEPZ6K7vPFeutWwM= 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 Reviewed-by: Ard Biesheuvel --- 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 (#53657): https://edk2.groups.io/g/devel/message/53657 Mute This Topic: https://groups.io/mt/70945774/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 Thu May 2 23:56:27 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+53658+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+53658+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1580735656152337.14546991882264; Mon, 3 Feb 2020 05:14:16 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 10DCYY1788612xfUpXoZqfR9; Mon, 03 Feb 2020 05:14:15 -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.6520.1580735654972821189 for ; Mon, 03 Feb 2020 05:14:15 -0800 X-Received: by mail-wr1-f66.google.com with SMTP id j104so18051738wrj.7 for ; Mon, 03 Feb 2020 05:14:14 -0800 (PST) X-Gm-Message-State: J7cxYPo9ztUWHAysnK2e4lDxx1787277AA= X-Google-Smtp-Source: APXvYqzTaeVDspaOMUCpxD29EBsztXSvREE01zxkKqFtozDYcgTwgseDVCxWZ88pcE9wfb2IPhp63A== X-Received: by 2002:a5d:68cf:: with SMTP id p15mr15062088wrw.31.1580735653364; Mon, 03 Feb 2020 05:14:13 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id k10sm1176950wrd.68.2020.02.03.05.14.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Feb 2020 05:14:12 -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 v3 2/3] Platform/RPi: Add PlatformPcdLib to set the Genet MAC address Date: Mon, 3 Feb 2020 13:13:57 +0000 Message-Id: <20200203131358.16796-3-pete@akeo.ie> In-Reply-To: <20200203131358.16796-1-pete@akeo.ie> References: <20200203131358.16796-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=1580735655; bh=jZ6JtnQGU2oNk1SvELjy/CCMOAHyMGHRJH6EwzytwUE=; h=Cc:Date:From:Reply-To:Subject:To; b=UU2uWQ5DA4c77Qfk09h4bhIc9EbRsS5MjTzIF65h79ItdGw/9A7IEwYko2L/ev7U35F n3j7bnUplYOCdmpjNQgiKyuBPpS9EUUDtp/LrfIdOKBNz591NlpddWsW7TjOs09DSVHsP YeYkE4V/8Dql2Tsfg7LKY5OE60SOKCdiz9Y= 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 Reviewed-by: Ard Biesheuvel --- Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c | 45 ++++++= ++++++++++++++ Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.inf | 43 ++++++= +++++++++++++ 2 files changed, 88 insertions(+) diff --git a/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c b= /Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c new file mode 100644 index 000000000000..e78518c81374 --- /dev/null +++ b/Platform/RaspberryPi/Library/PlatformPcdLib/PlatformPcdLib.c @@ -0,0 +1,45 @@ +/** @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 + ) +{ + 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); + } + } + + 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 (#53658): https://edk2.groups.io/g/devel/message/53658 Mute This Topic: https://groups.io/mt/70945775/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 Thu May 2 23:56:27 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+53659+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+53659+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1580735657293662.5003238308809; Mon, 3 Feb 2020 05:14:17 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id T1bhYY1788612xqZ6xUyg5jm; Mon, 03 Feb 2020 05:14:16 -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.6522.1580735656058480432 for ; Mon, 03 Feb 2020 05:14:16 -0800 X-Received: by mail-wr1-f66.google.com with SMTP id u6so4784329wrt.0 for ; Mon, 03 Feb 2020 05:14:15 -0800 (PST) X-Gm-Message-State: 8CEnsKOWCJmJF3vOAkUb8wzxx1787277AA= X-Google-Smtp-Source: APXvYqwxJSZ0XvFxZ7AK1Cbya5tdkqNaqDbVZMbPZN12NykgWmyy6vPv6uS6md+5ckVuOrSvzx8PfQ== X-Received: by 2002:a5d:4052:: with SMTP id w18mr9545970wrp.112.1580735654508; Mon, 03 Feb 2020 05:14:14 -0800 (PST) X-Received: from localhost.localdomain ([84.203.49.247]) by smtp.gmail.com with ESMTPSA id k10sm1176950wrd.68.2020.02.03.05.14.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Feb 2020 05:14:13 -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 v3 3/3] Platform/RPi4: Enable Broadcom Genet stub driver Date: Mon, 3 Feb 2020 13:13:58 +0000 Message-Id: <20200203131358.16796-4-pete@akeo.ie> In-Reply-To: <20200203131358.16796-1-pete@akeo.ie> References: <20200203131358.16796-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=1580735656; bh=3g641fmGfGl0TDEdiM6NHAxWfxoMvyWt+nZvsXAXckQ=; h=Cc:Date:From:Reply-To:Subject:To; b=MT+IGNVPGdTG6Y5W+ggIQYAeZoSOxqT+q0OacudN9Y3RWRXqebu9eXyBi3rC+SIyLfQ qIiyZlEcIaKsm3rBWn/S/5kb9oQGwg3Ricdh5qAnMEPbZiYjdEN4eUXLSQcKpcpbiBtXL 7vQSLoJwuOa9nFwgIFWy/qOoURhNZ8J+ZWU= 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 Reviewed-by: Ard Biesheuvel --- 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 (#53659): https://edk2.groups.io/g/devel/message/53659 Mute This Topic: https://groups.io/mt/70945777/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-