From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::143; helo=mail-it1-x143.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x143.google.com (mail-it1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1D77B2115C07D for ; Mon, 10 Dec 2018 14:52:16 -0800 (PST) Received: by mail-it1-x143.google.com with SMTP id x124so9212293itd.1 for ; Mon, 10 Dec 2018 14:52:15 -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=b+VVs2Rg3c9Du/fkB++o3NVqwplhAXz9RAMCG4g3jak=; b=JmySLjnLiTjjulSehWqkxdI1uY2rxdF91B8CKXlzRNN1mS4HEzqPfwLE397TGWfcPO lnYaToEZ+C3e5UsiZ5BZORL+vM/9sE9f8lo+9AaNXu67vrMECxic72Ul4ly1oGrQ4qk7 v9sag4WmNPZE1v+JsQ7ktofRkFYbz17gPuQ9k= 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=b+VVs2Rg3c9Du/fkB++o3NVqwplhAXz9RAMCG4g3jak=; b=mYuRHU2e1uXY2ZQXmBa2zSaSmbvrjwwkQQ77JkhhE2NaTXJxTYOlzB0TPn/7/NjSTV 4iMt2Yve/OzhOLpXOYKXT3Er5A2v44+KfMlWO67D97q7ggXEtaztJQKFb2zoUKRSsQCA 7REczFoAAZYbf8OfH/6NZEJlEIttS4zhJpCxbu0vq34mYBR7Ds86wpLUbj8f5wO/rfo6 nudG7SkovGIcRPaNTTWrUa49q7ie3fnm4EX85yS3oP/YUy9DeISAF9bMb/dGZF1JYsBo fKB3MjnAbeWErSUV8YwrLhr8V8SUPO/qkIWJRFMCljB7jfmUbvyF7jdjIoIuuMpvaptM teyA== X-Gm-Message-State: AA+aEWZXfIKKxC1agdeVgSqItuJyAw0Ay3GmMIkPgmtlZpxoJ4H89CFo 8Bedhhcmtgrsr5mKzAMZsZdFpkVqwqqrugPgCvDkvA== X-Google-Smtp-Source: AFSGD/VXfnToP7eOz4juyu2qDPmPvgxxkfEdEjM3IUURghOxp/kd6/F7bp+ZSXMaf4PEdY+KvVK5k51jhbrHaXlwhFo= X-Received: by 2002:a02:734b:: with SMTP id a11mr12586813jae.62.1544482335136; Mon, 10 Dec 2018 14:52:15 -0800 (PST) MIME-Version: 1.0 References: <20181205201049.10590-1-ard.biesheuvel@linaro.org> <20181210221441.2xwqqzgafxpvqguu@bivouac.eciton.net> In-Reply-To: <20181210221441.2xwqqzgafxpvqguu@bivouac.eciton.net> From: Ard Biesheuvel Date: Mon, 10 Dec 2018 23:51:43 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" Subject: Re: [PATCH edk2-platforms] Platform/AMD/OverdriveBoard: fix byte order of default MAC addresses X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Dec 2018 22:52:16 -0000 Content-Type: text/plain; charset="UTF-8" On Mon, 10 Dec 2018 at 23:14, Leif Lindholm 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 > > --- > > 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 > >