* [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
@ 2022-06-27 3:09 gua.guo
2022-06-27 3:43 ` Ni, Ray
0 siblings, 1 reply; 6+ messages in thread
From: gua.guo @ 2022-06-27 3:09 UTC (permalink / raw)
To: devel; +Cc: gua.guo, Guo Dong, Ray Ni, James Lu
From: Gua Guo <gua.guo@intel.com>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3963
Based on UPL spec 2.12.2. Universal Payload Information Section,
it defines item "Attribute" on UPLD_INFO_HEADER for Debug build
should be "1", and Release build should be "0".
Currently, The value of item "Attribute" is always "0"
Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: James Lu <james.lu@intel.com>
Signed-off-by: Gua Guo <gua.guo@intel.com>
---
UefiPayloadPkg/UniversalPayloadBuild.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/UefiPayloadPkg/UniversalPayloadBuild.py b/UefiPayloadPkg/UniversalPayloadBuild.py
index ab4c977ba5..6003de36d1 100644
--- a/UefiPayloadPkg/UniversalPayloadBuild.py
+++ b/UefiPayloadPkg/UniversalPayloadBuild.py
@@ -111,6 +111,7 @@ def BuildUniversalPayload(Args, MacroList):
#
upld_info_hdr = UPLD_INFO_HEADER()
upld_info_hdr.ImageId = Args.ImageId.encode()[:16]
+ upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
fp = open(UpldInfoFile, 'wb')
fp.write(bytearray(upld_info_hdr))
fp.close()
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
2022-06-27 3:09 [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec gua.guo
@ 2022-06-27 3:43 ` Ni, Ray
2022-06-27 4:06 ` Guo, Gua
0 siblings, 1 reply; 6+ messages in thread
From: Ni, Ray @ 2022-06-27 3:43 UTC (permalink / raw)
To: Guo, Gua, devel@edk2.groups.io; +Cc: Dong, Guo, Lu, James
> + upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
I am not python expert. Above statement might be interpreted as:
1. (upld_info.hdr.Attribute |= 1) if BuildTarget == "DEBUG" else 0
2. upld_info_hdr.Attribute |= (1 if BuildTarget == "DEBUG" else 0)
Are we sure that the #2 is chosen in by the python interpreter?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
2022-06-27 3:43 ` Ni, Ray
@ 2022-06-27 4:06 ` Guo, Gua
2022-06-27 5:03 ` Guo, Gua
0 siblings, 1 reply; 6+ messages in thread
From: Guo, Gua @ 2022-06-27 4:06 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io; +Cc: Dong, Guo, Lu, James
The python logic will like for below
> upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
=========>
> if BuildTarget == "DEBUG":
> upld_info_hdr.Attribute |= 1
> else:
> upld_info_hdr.Attribute |= 0
Thanks,
Gua
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com>
Sent: Monday, June 27, 2022 11:44 AM
To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
> + upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
I am not python expert. Above statement might be interpreted as:
1. (upld_info.hdr.Attribute |= 1) if BuildTarget == "DEBUG" else 0 2. upld_info_hdr.Attribute |= (1 if BuildTarget == "DEBUG" else 0)
Are we sure that the #2 is chosen in by the python interpreter?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
2022-06-27 4:06 ` Guo, Gua
@ 2022-06-27 5:03 ` Guo, Gua
2022-06-27 6:52 ` Ni, Ray
0 siblings, 1 reply; 6+ messages in thread
From: Guo, Gua @ 2022-06-27 5:03 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io; +Cc: Dong, Guo, Lu, James
Yes, #2 is chosen in by the python interpreter.
-----Original Message-----
From: Guo, Gua
Sent: Monday, June 27, 2022 12:07 PM
To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
The python logic will like for below
> upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
=========>
> if BuildTarget == "DEBUG":
> upld_info_hdr.Attribute |= 1
> else:
> upld_info_hdr.Attribute |= 0
Thanks,
Gua
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com>
Sent: Monday, June 27, 2022 11:44 AM
To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
> + upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
I am not python expert. Above statement might be interpreted as:
1. (upld_info.hdr.Attribute |= 1) if BuildTarget == "DEBUG" else 0 2. upld_info_hdr.Attribute |= (1 if BuildTarget == "DEBUG" else 0)
Are we sure that the #2 is chosen in by the python interpreter?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
2022-06-27 5:03 ` Guo, Gua
@ 2022-06-27 6:52 ` Ni, Ray
2022-06-27 7:27 ` Guo, Gua
0 siblings, 1 reply; 6+ messages in thread
From: Ni, Ray @ 2022-06-27 6:52 UTC (permalink / raw)
To: Guo, Gua, devel@edk2.groups.io; +Cc: Dong, Guo, Lu, James
Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Guo, Gua <gua.guo@intel.com>
> Sent: Monday, June 27, 2022 1:03 PM
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
> Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
>
> Yes, #2 is chosen in by the python interpreter.
>
> -----Original Message-----
> From: Guo, Gua
> Sent: Monday, June 27, 2022 12:07 PM
> To: Ni, Ray <ray.ni@intel.com>; devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
> Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
>
> The python logic will like for below
>
> > upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
> =========>
> > if BuildTarget == "DEBUG":
> > upld_info_hdr.Attribute |= 1
> > else:
> > upld_info_hdr.Attribute |= 0
>
> Thanks,
> Gua
>
> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com>
> Sent: Monday, June 27, 2022 11:44 AM
> To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
> Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
> Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
>
> > + upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
>
>
> I am not python expert. Above statement might be interpreted as:
> 1. (upld_info.hdr.Attribute |= 1) if BuildTarget == "DEBUG" else 0 2. upld_info_hdr.Attribute |= (1 if BuildTarget ==
> "DEBUG" else 0)
>
> Are we sure that the #2 is chosen in by the python interpreter?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
2022-06-27 6:52 ` Ni, Ray
@ 2022-06-27 7:27 ` Guo, Gua
0 siblings, 0 replies; 6+ messages in thread
From: Guo, Gua @ 2022-06-27 7:27 UTC (permalink / raw)
To: Ni, Ray, devel@edk2.groups.io; +Cc: Dong, Guo, Lu, James
[-- Attachment #1: Type: text/plain, Size: 2669 bytes --]
@Ni, Ray<mailto:ray.ni@intel.com>
Below url is pull request link. May I get your help to add push label ? Have any concern, please also share for me.
URL: https://github.com/tianocore/edk2/pull/3015
Thanks,
Gua
-----Original Message-----
From: Ni, Ray <ray.ni@intel.com>
Sent: Monday, June 27, 2022 2:53 PM
To: Guo, Gua <gua.guo@intel.com>; devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Lu, James <james.lu@intel.com>
Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec
Reviewed-by: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>>
> -----Original Message-----
> From: Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>
> Sent: Monday, June 27, 2022 1:03 PM
> To: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>
> Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL
> spec
>
> Yes, #2 is chosen in by the python interpreter.
>
> -----Original Message-----
> From: Guo, Gua
> Sent: Monday, June 27, 2022 12:07 PM
> To: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>
> Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL
> spec
>
> The python logic will like for below
>
> > upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
> =========>
> > if BuildTarget == "DEBUG":
> > upld_info_hdr.Attribute |= 1
> > else:
> > upld_info_hdr.Attribute |= 0
>
> Thanks,
> Gua
>
> -----Original Message-----
> From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
> Sent: Monday, June 27, 2022 11:44 AM
> To: Guo, Gua <gua.guo@intel.com<mailto:gua.guo@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> Cc: Dong, Guo <guo.dong@intel.com<mailto:guo.dong@intel.com>>; Lu, James <james.lu@intel.com<mailto:james.lu@intel.com>>
> Subject: RE: [PATCH] UefiPayloadPkg: Align Attribute value with UPL
> spec
>
> > + upld_info_hdr.Attribute |= 1 if BuildTarget == "DEBUG" else 0
>
>
> I am not python expert. Above statement might be interpreted as:
> 1. (upld_info.hdr.Attribute |= 1) if BuildTarget == "DEBUG" else 0 2.
> upld_info_hdr.Attribute |= (1 if BuildTarget == "DEBUG" else 0)
>
> Are we sure that the #2 is chosen in by the python interpreter?
[-- Attachment #2: Type: text/html, Size: 8087 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-27 7:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-27 3:09 [PATCH] UefiPayloadPkg: Align Attribute value with UPL spec gua.guo
2022-06-27 3:43 ` Ni, Ray
2022-06-27 4:06 ` Guo, Gua
2022-06-27 5:03 ` Guo, Gua
2022-06-27 6:52 ` Ni, Ray
2022-06-27 7:27 ` Guo, Gua
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox