From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web12.12516.1582887505115892607 for ; Fri, 28 Feb 2020 02:58:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=U3GMMioa; spf=pass (domain: linaro.org, ip: 209.85.128.68, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f68.google.com with SMTP id n64so1381335wme.3 for ; Fri, 28 Feb 2020 02:58:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VBAMTD0gsM7i67blGTsa2CzIHaSgTchxJz6xEYgEVzU=; b=U3GMMioa3hgHt1vvadpxw2CpgTlganMHqYIjMhaxjHqGK2Z87zp8NW3LxKgAFlPLt5 RKIAFZLtk0VkT5H7MMpDBDG4dgOVSBLjPVKNF/+z1+E5682APXOsQRuzbfE3+prrBRaI cmvrTLAc0x4/0MqZ4Yd272f4CiLT3yXSKjKxPrdD2cTpTcRqIVmRHBCR2PnjumlG2E0A xyDygo7Rs896efO7gNOL0p3FhIijivLU4lCKVq/PQak0DC/yAmtnhs8VmU3XUmTSE6SK HZNQq+O8ymfRqiaTbwuI0ckQVsqyIngZHVQ41a3UDS+U3isOoFgpYhWHETGqMZeiZJYE PEQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VBAMTD0gsM7i67blGTsa2CzIHaSgTchxJz6xEYgEVzU=; b=ex4AEBURDMmV1SZeg3saSijVGp8myHSHV9A10uE8RdJrap5ZGi5IjMx03PpjIliawZ yGocgg7yxuoOFrRMi6fqkrVKG8F4qRe/d9dq0SOL9rWRl3f2TsADp+vD6HVsMJExXpC3 AbWhrFWad2ZJdguoSkEM2kKhuRsEbQe9q3Et3YHjbtIM8HzbEoiGxVNz9VUf8/5/OMS9 a4//7lrApfQhJNic1hnuR+GqfBmou1Tq6w2vxu8e+J2Gj0epPKjHhBbWXSqbLYcOX3cA bwgbtDGiZswKCKJn0jgA83njVGMVc55EXFG/BigQdV2ECfCCNJtlYuDO0bfMV/sVM72A tiCA== X-Gm-Message-State: APjAAAXXO9odNK55Qu9Omv/OeBRymJ9Q7+kMA7l8acH2J1YX//v1oPUL 4xqO4hIORblUQcGCBCETrB5h5VqoDA4qoJMkpqS1lg== X-Google-Smtp-Source: APXvYqzfxkoIPYBKkD9oU9YUjHQ2O1N42ueFH6dgZdvPbAJdZyvvZ6cXgDI271ITp85wurh+Br4BNRKvCQIdp7XJ1Zk= X-Received: by 2002:a1c:9d43:: with SMTP id g64mr4200791wme.62.1582887503626; Fri, 28 Feb 2020 02:58:23 -0800 (PST) MIME-Version: 1.0 References: <20200228103855.11352-1-pete@akeo.ie> <20200228103855.11352-5-pete@akeo.ie> <295ffa3b-aec9-f21a-0017-ae3b8949f2a9@akeo.ie> In-Reply-To: <295ffa3b-aec9-f21a-0017-ae3b8949f2a9@akeo.ie> From: "Ard Biesheuvel" Date: Fri, 28 Feb 2020 11:58:12 +0100 Message-ID: Subject: Re: [edk2-platforms][PATCH 04/15] Silicon/BcmGenet: Add missing I/O mapping length and clean up To: Pete Batard Cc: edk2-devel-groups-io , Leif Lindholm , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Content-Type: text/plain; charset="UTF-8" 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