public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same with Source
Date: Tue, 2 Aug 2016 09:31:48 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A1155E43F4@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1469521061-72696-1-git-send-email-yonghong.zhu@intel.com>

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Zhu, Yonghong
> Sent: Tuesday, July 26, 2016 4:18 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: [Patch] BaseTools: Keep the Pcd order in the Asbuilt Inf is same with
> Source
> 
> The original behavior is that in the Asbuilt inf Pcd's order is base on
> the Pcd's offset. Now we change the order to keep it is same with the Pcd
> order in the source inf file.
> 
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGen.py | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index 8da441f..9758861 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -3571,17 +3571,17 @@ class ModuleAutoGen(AutoGen):
>          ### TODO: How to handles mixed source and binary modules
> 
>          # Find all DynamicEx and PatchableInModule PCDs used by this module
> and dependent libraries
>          # Also find all packages that the DynamicEx PCDs depend on
>          Pcds = []
> -        PatchablePcds = {}
> +        PatchablePcds = []
>          Packages = []
>          PcdCheckList = []
>          PcdTokenSpaceList = []
>          for Pcd in self.ModulePcdList + self.LibraryPcdList:
>              if Pcd.Type == TAB_PCDS_PATCHABLE_IN_MODULE:
> -                PatchablePcds[Pcd.TokenCName] = Pcd
> +                PatchablePcds += [Pcd]
>                  PcdCheckList.append((Pcd.TokenCName,
> Pcd.TokenSpaceGuidCName, 'PatchableInModule'))
>              elif Pcd.Type in GenC.gDynamicExPcd:
>                  if Pcd not in Pcds:
>                      Pcds += [Pcd]
>                      PcdCheckList.append((Pcd.TokenCName,
> Pcd.TokenSpaceGuidCName, 'DynamicEx'))
> @@ -3730,19 +3730,21 @@ class ModuleAutoGen(AutoGen):
>          PatchList = parsePcdInfoFromMapFile(
>                              os.path.join(self.OutputDir, self.Name + '.map'),
>                              os.path.join(self.OutputDir, self.Name + '.efi')
>                          )
>          if PatchList:
> -            for PatchPcd in PatchList:
> -                if PatchPcd[0] in PatchablePcds:
> -                    key = PatchPcd[0]
> -                elif PatchPcd[0] + '_PatchableInModule' in PatchablePcds:
> -                    key = PatchPcd[0] + '_PatchableInModule'
> +            for Pcd in PatchablePcds:
> +                TokenCName = Pcd.TokenCName
> +                for PcdItem in GlobalData.MixedPcd:
> +                    if (Pcd.TokenCName, Pcd.TokenSpaceGuidCName) in
> GlobalData.MixedPcd[PcdItem]:
> +                        TokenCName = PcdItem[0]
> +                        break
> +                for PatchPcd in PatchList:
> +                    if TokenCName == PatchPcd[0]:
> +                        break
>                  else:
>                      continue
> -                Pcd = PatchablePcds[key]
> -                TokenCName = PatchPcd[0]
>                  PcdValue = ''
>                  if Pcd.DatumType != 'VOID*':
>                      HexFormat = '0x%02x'
>                      if Pcd.DatumType == 'UINT16':
>                          HexFormat = '0x%04x'
> --
> 2.6.1.windows.1



           reply	other threads:[~2016-08-02  9:31 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1469521061-72696-1-git-send-email-yonghong.zhu@intel.com>]

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=4A89E2EF3DFEDB4C8BFDE51014F606A1155E43F4@shsmsx102.ccr.corp.intel.com \
    --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