public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses
Date: Mon, 10 Dec 2018 23:33:55 +0000	[thread overview]
Message-ID: <20181210233355.4v5guv5nwmbun5w3@bivouac.eciton.net> (raw)
In-Reply-To: <CAKv+Gu-znow_sFj0Xzzvga7ggHDvZgeTY2TRj4mT_wcgDfk4Pw@mail.gmail.com>

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
> > >


  reply	other threads:[~2018-12-10 23:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181210233355.4v5guv5nwmbun5w3@bivouac.eciton.net \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox