public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: "'Yuwei Chen'" <yuwei.chen@intel.com>, <devel@edk2.groups.io>
Cc: "'Bob Feng'" <bob.c.feng@intel.com>
Subject: 回复: [PATCH 1/1] BaseTools: Fix StructurePcd offset error.
Date: Fri, 29 Oct 2021 10:01:50 +0800	[thread overview]
Message-ID: <00ae01d7cc68$efdbbf20$cf933d60$@byosoft.com.cn> (raw)
In-Reply-To: <20211027100003.167-1-yuwei.chen@intel.com>

Yuwei: 

> -----邮件原件-----
> 发件人: Yuwei Chen <yuwei.chen@intel.com>
> 发送时间: 2021年10月27日 18:00
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>
> 主题: [PATCH 1/1] BaseTools: Fix StructurePcd offset error.
> 
> Currently when parse VFR files to get the struct info,
> BOOLEAN type struct is ignored, which caused offset errors.
> This patch fixed these bugs.
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
> ---
>  BaseTools/Scripts/ConvertFceToStructurePcd.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/BaseTools/Scripts/ConvertFceToStructurePcd.py
> b/BaseTools/Scripts/ConvertFceToStructurePcd.py
> index 2baabf2dd521..9e7fe58768b1 100644
> --- a/BaseTools/Scripts/ConvertFceToStructurePcd.py
> +++ b/BaseTools/Scripts/ConvertFceToStructurePcd.py
> @@ -142,7 +142,7 @@ class parser_lst(object):
>                        line.append(struct)
>                        unparse.append(line)
>                    else:
> -                    if uint not in ['UINT8', 'UINT16', 'UINT32',
> 'UINT64']:
> +                    if uint not in ['UINT8', 'UINT16', 'UINT32',
'UINT64',
> 'BOOLEAN']:
>                        line = [offset, t_name, 0, uint]
>                        line.append(struct)
>                        unparse.append(line)
> @@ -569,7 +569,7 @@ class mainprocess(object):
>      for i in List:
>        for j in i:
>          tmp = j.split("|")
> -        if (('L"' in j) and ("[" in j)) or (tmp[1].strip() == '{0x0,
0x0}'):
> +        if (('L"' in j) and ("[" in j)) or (tmp[1].split("#")[0].strip()
== '{0x0,
> 0x0}'):

Why split '#'?

Thanks
Liming
>            tmp[0] = tmp[0][:tmp[0].index('[')]
>            List[List.index(i)][i.index(j)] = "|".join(tmp)
>          else:
> --
> 2.27.0.windows.1




  reply	other threads:[~2021-10-29  2:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 10:00 [PATCH 1/1] BaseTools: Fix StructurePcd offset error Yuwei Chen
2021-10-29  2:01 ` gaoliming [this message]
2021-10-29  5:35   ` Yuwei Chen
2021-11-02  1:26     ` 回复: [edk2-devel] " gaoliming
2021-11-08  2:38 ` Bob Feng

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='00ae01d7cc68$efdbbf20$cf933d60$@byosoft.com.cn' \
    --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