From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 3334D21A02937 for ; Mon, 10 Dec 2018 15:33:59 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id y1so375884wmi.3 for ; Mon, 10 Dec 2018 15:33:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fdxPm8L5ksE2ivdz8uEdjzpsILEW4XlYdKMEhDqWlTs=; b=QvUKVqVkBQXkI2ZQwDJrGhZCV3170wmriyXrR0tLgc0aXVrmqx2QB4NBfOXYQrexoZ DediQx8TSS5JPPREhGwZt/v3Vax53Wv/3msXjoDCKfWPXdmzyQ2m0+pNvbcgC6WMhaD6 iMMJccvm5XcjRNNcCG/P8vndmBRxnlC4hM2rE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fdxPm8L5ksE2ivdz8uEdjzpsILEW4XlYdKMEhDqWlTs=; b=f5xTFUCBrnD5ZX567wD2UaXyD9zHLpX6C+Mi487eNnBvL4RdyDPdze5lU5YFMXNTFe QZPkhTFPcA3beefyofKmzx9XBsZwyEoJRUoOuVJS54AJMQBQ8AdTAFez1BF/v/HcAIPZ fUBAFierA86l6pHN9PHpgEP772CgdhN9YEKcekB/joEZeoHBMnNM9xPI14tM6ZJZS1Aj 9TGWgkau6HDfSZgqu6K8rTBZK/VARirbVqairYannKSC1wNQ7JfSudzpTaQPwiIvxekq 2y5qtKwfLLV9IG3mJ76FZffs+qOJUmlc7fYJ/7THKvguYJFN0xsc32zsZ1URzdXfDWab PbAw== X-Gm-Message-State: AA+aEWa8i1huJ704aD+Q3FXUzIn04oZKQtnEfolf+oxDaHgXvDneA6hQ pjFI2ALR3J8EBDMnSCDjsewqGg== X-Google-Smtp-Source: AFSGD/VK4Xqw1h6sWWMGesHo8YjNbiaUhtTkl8p/65+XHXAi8OlTZ7HLcjBVMijxyfNPaKaN5pstGA== X-Received: by 2002:a1c:888d:: with SMTP id k135mr291494wmd.137.1544484838054; Mon, 10 Dec 2018 15:33:58 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h12sm787268wma.48.2018.12.10.15.33.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Dec 2018 15:33:57 -0800 (PST) Date: Mon, 10 Dec 2018 23:33:55 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" Message-ID: <20181210233355.4v5guv5nwmbun5w3@bivouac.eciton.net> References: <20181205201049.10590-1-ard.biesheuvel@linaro.org> <20181210221441.2xwqqzgafxpvqguu@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) 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 23:34:00 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Dec 10, 2018 at 11:51:43PM +0100, Ard Biesheuvel wrote: > 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? Good question :) / Leif > > > 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 > > >