From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web12.5080.1581171587485524637 for ; Sat, 08 Feb 2020 06:19:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=l3K9Pjbu; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.65, mailfrom: pete@akeo.ie) Received: by mail-wr1-f65.google.com with SMTP id z3so2203591wru.3 for ; Sat, 08 Feb 2020 06:19:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+mSNnnMakwBJZqPozVqURvoTOoe/LP7kOnlKdRcv9a8=; b=l3K9PjbuqWc81pEa25a66gzNxjvWL4TPanTYvt9UQ7/uK11b14jI02+JhEejZZxu9X SptbwxRBg0Jwgz/r3ImPEkC6rRZEOUznr6fYez+JKuSDiDEwPAVC4hGQfTMUCVY3eYlq qGdMA3Eg1yJx2ZTiWHmbdboaTLVwArOHWiaaz8dxnEcpXOk8cXwyRu7aT2/4SreAdc0y M1/Rt9Vd/J4tGXahpe02c4R7Czs4jjgxL1hLmipSSRDI5SVSRaGqddYGsSpUg8mr3UOb PHZVvQPBdLXEY1wH0vdIShpiaPHT6gTBspwFPHVgxZ8KXRTR96wGiuqPCmJvj8jnQhX5 QkqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+mSNnnMakwBJZqPozVqURvoTOoe/LP7kOnlKdRcv9a8=; b=MuJivUs6htwCZu1g6CAta6szGDyRW768sBZiFi+XVkjbLUkwqlNqXK6rtbg5wefiDS fA6lLsK63AHrZtghX/Lr8nU3DfF1PasUNwgXb+GnGHaMzjk3htOJ/qL+oyEKhOtDYCqz ct54QbKmIjnA5dOw1rts/1OfCWXg7rcbpPIIpP6luzoidV09sJCv/LhlJkEb9VACYaCR iUJe6yCqtppQRpF3MvWJLSJLopHYACYj7aOUhYPL+CjcJsf4A37dwC9XxdL4TsOGwM8M RwEYiiCJg2imlVK1JTncc03QuHohaD5ojm0eOM2lx3EQzwesuuCTKfA7P8ROhUIM873A DRaA== X-Gm-Message-State: APjAAAV0/aeRHe0HvPyHko6SxZndSr5l5anloy3rC3C8j1ZPNY6Zx5y3 ChscSeXiS2QBs6oRABDw/EI1PQ== X-Google-Smtp-Source: APXvYqyKddxgOwgYfnE5jtODOIN+kxdhrlJO7Th+YfO5XQNfcl6+8+kWzoP34zVkNxtC7mRqRHKi5g== X-Received: by 2002:a5d:4847:: with SMTP id n7mr5629086wrs.30.1581171586084; Sat, 08 Feb 2020 06:19:46 -0800 (PST) Return-Path: Received: from [10.0.0.130] ([84.203.94.228]) by smtp.googlemail.com with ESMTPSA id i11sm7773758wrs.10.2020.02.08.06.19.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Feb 2020 06:19:45 -0800 (PST) Subject: Re: [edk2-platforms][PATCH 1/1] Platform/RPi4: Add ACPI entry for Genet network interface To: Ard Biesheuvel Cc: edk2-devel-groups-io , Leif Lindholm , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Jeremy Linton References: <20200203134010.12144-1-pete@akeo.ie> From: "Pete Batard" Message-ID: Date: Sat, 8 Feb 2020 14:19:44 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit On 2020.02.08 08:52, Ard Biesheuvel wrote: > On Mon, 3 Feb 2020 at 13:40, Pete Batard 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 >> --- >> 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 >>