From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.151.62.68; helo=nwk-aaemail-lapp03.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from nwk-aaemail-lapp03.apple.com (nwk-aaemail-lapp03.apple.com [17.151.62.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0952321A02937 for ; Mon, 10 Dec 2018 15:38:55 -0800 (PST) Received: from pps.filterd (nwk-aaemail-lapp03.apple.com [127.0.0.1]) by nwk-aaemail-lapp03.apple.com (8.16.0.22/8.16.0.22) with SMTP id wBANahdC058192; Mon, 10 Dec 2018 15:38:54 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=hZTP4PP8MNe3egkCa7TOXRpTN4/Sfe749p3Vb4C6qxQ=; b=q5wLqgnMmnuEn21Kx0aPEjAw7X/ePQHEIiY9lW98WfnJvZWliglc4/I9Yr2Ze7XfTZFu smWlC4KONXnE9wZgRJkrVBQdT+eY3bL1CbH+hJewJ3HwSGuadsuT+Al6aJvKXCysKhZL 2GEGQnyEyuAD8/o5dznFmSkbhL7cgFywlGBzmOLbGaJ9ZleEXP66XVcOZaJ2dfEzWqVc PpfJxW+XPovznLPX9IZQMjO2aO4vVIC/mYLTaSsAymblmqCwKhnD9OToo99auLoOtmXs 0afmHfQi6Zq/V4iDxGydt2WbAn1p1Aic3QSSr7wb867Rh19+rC1aOQ8ZyrYV2E0poPrR Bg== Received: from mr2-mtap-s01.rno.apple.com (mr2-mtap-s01.rno.apple.com [17.179.226.133]) by nwk-aaemail-lapp03.apple.com with ESMTP id 2p8bca0cx0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 10 Dec 2018 15:38:54 -0800 MIME-version: 1.0 Received: from nwk-mmpp-sz13.apple.com (nwk-mmpp-sz13.apple.com [17.128.115.216]) by mr2-mtap-s01.rno.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PJJ00CTVOCUZU70@mr2-mtap-s01.rno.apple.com>; Mon, 10 Dec 2018 15:38:54 -0800 (PST) Received: from process_viserion-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PJJ00I00O0UMD00@nwk-mmpp-sz13.apple.com>; Mon, 10 Dec 2018 15:38:54 -0800 (PST) X-Va-A: X-Va-T-CD: 04ca32df9c4d947bbb3e328bdd0d72ed X-Va-E-CD: 2b0c8c2d8e8ced698b919c07da65e5a4 X-Va-R-CD: fd8d6cc08f0383cd55f125aa282130bb X-Va-CD: 0 X-Va-ID: e0b727ed-4322-480b-a7bd-d16536e1dc90 X-V-A: X-V-T-CD: b42b19783b60c2d3c1a139466a0c562a X-V-E-CD: 2b0c8c2d8e8ced698b919c07da65e5a4 X-V-R-CD: fd8d6cc08f0383cd55f125aa282130bb X-V-CD: 0 X-V-ID: b54f6d29-ac9b-4bff-ae2f-d97a9adfa8c2 Received: from process_milters-daemon.nwk-mmpp-sz13.apple.com by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PJJ00000OC94P00@nwk-mmpp-sz13.apple.com>; Mon, 10 Dec 2018 15:38:53 -0800 (PST) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-12-10_08:,, signatures=0 Received: from [17.226.23.47] (unknown [17.226.23.47]) by nwk-mmpp-sz13.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PJJ002NOOCT38C0@nwk-mmpp-sz13.apple.com>; Mon, 10 Dec 2018 15:38:53 -0800 (PST) Sender: afish@apple.com From: Andrew Fish Message-id: Date: Mon, 10 Dec 2018 15:38:30 -0800 In-reply-to: <20181210233355.4v5guv5nwmbun5w3@bivouac.eciton.net> Cc: Ard Biesheuvel , "edk2-devel@lists.01.org" To: Leif Lindholm References: <20181205201049.10590-1-ard.biesheuvel@linaro.org> <20181210221441.2xwqqzgafxpvqguu@bivouac.eciton.net> <20181210233355.4v5guv5nwmbun5w3@bivouac.eciton.net> X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-12-10_08:, , signatures=0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:38:56 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Dec 10, 2018, at 3:33 PM, Leif Lindholm wrote: > > 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 :) > 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 >>>> --- >>>> 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