From mboxrd@z Thu Jan 1 00:00:00 1970 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.12431.1582887708133791550 for ; Fri, 28 Feb 2020 03:01:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=QmQCc/fp; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.68, mailfrom: pete@akeo.ie) Received: by mail-wr1-f68.google.com with SMTP id v4so2438872wrs.8 for ; Fri, 28 Feb 2020 03:01: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=BeN/0MI5CbMm5S6O9xXGpZWKRMVJ0lPFjysh+8ysuB4=; b=QmQCc/fpDLeZLJFPuWvJqaaq+ylvpdtsXs8XcOGelay3daodG2oWuuI4XZs2zdddPP Po5eAJGyOkdGlWx6D0YRFKuZxNixgMWgMhxyYolJEYQ3mjTVsIa3GtJUu9KWWe5q6nXb H2IyVVzvhMchf/qg3J/EvJhv0228jXeTXfVeffjHfGBfYmXJSLpfghZNiUc/GxsfUdtf RnfrjDR1uAcu8c6hJctb4+CwEOqQZeEPhfOWzT4ar3+1ez8vnMGIrv7sc27eNaGOkNPN uzn3HOqxbrA/BYqOfvLAzxy4eRzjKT2GxIqtw0SICCnkzSsmnA+B2kzOfLxva0LFVl1+ A8zw== 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=BeN/0MI5CbMm5S6O9xXGpZWKRMVJ0lPFjysh+8ysuB4=; b=ah+BpINS1spLu0nLmbTQ9Je0GTuvQ2Nmt+xd18PKzpc7CZkLTcmDScBL3/EjG9BRqx u6GebXSZpR5N81TDpfltsiW06B5HbgsDHx4XRQ9IcSmKTAXwh8V6AYFucUew53vOS8ZU DeaVawMB9AYRznDxNKBq8DPiiEGJBIdeipDHlVB/E0fudrm5ccuN0/ktcOIzAwXWqgzJ 4mawdgMdOWENQIzMrYGbYSk1aZCo6BJRsvXdqo+LbQqXWzTJDD4f5q1NzLGu0aczDZj8 SGh/NGt6+quRpSdnuz+oTomfuyAsAkmsZylaY8Bqkx2WBGUR42iP94tfzKkfpaXpoDMJ HwVw== X-Gm-Message-State: APjAAAXHPx5j8ZnwVz5vo5P6E4uT2wsGUbnqgwLWYUrETprOk4HTmOUD JgoU1ZIe19Qfpen45LhzuBujnQ== X-Google-Smtp-Source: APXvYqwZj1edXpsEZMN0/Lmt5dJBiKO510LyPyFEcb1ezaopwBQ1mNzpqiywQFoX6V+Le/3UX8R3qA== X-Received: by 2002:adf:fe50:: with SMTP id m16mr4565889wrs.217.1582887706661; Fri, 28 Feb 2020 03:01:46 -0800 (PST) Return-Path: Received: from [10.0.0.122] ([84.203.56.244]) by smtp.googlemail.com with ESMTPSA id v2sm13050199wme.2.2020.02.28.03.01.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Feb 2020 03:01:45 -0800 (PST) Subject: Re: [edk2-platforms][PATCH 04/15] Silicon/BcmGenet: Add missing I/O mapping length and clean up To: Ard Biesheuvel Cc: edk2-devel-groups-io , Leif Lindholm , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= References: <20200228103855.11352-1-pete@akeo.ie> <20200228103855.11352-5-pete@akeo.ie> <295ffa3b-aec9-f21a-0017-ae3b8949f2a9@akeo.ie> From: "Pete Batard" Message-ID: Date: Fri, 28 Feb 2020 11:01:44 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 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.28 10:58, Ard Biesheuvel wrote: > On Fri, 28 Feb 2020 at 11:51, Pete Batard wrote: >> >> Hi Ard, >> >> On 2020.02.28 10:45, Ard Biesheuvel wrote: >>> On Fri, 28 Feb 2020 at 11:39, Pete Batard wrote: >>>> >>>> Remove unneeded extra parenthesis on PCD, which can cause problems >>>> when used with ACPI ASL macros and add an [Includes] section to the >>>> .inf, so that the Genet.h header can be referenced where required. >>>> >>>> Signed-off-by: Pete Batard >>>> --- >>>> Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h | 3 ++- >>>> Silicon/Broadcom/Drivers/Net/BcmNet.dec | 3 +++ >>>> 2 files changed, 5 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h >>>> index 4a3827c0e0d1..f56fb2977422 100644 >>>> --- a/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h >>>> +++ b/Silicon/Broadcom/Drivers/Net/BcmGenetDxe/Genet.h >>>> @@ -11,7 +11,8 @@ >>>> >>>> #include >>>> >>>> -#define GENET_BASE_ADDRESS (FixedPcdGet64 (PcdBcmGenetRegistersAddress)) >>>> +#define GENET_BASE_ADDRESS FixedPcdGet64 (PcdBcmGenetRegistersAddress) >>>> +#define GENET_LENGTH 0x00010000 >>>> >>>> #define GENET_SYS_RBUF_FLUSH_CTRL 0x0008 >>>> #define GENET_UMAC_MAC0 0x080c >>>> diff --git a/Silicon/Broadcom/Drivers/Net/BcmNet.dec b/Silicon/Broadcom/Drivers/Net/BcmNet.dec >>>> index 2a8688cb09a7..483b033af51c 100644 >>>> --- a/Silicon/Broadcom/Drivers/Net/BcmNet.dec >>>> +++ b/Silicon/Broadcom/Drivers/Net/BcmNet.dec >>>> @@ -12,6 +12,9 @@ [Defines] >>>> PACKAGE_GUID = 34E19823-D23A-41AB-9C09-ED1225B32DFF >>>> PACKAGE_VERSION = 1.0 >>>> >>>> +[Includes] >>>> + . >>>> + >>> >>> This looks fishy. Won't this cause *every* module that incorporates >>> this .dec to add . to its include path? >> >> Yeah, I don't like it either. I kind of expected you guys to comment on >> it, so that we can discuss what you think the better approach should be. >> >> Do you think it'd make sense to create a Drivers/Include/ section in >> Silicon/Broadcom/ and move the header there? >> >> And if we do that, do you think the header should go to something like >> Include/Net or just reside at the top level of Include/? >> >> What would be your preferred approach? >> > > If the contents of the header need to be visible outside of the > module, then the header needs to be moved outside of the module. > > So move the header to > > Silicon/Broadcom/Drivers/Include/Net/ > > and add Include under the [Includes] section > > Then, any component that includes the .dec can access the header via > > #include > OK. I'll do that for v2. /Pete