From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.41608.1599486531660241288 for ; Mon, 07 Sep 2020 06:48:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F9/b8jH8; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599486530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=QO9UZwVlqOUwceJXv1kb/Q1DckrkiGUzEZ8PN6rzSzk=; b=F9/b8jH8qaTazs0axw78Yyo8iju4L+LL3n3xRU7UAhNjZpxu8PhmN+I0FyP3JngIp/N5Ho miiHaBdg42k0nvn7f7DOM386Yl8PoMIx5e8OWlucRxaLF7EwC0AbYe9Hpx9weKYAOaZuQ0 uRvGR/qAsn94dGy5MSjUrgyR81CQq+w= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-319-eL_cEzJlP2SHvccV7in25A-1; Mon, 07 Sep 2020 09:48:48 -0400 X-MC-Unique: eL_cEzJlP2SHvccV7in25A-1 Received: by mail-ed1-f70.google.com with SMTP id y15so3468716edq.4 for ; Mon, 07 Sep 2020 06:48:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=QO9UZwVlqOUwceJXv1kb/Q1DckrkiGUzEZ8PN6rzSzk=; b=FgnDppmeYHurF8Su9FJotXtdG1BhwEWhNa090wORrsELvGnEE75Xlvy6b2mna3mk89 bSZVzCTHDUmE1FxQsM+veLNKWk76vV6p2b3K4GM0Lz6wDdnKT5kwADBf8a5NL1rlPf8I WEo9J3sezCV7uAGYal/RIcuf0LpsyxBLBoKGJdbWY4jNfsNAB6WDpSnry/5VbRfcxXbP jG03hJ/SrIyiO42csvqIDFqUyV08ydd6uRczjT/dag9WazD0lK8/rVUHlbtppvHK0bcY 9FxQdiBzrNiP2naJ8glz2XqVkszSgp6qx8ZlBCDOlK2tKH8HszNxeZj+8hS6SFHmUwrz VP5A== X-Gm-Message-State: AOAM531NYRfqwTYjBkM4tQSxM+rBJlq3iq/tcauFFPzDIwATuzo+5rnU no2Tg46NmyXbkKHteDfw78dVsf2PDnQ6Evhk2IJ1r+F+4bs00wDt8qjxRMynlUTRs5wfQFv5RFD G/6rCrJVhUp+bJA== X-Received: by 2002:a05:6402:1bc2:: with SMTP id ch2mr21272959edb.60.1599486527767; Mon, 07 Sep 2020 06:48:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJspWOwU/TAyRmOrf64SqIXoAdWIVMghVmKG3tCFXSquQVyYKV3L6tOVgPDViE2Nsh7EW4Hw== X-Received: by 2002:a05:6402:1bc2:: with SMTP id ch2mr21272939edb.60.1599486527588; Mon, 07 Sep 2020 06:48:47 -0700 (PDT) Return-Path: Received: from [192.168.1.36] (65.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.65]) by smtp.gmail.com with ESMTPSA id w14sm15376485ejn.36.2020.09.07.06.48.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Sep 2020 06:48:47 -0700 (PDT) Subject: Re: [edk2-devel] [Patch] BaseTools: Sort the Pcd set when generating the VPD binary To: devel@edk2.groups.io, bob.c.feng@intel.com Cc: Liming Gao , Yuwei Chen References: <20200904143028.41796-1-bob.c.feng@intel.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Aut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Y0LBbEj5POwyKGiDMjHKCGuzSuDRbCn0Mz4kCa7nFMF5Jv piC+JemRdiBd6102ThqgIsyGEBXuf1sy0QIVyXgaqr9O2b/0VoXpQId7yY7OJuYYxs7kQoXI 6WzSMpmuXGkmfxOgbc/L6YbzB0JOriX0iRClxu4dEUg8Bs2pNnr6huY2Ft+qb41RzCJvvMyu gS32LfN0bTZ6Qm2A8ayMtUQgnwZDSO23OKgQWZVglGliY3ezHZ6lVwC24Vjkmq/2yBSLakZE 6DZUjZzCW1nvtRK05ebyK6tofRsx8xB8pL/kcBb9nCuh70aLR+5cmE41X4O+MVJbwfP5s/RW 9BFSL3qgXuXso/3XuWTQjJJGgKhB6xXjMmb1J4q/h5IuVV4juv1Fem9sfmyrh+Wi5V1IzKI7 RPJ3KVb937eBgSENk53P0gUorwzUcO+ASEo3Z1cBKkJSPigDbeEjVfXQMzNt0oDRzpQqH2vp apo2jHnidWt8BsckuWZpxcZ9+/9obQ55DyVQHGiTN39hkETy3Emdnz1JVHTU0Q== Message-ID: Date: Mon, 7 Sep 2020 15:48:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200904143028.41796-1-bob.c.feng@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0.003 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US On 9/4/20 4:30 PM, Bob Feng wrote: > If VPD PcdNvStoreDefaultValueBuffer is used, all DynamicHii and > DynamicExHii PCD value will be generated into that VPD. > > In order to generate the same VPD binary file in every build, > sort the Pcd set when generating VPD. > > Signed-off-by: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen Reviewed-by: Philippe Mathieu-Daude > --- > BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 +- > BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > index af66c48c7d..26ab8e7f36 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -251,11 +251,11 @@ class PlatformAutoGen(AutoGen): > > VariableInfo = VariableMgr(self.DscBuildDataObj._GetDefaultStores(), self.DscBuildDataObj.SkuIds) > VariableInfo.SetVpdRegionMaxSize(VpdRegionSize) > VariableInfo.SetVpdRegionOffset(VpdRegionBase) > Index = 0 > - for Pcd in DynamicPcdSet: > + for Pcd in sorted(DynamicPcdSet): > pcdname = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName)) > for SkuName in Pcd.SkuInfoList: > Sku = Pcd.SkuInfoList[SkuName] > SkuId = Sku.SkuId > if SkuId is None or SkuId == '': > diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 1afbd3eefc..4a128c8a77 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2582,11 +2582,11 @@ class DscBuildData(PlatformBuildClassObject): > IncludeFiles.add(IncludeFile) > CApp = CApp + '#include <%s>\n' % (IncludeFile) > CApp = CApp + '\n' > for Pcd in StructuredPcds.values(): > CApp = CApp + self.GenerateArrayAssignment(Pcd) > - for PcdName in StructuredPcds: > + for PcdName in sorted(StructuredPcds.keys()): > Pcd = StructuredPcds[PcdName] > CApp = CApp + self.GenerateSizeFunction(Pcd) > CApp = CApp + self.GenerateDefaultValueAssignFunction(Pcd) > CApp = CApp + self.GenerateFdfValue(Pcd) > CApp = CApp + self.GenerateCommandLineValue(Pcd) >