* [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface @ 2020-02-03 13:40 Pete Batard 2020-02-08 8:52 ` Ard Biesheuvel 2020-02-14 8:55 ` Ard Biesheuvel 0 siblings, 2 replies; 5+ messages in thread From: Pete Batard @ 2020-02-03 13:40 UTC (permalink / raw) To: devel; +Cc: ard.biesheuvel, leif, philmd, lintonrjeremy The Raspberry Pi 4 platforms uses a Broadcom Genet network interface, for which we need ACPI entries in order to make it usable under Linux. This patch adds these entries, including a max-dma-burst-size DSD attribute aimed at simplifying support for Genet on distros that use older kernels, such as Debian. Note that we ran these settings through someone working for Broadcom, who okayed the proposed values including ownership of max-dma-burst-size (which we expect to also require for Device Tree usage on older kernels, hence the requirement for a designated owner). Signed-off-by: Pete Batard <pete@akeo.ie> --- Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl index b2f1d3439211..12c3967fa9e1 100644 --- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl @@ -267,6 +267,35 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2) } } + Device (ETH0) + { + Name (_HID, "BCM6E4E") + Name (_CID, "BCM6E4E") + Name (_UID, 0x0) + Name (_CCA, 0x0) + Method (_STA) + { + Return (0xf) + } + Method (_CRS, 0x0, Serialized) + { + Name (RBUF, ResourceTemplate () + { + Memory32Fixed (ReadWrite, 0xfd580000, 0x10000, ) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBE } + }) + Return (RBUF) + } + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () { "brcm,max-dma-burst-size", 0x08 }, + Package () { "phy-mode", "rgmii" }, + } + }) + } + // Description: I2C Device (I2C1) { -- 2.21.0.windows.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface 2020-02-03 13:40 [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface Pete Batard @ 2020-02-08 8:52 ` Ard Biesheuvel 2020-02-08 14:19 ` Pete Batard 2020-02-14 8:55 ` Ard Biesheuvel 1 sibling, 1 reply; 5+ messages in thread From: Ard Biesheuvel @ 2020-02-08 8:52 UTC (permalink / raw) To: Pete Batard Cc: edk2-devel-groups-io, Leif Lindholm, Philippe Mathieu-Daudé, Jeremy Linton On Mon, 3 Feb 2020 at 13:40, Pete Batard <pete@akeo.ie> wrote: > > The Raspberry Pi 4 platforms uses a Broadcom Genet network interface, for > which we need ACPI entries in order to make it usable under Linux. > > This patch adds these entries, including a max-dma-burst-size DSD attribute > aimed at simplifying support for Genet on distros that use older kernels, > such as Debian. > > Note that we ran these settings through someone working for Broadcom, who > okayed the proposed values including ownership of max-dma-burst-size (which > we expect to also require for Device Tree usage on older kernels, hence the > requirement for a designated owner). > > Signed-off-by: Pete Batard <pete@akeo.ie> > --- > Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 29 ++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > index b2f1d3439211..12c3967fa9e1 100644 > --- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > @@ -267,6 +267,35 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2) > } > } > > + Device (ETH0) > + { > + Name (_HID, "BCM6E4E") > + Name (_CID, "BCM6E4E") What is the point of having identical _HID and _CID? Is that a Windows thing? > + Name (_UID, 0x0) > + Name (_CCA, 0x0) > + Method (_STA) > + { > + Return (0xf) > + } > + Method (_CRS, 0x0, Serialized) > + { > + Name (RBUF, ResourceTemplate () > + { > + Memory32Fixed (ReadWrite, 0xfd580000, 0x10000, ) We could grab that base address from a PCD as well, no? > + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD } > + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBE } Why not Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD, 0xBE } ? > + }) > + Return (RBUF) > + } > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package () { "brcm,max-dma-burst-size", 0x08 }, > + Package () { "phy-mode", "rgmii" }, > + } > + }) > + } > + > // Description: I2C > Device (I2C1) > { > -- > 2.21.0.windows.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface 2020-02-08 8:52 ` Ard Biesheuvel @ 2020-02-08 14:19 ` Pete Batard 2020-02-08 17:24 ` Ard Biesheuvel 0 siblings, 1 reply; 5+ messages in thread From: Pete Batard @ 2020-02-08 14:19 UTC (permalink / raw) To: Ard Biesheuvel Cc: edk2-devel-groups-io, Leif Lindholm, Philippe Mathieu-Daudé, Jeremy Linton On 2020.02.08 08:52, Ard Biesheuvel wrote: > On Mon, 3 Feb 2020 at 13:40, Pete Batard <pete@akeo.ie> wrote: >> >> The Raspberry Pi 4 platforms uses a Broadcom Genet network interface, for >> which we need ACPI entries in order to make it usable under Linux. >> >> This patch adds these entries, including a max-dma-burst-size DSD attribute >> aimed at simplifying support for Genet on distros that use older kernels, >> such as Debian. >> >> Note that we ran these settings through someone working for Broadcom, who >> okayed the proposed values including ownership of max-dma-burst-size (which >> we expect to also require for Device Tree usage on older kernels, hence the >> requirement for a designated owner). >> >> Signed-off-by: Pete Batard <pete@akeo.ie> >> --- >> Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 29 ++++++++++++++++++++ >> 1 file changed, 29 insertions(+) >> >> diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl >> index b2f1d3439211..12c3967fa9e1 100644 >> --- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl >> +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl >> @@ -267,6 +267,35 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2) >> } >> } >> >> + Device (ETH0) >> + { >> + Name (_HID, "BCM6E4E") >> + Name (_CID, "BCM6E4E") > > What is the point of having identical _HID and _CID? Is that a Windows thing? > >> + Name (_UID, 0x0) >> + Name (_CCA, 0x0) >> + Method (_STA) >> + { >> + Return (0xf) >> + } >> + Method (_CRS, 0x0, Serialized) >> + { >> + Name (RBUF, ResourceTemplate () >> + { >> + Memory32Fixed (ReadWrite, 0xfd580000, 0x10000, ) > > We could grab that base address from a PCD as well, no? Well, we don't seem to be using PCDs in any of the .asl's we have (we only do so on .aslc) and, also, that couldn't really be done without the previous series having been integrated. I don't mind going for a PCD here, but do you really want to do that just for ETH0? It'll just look weird because it's going to be the only .asl address that we'll pick from a PCD. If we're going to move to using PCDs in .asl's, I'd rather do that across the board and craft a patch that addresses all, including Uart.asl and so on... Else, it's a bit inconsistent as far as I'm concerned. >> + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD } >> + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBE } > > Why not > > Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD, 0xBE } Likewise: Consistency (be it ill placed or not). We've simply followed what GPIO had here. Again, I don't mind making the .asl cleaner, but if we're going to do so, I'd rather not be piecemeal about it, and do that in a separate patch that harmonises the whole thing. If you're okay with that approach, and not require a v2 for this, I can send a separate patch that cleans up the .asl's and uses PCDs early next week. Regards, /Pete > > ? > >> + }) >> + Return (RBUF) >> + } >> + Name (_DSD, Package () { >> + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), >> + Package () { >> + Package () { "brcm,max-dma-burst-size", 0x08 }, >> + Package () { "phy-mode", "rgmii" }, >> + } >> + }) >> + } >> + >> // Description: I2C >> Device (I2C1) >> { >> -- >> 2.21.0.windows.1 >> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface 2020-02-08 14:19 ` Pete Batard @ 2020-02-08 17:24 ` Ard Biesheuvel 0 siblings, 0 replies; 5+ messages in thread From: Ard Biesheuvel @ 2020-02-08 17:24 UTC (permalink / raw) To: Pete Batard Cc: edk2-devel-groups-io, Leif Lindholm, Philippe Mathieu-Daudé, Jeremy Linton On Sat, 8 Feb 2020 at 15:19, Pete Batard <pete@akeo.ie> wrote: > > On 2020.02.08 08:52, Ard Biesheuvel wrote: > > On Mon, 3 Feb 2020 at 13:40, Pete Batard <pete@akeo.ie> wrote: > >> > >> The Raspberry Pi 4 platforms uses a Broadcom Genet network interface, for > >> which we need ACPI entries in order to make it usable under Linux. > >> > >> This patch adds these entries, including a max-dma-burst-size DSD attribute > >> aimed at simplifying support for Genet on distros that use older kernels, > >> such as Debian. > >> > >> Note that we ran these settings through someone working for Broadcom, who > >> okayed the proposed values including ownership of max-dma-burst-size (which > >> we expect to also require for Device Tree usage on older kernels, hence the > >> requirement for a designated owner). > >> > >> Signed-off-by: Pete Batard <pete@akeo.ie> > >> --- > >> Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 29 ++++++++++++++++++++ > >> 1 file changed, 29 insertions(+) > >> > >> diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > >> index b2f1d3439211..12c3967fa9e1 100644 > >> --- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > >> +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > >> @@ -267,6 +267,35 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2) > >> } > >> } > >> > >> + Device (ETH0) > >> + { > >> + Name (_HID, "BCM6E4E") > >> + Name (_CID, "BCM6E4E") > > > > What is the point of having identical _HID and _CID? Is that a Windows thing? > > > >> + Name (_UID, 0x0) > >> + Name (_CCA, 0x0) > >> + Method (_STA) > >> + { > >> + Return (0xf) > >> + } > >> + Method (_CRS, 0x0, Serialized) > >> + { > >> + Name (RBUF, ResourceTemplate () > >> + { > >> + Memory32Fixed (ReadWrite, 0xfd580000, 0x10000, ) > > > > We could grab that base address from a PCD as well, no? > > Well, we don't seem to be using PCDs in any of the .asl's we have (we > only do so on .aslc) and, also, that couldn't really be done without the > previous series having been integrated. > > I don't mind going for a PCD here, but do you really want to do that > just for ETH0? It'll just look weird because it's going to be the only > .asl address that we'll pick from a PCD. > > If we're going to move to using PCDs in .asl's, I'd rather do that > across the board and craft a patch that addresses all, including > Uart.asl and so on... Else, it's a bit inconsistent as far as I'm concerned. > That's a fair point. Let's leave it for now. > >> + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD } > >> + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBE } > > > > Why not > > > > Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD, 0xBE } > > Likewise: Consistency (be it ill placed or not). > > We've simply followed what GPIO had here. > > Again, I don't mind making the .asl cleaner, but if we're going to do > so, I'd rather not be piecemeal about it, and do that in a separate > patch that harmonises the whole thing. > > If you're okay with that approach, and not require a v2 for this, I can > send a separate patch that cleans up the .asl's and uses PCDs early next > week. > I'll just merge the patch as-is. These are mostly nitpicks anyway, and the current version has been tested and is know to work (right?) so no point in doing a respin. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface 2020-02-03 13:40 [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface Pete Batard 2020-02-08 8:52 ` Ard Biesheuvel @ 2020-02-14 8:55 ` Ard Biesheuvel 1 sibling, 0 replies; 5+ messages in thread From: Ard Biesheuvel @ 2020-02-14 8:55 UTC (permalink / raw) To: Pete Batard Cc: edk2-devel-groups-io, Leif Lindholm, Philippe Mathieu-Daudé, Jeremy Linton On Mon, 3 Feb 2020 at 14:40, Pete Batard <pete@akeo.ie> wrote: > > The Raspberry Pi 4 platforms uses a Broadcom Genet network interface, for > which we need ACPI entries in order to make it usable under Linux. > > This patch adds these entries, including a max-dma-burst-size DSD attribute > aimed at simplifying support for Genet on distros that use older kernels, > such as Debian. > > Note that we ran these settings through someone working for Broadcom, who > okayed the proposed values including ownership of max-dma-burst-size (which > we expect to also require for Device Tree usage on older kernels, hence the > requirement for a designated owner). > > Signed-off-by: Pete Batard <pete@akeo.ie> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Pushed as 2f1cb7447690..cc7a0c68618c > --- > Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl | 29 ++++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > index b2f1d3439211..12c3967fa9e1 100644 > --- a/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Dsdt.asl > @@ -267,6 +267,35 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 5, "MSFT", "EDK2", 2) > } > } > > + Device (ETH0) > + { > + Name (_HID, "BCM6E4E") > + Name (_CID, "BCM6E4E") > + Name (_UID, 0x0) > + Name (_CCA, 0x0) > + Method (_STA) > + { > + Return (0xf) > + } > + Method (_CRS, 0x0, Serialized) > + { > + Name (RBUF, ResourceTemplate () > + { > + Memory32Fixed (ReadWrite, 0xfd580000, 0x10000, ) > + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBD } > + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 0xBE } > + }) > + Return (RBUF) > + } > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package () { "brcm,max-dma-burst-size", 0x08 }, > + Package () { "phy-mode", "rgmii" }, > + } > + }) > + } > + > // Description: I2C > Device (I2C1) > { > -- > 2.21.0.windows.1 > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-14 8:55 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-02-03 13:40 [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface Pete Batard 2020-02-08 8:52 ` Ard Biesheuvel 2020-02-08 14:19 ` Pete Batard 2020-02-08 17:24 ` Ard Biesheuvel 2020-02-14 8:55 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox