public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
@ 2018-12-05 20:10 Ard Biesheuvel
  2018-12-10 22:14 ` Leif Lindholm
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2018-12-05 20:10 UTC (permalink / raw)
  To: edk2-devel

The PCDs containing the default MAC addresses are of type UINT64,
and so the byte order needs to be inverted. As they are currently,
both default MAC addresses are invalid since they have the multicast
bit set.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
index 05433d4472e8..2843e51f93f7 100644
--- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
@@ -469,8 +469,8 @@ DEFINE DO_CAPSULE   = FALSE
   gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
 
 [PcdsDynamicDefault.common]
-  gAmdStyxTokenSpaceGuid.PcdEthMacA|0x02A1A2A3A4A5
-  gAmdStyxTokenSpaceGuid.PcdEthMacB|0x02B1B2B3B4B5
+  gAmdStyxTokenSpaceGuid.PcdEthMacA|0xA5A4A3A2A102
+  gAmdStyxTokenSpaceGuid.PcdEthMacB|0xB5B4B3B2B102
 
 [PcdsPatchableInModule]
   gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
-- 
2.19.2



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-05 20:10 [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses Ard Biesheuvel
@ 2018-12-10 22:14 ` Leif Lindholm
  2018-12-10 22:51   ` Ard Biesheuvel
  0 siblings, 1 reply; 11+ messages in thread
From: Leif Lindholm @ 2018-12-10 22:14 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel

On Wed, Dec 05, 2018 at 09:10:48PM +0100, Ard Biesheuvel wrote:
> The PCDs containing the default MAC addresses are of type UINT64,
> and so the byte order needs to be inverted. As they are currently,
> both default MAC addresses are invalid since they have the multicast
> bit set.

Ah, oops.
That would also prevent them from being "locally administered" and
hence permissible without registering an entry in the OUI.

However, to reduce someone interpreting the _new_ values that way
instead, could you do one of:
- Adding a comment explaining these are in reverse byte order.
or
- Convert them to the new Array type PCD[1], to make the bytes appear
  in natural order?

[1] edk2 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5

/
    Leif

> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> index 05433d4472e8..2843e51f93f7 100644
> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> @@ -469,8 +469,8 @@ DEFINE DO_CAPSULE   = FALSE
>    gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
>  
>  [PcdsDynamicDefault.common]
> -  gAmdStyxTokenSpaceGuid.PcdEthMacA|0x02A1A2A3A4A5
> -  gAmdStyxTokenSpaceGuid.PcdEthMacB|0x02B1B2B3B4B5
> +  gAmdStyxTokenSpaceGuid.PcdEthMacA|0xA5A4A3A2A102
> +  gAmdStyxTokenSpaceGuid.PcdEthMacB|0xB5B4B3B2B102
>  
>  [PcdsPatchableInModule]
>    gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
> -- 
> 2.19.2
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-10 22:14 ` Leif Lindholm
@ 2018-12-10 22:51   ` Ard Biesheuvel
  2018-12-10 23:33     ` Leif Lindholm
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2018-12-10 22:51 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel@lists.01.org

On Mon, 10 Dec 2018 at 23:14, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>
> On Wed, Dec 05, 2018 at 09:10:48PM +0100, Ard Biesheuvel wrote:
> > The PCDs containing the default MAC addresses are of type UINT64,
> > and so the byte order needs to be inverted. As they are currently,
> > both default MAC addresses are invalid since they have the multicast
> > bit set.
>
> Ah, oops.
> That would also prevent them from being "locally administered" and
> hence permissible without registering an entry in the OUI.
>
> However, to reduce someone interpreting the _new_ values that way
> instead, could you do one of:
> - Adding a comment explaining these are in reverse byte order.
> or
> - Convert them to the new Array type PCD[1], to make the bytes appear
>   in natural order?
>
> [1] edk2 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5
>

How does one refer to such a PCD from C code?


> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> >  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > index 05433d4472e8..2843e51f93f7 100644
> > --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > @@ -469,8 +469,8 @@ DEFINE DO_CAPSULE   = FALSE
> >    gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
> >
> >  [PcdsDynamicDefault.common]
> > -  gAmdStyxTokenSpaceGuid.PcdEthMacA|0x02A1A2A3A4A5
> > -  gAmdStyxTokenSpaceGuid.PcdEthMacB|0x02B1B2B3B4B5
> > +  gAmdStyxTokenSpaceGuid.PcdEthMacA|0xA5A4A3A2A102
> > +  gAmdStyxTokenSpaceGuid.PcdEthMacB|0xB5B4B3B2B102
> >
> >  [PcdsPatchableInModule]
> >    gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
> > --
> > 2.19.2
> >


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-10 22:51   ` Ard Biesheuvel
@ 2018-12-10 23:33     ` Leif Lindholm
  2018-12-10 23:38       ` Andrew Fish
  0 siblings, 1 reply; 11+ messages in thread
From: Leif Lindholm @ 2018-12-10 23:33 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel@lists.01.org

On Mon, Dec 10, 2018 at 11:51:43PM +0100, Ard Biesheuvel wrote:
> On Mon, 10 Dec 2018 at 23:14, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> >
> > On Wed, Dec 05, 2018 at 09:10:48PM +0100, Ard Biesheuvel wrote:
> > > The PCDs containing the default MAC addresses are of type UINT64,
> > > and so the byte order needs to be inverted. As they are currently,
> > > both default MAC addresses are invalid since they have the multicast
> > > bit set.
> >
> > Ah, oops.
> > That would also prevent them from being "locally administered" and
> > hence permissible without registering an entry in the OUI.
> >
> > However, to reduce someone interpreting the _new_ values that way
> > instead, could you do one of:
> > - Adding a comment explaining these are in reverse byte order.
> > or
> > - Convert them to the new Array type PCD[1], to make the bytes appear
> >   in natural order?
> >
> > [1] edk2 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5
>
> How does one refer to such a PCD from C code?

Good question :)

/
    Leif

> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > > ---
> > >  Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > > index 05433d4472e8..2843e51f93f7 100644
> > > --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > > +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
> > > @@ -469,8 +469,8 @@ DEFINE DO_CAPSULE   = FALSE
> > >    gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
> > >
> > >  [PcdsDynamicDefault.common]
> > > -  gAmdStyxTokenSpaceGuid.PcdEthMacA|0x02A1A2A3A4A5
> > > -  gAmdStyxTokenSpaceGuid.PcdEthMacB|0x02B1B2B3B4B5
> > > +  gAmdStyxTokenSpaceGuid.PcdEthMacA|0xA5A4A3A2A102
> > > +  gAmdStyxTokenSpaceGuid.PcdEthMacB|0xB5B4B3B2B102
> > >
> > >  [PcdsPatchableInModule]
> > >    gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
> > > --
> > > 2.19.2
> > >


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-10 23:33     ` Leif Lindholm
@ 2018-12-10 23:38       ` Andrew Fish
  2018-12-11  0:53         ` Gao, Liming
  0 siblings, 1 reply; 11+ messages in thread
From: Andrew Fish @ 2018-12-10 23:38 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: Ard Biesheuvel, edk2-devel@lists.01.org



> On Dec 10, 2018, at 3:33 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> 
> On Mon, Dec 10, 2018 at 11:51:43PM +0100, Ard Biesheuvel wrote:
>> On Mon, 10 Dec 2018 at 23:14, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>>> 
>>> On Wed, Dec 05, 2018 at 09:10:48PM +0100, Ard Biesheuvel wrote:
>>>> The PCDs containing the default MAC addresses are of type UINT64,
>>>> and so the byte order needs to be inverted. As they are currently,
>>>> both default MAC addresses are invalid since they have the multicast
>>>> bit set.
>>> 
>>> Ah, oops.
>>> That would also prevent them from being "locally administered" and
>>> hence permissible without registering an entry in the OUI.
>>> 
>>> However, to reduce someone interpreting the _new_ values that way
>>> instead, could you do one of:
>>> - Adding a comment explaining these are in reverse byte order.
>>> or
>>> - Convert them to the new Array type PCD[1], to make the bytes appear
>>>  in natural order?
>>> 
>>> [1] edk2 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5
>> 
>> How does one refer to such a PCD from C code?
> 
> Good question :)
> 

Seems like you would need cast the pointer to the data structure in the C code. If I understand correctly the change in the PCD creation code is you can now better structure the data, but it is no different on the consumer end and you got a blob of bytes in both cases. 

Thanks,

Andrew Fish

> /
>    Leif
> 
>>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>>> ---
>>>> Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>> 
>>>> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>>>> index 05433d4472e8..2843e51f93f7 100644
>>>> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>>>> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>>>> @@ -469,8 +469,8 @@ DEFINE DO_CAPSULE   = FALSE
>>>>   gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
>>>> 
>>>> [PcdsDynamicDefault.common]
>>>> -  gAmdStyxTokenSpaceGuid.PcdEthMacA|0x02A1A2A3A4A5
>>>> -  gAmdStyxTokenSpaceGuid.PcdEthMacB|0x02B1B2B3B4B5
>>>> +  gAmdStyxTokenSpaceGuid.PcdEthMacA|0xA5A4A3A2A102
>>>> +  gAmdStyxTokenSpaceGuid.PcdEthMacB|0xB5B4B3B2B102
>>>> 
>>>> [PcdsPatchableInModule]
>>>>   gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
>>>> --
>>>> 2.19.2
>>>> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-10 23:38       ` Andrew Fish
@ 2018-12-11  0:53         ` Gao, Liming
  2018-12-11  7:54           ` Ard Biesheuvel
  0 siblings, 1 reply; 11+ messages in thread
From: Gao, Liming @ 2018-12-11  0:53 UTC (permalink / raw)
  To: Andrew Fish, Leif Lindholm; +Cc: edk2-devel@lists.01.org

If PCD is related to one structure in DEC/DSC, it can be refer as structure pointer in C source code. Here is wiki for its usage: https://github.com/lgao4/edk2/wiki/StrucutrePcd-Usage

Thanks
Liming
>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Andrew Fish via edk2-devel
>Sent: Tuesday, December 11, 2018 7:39 AM
>To: Leif Lindholm <leif.lindholm@linaro.org>
>Cc: edk2-devel@lists.01.org
>Subject: Re: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard:
>fix byte order of default MAC addresses
>
>
>
>> On Dec 10, 2018, at 3:33 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>>
>> On Mon, Dec 10, 2018 at 11:51:43PM +0100, Ard Biesheuvel wrote:
>>> On Mon, 10 Dec 2018 at 23:14, Leif Lindholm <leif.lindholm@linaro.org>
>wrote:
>>>>
>>>> On Wed, Dec 05, 2018 at 09:10:48PM +0100, Ard Biesheuvel wrote:
>>>>> The PCDs containing the default MAC addresses are of type UINT64,
>>>>> and so the byte order needs to be inverted. As they are currently,
>>>>> both default MAC addresses are invalid since they have the multicast
>>>>> bit set.
>>>>
>>>> Ah, oops.
>>>> That would also prevent them from being "locally administered" and
>>>> hence permissible without registering an entry in the OUI.
>>>>
>>>> However, to reduce someone interpreting the _new_ values that way
>>>> instead, could you do one of:
>>>> - Adding a comment explaining these are in reverse byte order.
>>>> or
>>>> - Convert them to the new Array type PCD[1], to make the bytes appear
>>>>  in natural order?
>>>>
>>>> [1] edk2 72a1d77694d51914c0dd6aa97dbfa58634b0a4a5
>>>
>>> How does one refer to such a PCD from C code?
>>
>> Good question :)
>>
>
>Seems like you would need cast the pointer to the data structure in the C
>code. If I understand correctly the change in the PCD creation code is you can
>now better structure the data, but it is no different on the consumer end and
>you got a blob of bytes in both cases.
>
>Thanks,
>
>Andrew Fish
>
>> /
>>    Leif
>>
>>>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>>>> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>>>> ---
>>>>> Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 4 ++--
>>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>>>>> index 05433d4472e8..2843e51f93f7 100644
>>>>> --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>>>>> +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc
>>>>> @@ -469,8 +469,8 @@ DEFINE DO_CAPSULE   = FALSE
>>>>>   gAmdModulePkgTokenSpaceGuid.PcdPort1NetSpeed|1
>>>>>
>>>>> [PcdsDynamicDefault.common]
>>>>> -  gAmdStyxTokenSpaceGuid.PcdEthMacA|0x02A1A2A3A4A5
>>>>> -  gAmdStyxTokenSpaceGuid.PcdEthMacB|0x02B1B2B3B4B5
>>>>> +  gAmdStyxTokenSpaceGuid.PcdEthMacA|0xA5A4A3A2A102
>>>>> +  gAmdStyxTokenSpaceGuid.PcdEthMacB|0xB5B4B3B2B102
>>>>>
>>>>> [PcdsPatchableInModule]
>>>>>   gAmdModulePkgTokenSpaceGuid.PcdXgbeUseMacFromIscp|TRUE
>>>>> --
>>>>> 2.19.2
>>>>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-11  0:53         ` Gao, Liming
@ 2018-12-11  7:54           ` Ard Biesheuvel
  2018-12-11 13:15             ` Gao, Liming
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2018-12-11  7:54 UTC (permalink / raw)
  To: Gao, Liming; +Cc: Andrew Fish, Leif Lindholm, edk2-devel@lists.01.org

On Tue, 11 Dec 2018 at 01:53, Gao, Liming <liming.gao@intel.com> wrote:
>
> If PCD is related to one structure in DEC/DSC, it can be refer as structure pointer in C source code. Here is wiki for its usage: https://github.com/lgao4/edk2/wiki/StrucutrePcd-Usage
>

OK so I now have this in my .dec file

[PcdsDynamic]
  gAmdStyxTokenSpaceGuid.PcdEthMacA|{0}|UINT8[6]|0x000d0001
  gAmdStyxTokenSpaceGuid.PcdEthMacB|{0}|UINT8[6]|0x000d0002

and this in my .dsc file

[PcdsDynamicDefault.common]
  gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
  gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}

and the build errors out immediately with:

Processing meta-data .......

build.py...
 : error F015: /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:15:20:
error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
undeclared (first use in this function)
/home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:41:16:
error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
undeclared (first use in this function)
/home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:74:20:
error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
undeclared (first use in this function)
/home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:100:16:
error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
undeclared (first use in this function)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-11  7:54           ` Ard Biesheuvel
@ 2018-12-11 13:15             ` Gao, Liming
  2018-12-11 13:38               ` Feng, Bob C
  0 siblings, 1 reply; 11+ messages in thread
From: Gao, Liming @ 2018-12-11 13:15 UTC (permalink / raw)
  To: Ard Biesheuvel, Feng, Bob C
  Cc: Andrew Fish, Leif Lindholm, edk2-devel@lists.01.org


BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1390 is submit for it. Bob will fix it. 


> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: Tuesday, December 11, 2018 3:54 PM
> To: Gao, Liming <liming.gao@intel.com>
> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
> 
> On Tue, 11 Dec 2018 at 01:53, Gao, Liming <liming.gao@intel.com> wrote:
> >
> > If PCD is related to one structure in DEC/DSC, it can be refer as structure pointer in C source code. Here is wiki for its usage:
> https://github.com/lgao4/edk2/wiki/StrucutrePcd-Usage
> >
> 
> OK so I now have this in my .dec file
> 
> [PcdsDynamic]
>   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0}|UINT8[6]|0x000d0001
>   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0}|UINT8[6]|0x000d0002
> 
> and this in my .dsc file
> 
> [PcdsDynamicDefault.common]
>   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
>   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
> 
> and the build errors out immediately with:
> 
> Processing meta-data .......
> 
> build.py...
>  : error F015: /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:15:20:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)
> /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:41:16:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)
> /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:74:20:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)
> /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:100:16:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-11 13:15             ` Gao, Liming
@ 2018-12-11 13:38               ` Feng, Bob C
  2018-12-11 13:48                 ` Ard Biesheuvel
  0 siblings, 1 reply; 11+ messages in thread
From: Feng, Bob C @ 2018-12-11 13:38 UTC (permalink / raw)
  To: Gao, Liming, Ard Biesheuvel
  Cc: Andrew Fish, Leif Lindholm, edk2-devel@lists.01.org

Hi Ard,

Would you please try this format?  While I'll check this issue anyway.

 [PcdsDynamic]
   gAmdStyxTokenSpaceGuid.PcdEthMacA|{CODE({0})}|UINT8[6]|0x000d0001
   gAmdStyxTokenSpaceGuid.PcdEthMacB|{CODE({0})}|UINT8[6]|0x000d0002

 and this in my .dsc file
 
 [PcdsDynamicDefault.common]
   gAmdStyxTokenSpaceGuid.PcdEthMacA|{CODE({0x2,0xA1,0xA2,0xA3,0xA4,0xA5})}
   gAmdStyxTokenSpaceGuid.PcdEthMacB|{CODE({0x2,0xB1,0xB2,0xB3,0xB4,0xB5})}


Thanks,
Bob
-----Original Message-----
From: Gao, Liming 
Sent: Tuesday, December 11, 2018 9:15 PM
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Feng, Bob C <bob.c.feng@intel.com>
Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
Subject: RE: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses


BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1390 is submit for it. Bob will fix it. 


> -----Original Message-----
> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> Sent: Tuesday, December 11, 2018 3:54 PM
> To: Gao, Liming <liming.gao@intel.com>
> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
> 
> On Tue, 11 Dec 2018 at 01:53, Gao, Liming <liming.gao@intel.com> wrote:
> >
> > If PCD is related to one structure in DEC/DSC, it can be refer as structure pointer in C source code. Here is wiki for its usage:
> https://github.com/lgao4/edk2/wiki/StrucutrePcd-Usage
> >
> 
> OK so I now have this in my .dec file
> 
> [PcdsDynamic]
>   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0}|UINT8[6]|0x000d0001
>   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0}|UINT8[6]|0x000d0002
> 
> and this in my .dsc file
> 
> [PcdsDynamicDefault.common]
>   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
>   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
> 
> and the build errors out immediately with:
> 
> Processing meta-data .......
> 
> build.py...
>  : error F015: /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:15:20:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)
> /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:41:16:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)
> /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:74:20:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)
> /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:100:16:
> error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> undeclared (first use in this function)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-11 13:38               ` Feng, Bob C
@ 2018-12-11 13:48                 ` Ard Biesheuvel
  2018-12-11 13:57                   ` Feng, Bob C
  0 siblings, 1 reply; 11+ messages in thread
From: Ard Biesheuvel @ 2018-12-11 13:48 UTC (permalink / raw)
  To: Feng, Bob C
  Cc: Gao, Liming, Andrew Fish, Leif Lindholm, edk2-devel@lists.01.org

On Tue, 11 Dec 2018 at 14:38, Feng, Bob C <bob.c.feng@intel.com> wrote:
>
> Hi Ard,
>
> Would you please try this format?  While I'll check this issue anyway.
>
>  [PcdsDynamic]
>    gAmdStyxTokenSpaceGuid.PcdEthMacA|{CODE({0})}|UINT8[6]|0x000d0001
>    gAmdStyxTokenSpaceGuid.PcdEthMacB|{CODE({0})}|UINT8[6]|0x000d0002
>
>  and this in my .dsc file
>
>  [PcdsDynamicDefault.common]
>    gAmdStyxTokenSpaceGuid.PcdEthMacA|{CODE({0x2,0xA1,0xA2,0xA3,0xA4,0xA5})}
>    gAmdStyxTokenSpaceGuid.PcdEthMacB|{CODE({0x2,0xB1,0xB2,0xB3,0xB4,0xB5})}
>

Processing meta-data .......

build.py...
 : error F015: From DEC Default Value {CODE({0})}:28:9: error:
expected expression before ‘{’ token
>From DEC Default Value {CODE({0})}:87:9: error: expected expression
before ‘{’ token


>
> Thanks,
> Bob
> -----Original Message-----
> From: Gao, Liming
> Sent: Tuesday, December 11, 2018 9:15 PM
> To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Feng, Bob C <bob.c.feng@intel.com>
> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
> Subject: RE: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
>
>
> BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1390 is submit for it. Bob will fix it.
>
>
> > -----Original Message-----
> > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> > Sent: Tuesday, December 11, 2018 3:54 PM
> > To: Gao, Liming <liming.gao@intel.com>
> > Cc: Andrew Fish <afish@apple.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
> > Subject: Re: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
> >
> > On Tue, 11 Dec 2018 at 01:53, Gao, Liming <liming.gao@intel.com> wrote:
> > >
> > > If PCD is related to one structure in DEC/DSC, it can be refer as structure pointer in C source code. Here is wiki for its usage:
> > https://github.com/lgao4/edk2/wiki/StrucutrePcd-Usage
> > >
> >
> > OK so I now have this in my .dec file
> >
> > [PcdsDynamic]
> >   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0}|UINT8[6]|0x000d0001
> >   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0}|UINT8[6]|0x000d0002
> >
> > and this in my .dsc file
> >
> > [PcdsDynamicDefault.common]
> >   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
> >   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
> >
> > and the build errors out immediately with:
> >
> > Processing meta-data .......
> >
> > build.py...
> >  : error F015: /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:15:20:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)
> > /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:41:16:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)
> > /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:74:20:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)
> > /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:100:16:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
  2018-12-11 13:48                 ` Ard Biesheuvel
@ 2018-12-11 13:57                   ` Feng, Bob C
  0 siblings, 0 replies; 11+ messages in thread
From: Feng, Bob C @ 2018-12-11 13:57 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Gao, Liming, Andrew Fish, Leif Lindholm, edk2-devel@lists.01.org

OK. I'll get it fixed.

-----Original Message-----
From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] 
Sent: Tuesday, December 11, 2018 9:49 PM
To: Feng, Bob C <bob.c.feng@intel.com>
Cc: Gao, Liming <liming.gao@intel.com>; Andrew Fish <afish@apple.com>; Leif Lindholm <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
Subject: Re: [edk2] [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses

On Tue, 11 Dec 2018 at 14:38, Feng, Bob C <bob.c.feng@intel.com> wrote:
>
> Hi Ard,
>
> Would you please try this format?  While I'll check this issue anyway.
>
>  [PcdsDynamic]
>    gAmdStyxTokenSpaceGuid.PcdEthMacA|{CODE({0})}|UINT8[6]|0x000d0001
>    gAmdStyxTokenSpaceGuid.PcdEthMacB|{CODE({0})}|UINT8[6]|0x000d0002
>
>  and this in my .dsc file
>
>  [PcdsDynamicDefault.common]
>    gAmdStyxTokenSpaceGuid.PcdEthMacA|{CODE({0x2,0xA1,0xA2,0xA3,0xA4,0xA5})}
>    
> gAmdStyxTokenSpaceGuid.PcdEthMacB|{CODE({0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
> )}
>

Processing meta-data .......

build.py...
 : error F015: From DEC Default Value {CODE({0})}:28:9: error:
expected expression before ‘{’ token
From DEC Default Value {CODE({0})}:87:9: error: expected expression before ‘{’ token


>
> Thanks,
> Bob
> -----Original Message-----
> From: Gao, Liming
> Sent: Tuesday, December 11, 2018 9:15 PM
> To: Ard Biesheuvel <ard.biesheuvel@linaro.org>; Feng, Bob C 
> <bob.c.feng@intel.com>
> Cc: Andrew Fish <afish@apple.com>; Leif Lindholm 
> <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
> Subject: RE: [edk2] [PATCH edk2-platforms] 
> Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
>
>
> BZ https://bugzilla.tianocore.org/show_bug.cgi?id=1390 is submit for it. Bob will fix it.
>
>
> > -----Original Message-----
> > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org]
> > Sent: Tuesday, December 11, 2018 3:54 PM
> > To: Gao, Liming <liming.gao@intel.com>
> > Cc: Andrew Fish <afish@apple.com>; Leif Lindholm 
> > <leif.lindholm@linaro.org>; edk2-devel@lists.01.org
> > Subject: Re: [edk2] [PATCH edk2-platforms] 
> > Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
> >
> > On Tue, 11 Dec 2018 at 01:53, Gao, Liming <liming.gao@intel.com> wrote:
> > >
> > > If PCD is related to one structure in DEC/DSC, it can be refer as structure pointer in C source code. Here is wiki for its usage:
> > https://github.com/lgao4/edk2/wiki/StrucutrePcd-Usage
> > >
> >
> > OK so I now have this in my .dec file
> >
> > [PcdsDynamic]
> >   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0}|UINT8[6]|0x000d0001
> >   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0}|UINT8[6]|0x000d0002
> >
> > and this in my .dsc file
> >
> > [PcdsDynamicDefault.common]
> >   gAmdStyxTokenSpaceGuid.PcdEthMacA|{0x2,0xA1,0xA2,0xA3,0xA4,0xA5}
> >   gAmdStyxTokenSpaceGuid.PcdEthMacB|{0x2,0xB1,0xB2,0xB3,0xB4,0xB5}
> >
> > and the build errors out immediately with:
> >
> > Processing meta-data .......
> >
> > build.py...
> >  : error F015: /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:15:20:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)
> > /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:41:16:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacB_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)
> > /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:74:20:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)
> > /home/ard/build/edk2-workspace/Build/Overdrive/RELEASE_GCC5/PcdValueInit/PcdValueInit.c:100:16:
> > error: ‘gAmdStyxTokenSpaceGuid_PcdEthMacA_DEFAULT_STANDARD_Value’
> > undeclared (first use in this function)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-12-11 13:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 20:10 [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses Ard Biesheuvel
2018-12-10 22:14 ` Leif Lindholm
2018-12-10 22:51   ` Ard Biesheuvel
2018-12-10 23:33     ` Leif Lindholm
2018-12-10 23:38       ` Andrew Fish
2018-12-11  0:53         ` Gao, Liming
2018-12-11  7:54           ` Ard Biesheuvel
2018-12-11 13:15             ` Gao, Liming
2018-12-11 13:38               ` Feng, Bob C
2018-12-11 13:48                 ` Ard Biesheuvel
2018-12-11 13:57                   ` Feng, Bob C

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox