[edk2-devel] [PATCH] ASpeed/ASpeedGopBinPkg: Update X64/AArch Gop UEFI Driver

2023-08-07 Thread Tommy Huang via groups.io
1.Update the X64/AArch64 UEFI GOP driver into v1.13.03.
2.Update the .inf version.
3.Modify report framebuffer base behavior.

Cc: Ard Biesheuvel 
Cc: Isaac Oram 
Cc: Nate DeSimone 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Cc: Ryan Chen 
Cc: BMC-SW 

Signed-off-by: Tommy Huang 
---
 .../AArch64/ASpeedAst2500Gop.efi  | Bin 45056 -> 45056 bytes
 .../AArch64/ASpeedAst2600Gop.efi  | Bin 45056 -> 45056 bytes
 .../ASpeedGopBinPkg/ASpeedAst2500GopDxe.inf   |   4 ++--
 .../ASpeedGopBinPkg/ASpeedAst2600GopDxe.inf   |   2 +-
 .../ASpeedGopBinPkg/X64/ASpeedAst2500Gop.efi  | Bin 33600 -> 33600 bytes
 .../ASpeedGopBinPkg/X64/ASpeedAst2600Gop.efi  | Bin 29952 -> 30016 bytes
 6 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Drivers/ASpeed/ASpeedGopBinPkg/AArch64/ASpeedAst2500Gop.efi 
b/Drivers/ASpeed/ASpeedGopBinPkg/AArch64/ASpeedAst2500Gop.efi
index 
143866a347a740c26152365ff4448873665d4cb5..fcfe989404022f71aeb893a1002e2a28b0e91d64
 100644
GIT binary patch
delta 3914
zcmaJ^3s6&M7QX)lN`esxml!0)kc5gL2uj4FVneL2TCH9m6%`?Xf-h9;w65;xy-Hix
z)|T627p=7hb=B2w7dDQSz7*W9(^{=EU8m~q6zFtaUoH0G>TWfA&dt+Ir_3T+!>vwq~mwwVUu}k9Lh@`Lix{WaM_$1hpfwIdc5XJUaPSxuJK4$!xF1W`?gJy
zeby`1a^gxf$Q^{+)~Cplqg89FP34;VsMb;2WbGGvrF|+|`4E?}R2wZQ@-o$0pJCRn
z6qIJw^6byJ!pFaytTa!QIDXLsq&o(w?Squb|M50;MG2>O^W62T
z95<8axLywbo%^yBM!UY<^S6?RSUekuX>^GSaa@JxlJncxcnek=hFy3*@K4&<3D3YM$LpN#IBurAasHk3+AW<@+=1^OlHZx~jdQ}7O%o)iXaCOcK9pfZ%uZ<}@Cv`$~X}->##NBmg
zqPoj*2M(5Iuy^51>0$N?{AO;B&ey^@t|eZHgVwoUu>qjWD`3mu<9Vl95h(M`eP6(A
z&6{||{j}q58hki^RLQZM-locENi10-b>drlZb$w7}L6tUk6L3FpV?dgFZghQDeD%Z
zGPgzKc}ZlS`y6kOl5G+9T-zMPt^g|+SPvM=^ZH&u9*=mo8VRPCn;!WL5k5Xt)EG?K
zfknEj_@cmq;KG(?vQyAjKA7ErZ^~^9KwDvE0%TR>u?iG2rc6}I6kk&{`duepAkUo#+y`lKprBK$9c-eoHzB@6R>+;3OLOCovl
z9Iy5`jUvW`GK}=w{4?>v3==RmnHc(udmIg$5$48>9X;cqQKeEHt=>S}Gnef{A
z$z?VqBFBbE;!jarcA)M)kX89K!;P#Iih1Pa7~Cm5>w%rRcO5b9gV-I!SW*M(_NiS^
z|3AR_N+I`KV!}?qmuQR2ie+K}J1z2P1;K27Rl|>`ln6HnQKtxN2M0R#eEEEqHoE
zt!*YRY%Tl{ZUUuRVC%6oBYaSu%vQtsYGG0xDy=Sc%S8U=A~
zM;==A_&RD>fN>xuM_{9%b)isPNa_+v-Nt}=C}CqC#BvCG{6Q=e*dn3WO3e5NnKZ&?
zJ&2_cHv2(Lfa!~bDe=h26OlR580=9?>Pe(-31ZQtL#*c{3wGwchPtprbQM|`nb?nT
zW|7%&1371`qfN%kB+wgP95q5#4>1XjHikE7fcYn30;EwUV}1yG
zo3KpOg<%JP)e6OXh{;2yETrB=SOG>@5W=<-HUf2F7{K&eWB;wl@C?tlh!yhgV1+M&
zjI4}oNBbs`l}cizF2t^b)>;7{<{#JE*mAg9n`dyLlIdulLRs8aKjyA&av@RBM$D^w9``3e$V8zp4f|%+t+NZQ*1oB9M*2ThxLdr-JVV05t
zt3DJl8L!D6?`|=G9F-Dwi~o2P$Nia@B*J(udRU-5j&%Oegk6I_
zEiq=@MzwX^Mv>_yv4h{IUIfJUA|9UW65L#3V|XhrwdGzyE(NcG<1cb;v<=-+{nY2g
z7vvMMHJ^iPsWALgWT*>0wnS>H^pbit{nd{zrq+4R&er;FQL5lD{BdcGelIF~Ia1Ud
zyTP)|XxZWS>%svIj|YDIQ7BzDIc+^!_^x&?)iGLOIFfwgQ*D9Ocn;c^3B~oOaQ49?
z92MHK<%C6yYAsOp_63bMTDdeh1bt
z0bF%LS{yR8xAc&3j>Wa~j~!uApwtP5`~MD&9E}?>ccHCrhBnXd+YN>l@0Jvy&ipV}
z-^I9@9gI6t;J4lQPR{6u57*LZp_glXImK6Gw7C{~?Qf=6e0-Vpc>1nUt>>H>LJQU
zdH3|z32Ln1cC?&K1qG%Fgd;c(KfBya!PlEea!v6trN0?s#

delta 4010
zcmaJ^3s6+&6~6ynR#-$}Szyr>_XXmjD~Kyfk+{1?DG5hSdBre;Cb;fhaaNFF?
zrofevJL7~L=>RXZM<+(_d<(>pT6i-jo$ZAWa>hpQNS3m_UNwv#HVkyRqu35`4;t(D!u!?x202-a+t@WT_17Mc*wMrvgNSGvW&Gsx8<6mR3~+&pz}faY|JlxR+`Tm
zlJB$5Ci$$T`4fm^i9YLi{zUmqowV|>=cjxxOK;OkF}R73e{=RAZeX)}A#UJRJ#An!
zZpom6(QG?REvQXF0cSP|=%k4~-WCh;+qQc?E4UbK#zH#fNSz!em3-%I>5!=|?&i7M
zw>Ykp=eWBZ{@ed#k{Ip!Nzb2c{aCy{6PFp0C=tgAo`2ZCiH^4^`(Rg|Qn7)U-80yQ
zkPK$#{s3hz0ROa+b$Et8Jvq+a5zCc|Yv(=E)ogATVh`M(z;U;&i2YlZd>A9!7&axa
zSQ{rKN?Y%FTZDLP564+swVb-vq<}xp`UMl<)~sc5JSVg>PH^loG6||?=O(+etUazI
zu1D8lePrmcJ>oci3%F)yu=nBo?6=t~uwu@LIDaW^TwA;p1Bd2ZXMuv<=$?
zN6>x)ZSphdnj9j=ybhzvX0WZWzHBrm-&&>_RfisYk{F7pA;r{}Lv|G@DumDqJ3u~v
zxU!PG)nF~XuE3p0#~iQpku(e{NCIhI9g#GvlKl<7Or?!z~)yC
zNumx=rVArfKL>@=s3cF;E7A@{PW70n6fY0!jSJZP3-KYnNr+YU57&GGHaWBOYZ2wG
zA3DUC=5|^&ne1Mj*$0=M8kP!ooZ6Il#zb+o+S&g!{UeB7ENW5EFga#t`;3`Sm&%SKv;ihIPWODmCa9
zBq~3T;Ln0>fredzvIT_$Pa$^=wRt>+cFxrh-2W4Bbb)HnF=WeSnp&IJTZ*hB$i8zM
zUY(z++#ey_4Du@Nz~3Xvzu4qpQJ8wgv4&vk+n}h*$hLs9N@aSPA{BiPrihq`7#+yq
zVSN#c7+$=BnApvZuJ|xhhgf7Qs}ZBt(gr#3H|OOku
zDdPCdb#!^fP-~~b^o8ny#mMl}@rDqCP1+camYXND+(hwgB
zX;}!f`3F1bmjjnkA)A;d`!bn?P3nv32%Fp&(|~@FswkD1nSB{0VN(!06V4$HG0}%L
zhw_Ss6^m4vJTb*s#YZeu#p7;N=ykAe!l6YPb|20!(iU|iXOFhFinv?BYHkqL-`dJ#
zVXT9&1jO(r9Q3;e`f8Q=3NdO_kcSyNmzLK?xCSHoh4G8vtX2;^j||VPcZgQ3O6P6}
z>YWCuT5W1Ymf5KX;caL;(0h+vm2=Bn1G
z56&8kp_?Bcx{1c%D!m^E_u-`_YST~XEe5nG)2{+H-_PxbybN;!`~rz^kcF
zp0ltu{=U#^hrnH1UF;?`RPU6f`7+yu_S*8a84S;bJxZGw>~~8*>7O{8y;qO|cs@+8
zD`9w#tkal&g;?Y~E+;Hv9`P*IsmzOrQQ_I`HI+`n{>MDd1%18BJQLY-&#iYbE55E2
zyBdNyK8rZbqk&uN>o#?y1f2D1(c375;5*X&cGX<}
n^~>4*D-WH&I~@{ys!_7dJSN2?L_gY>yMNsNlb!_Ey@dY)+YrCg

diff --git a/Drivers/ASpeed/ASpeedGopBinPkg/AArch64/ASpeedAst2600Gop.efi 
b/Drivers/ASpeed/ASpeedGopBinPkg/AArch64/ASpeedAst2600Gop.efi
index 
5442eecf7a7e15c7666fa19271d1ab7cfb0cae5a..07a73509c12af1d5e7182daf92fdbd552fd08f93
 100644
GIT binary patch
delta 1906
zcmaJ?ZA?>F7(VB=v`{LA%175?zXzmLL@FS%l$Irm&M2#mnNWlxTTqu-KW2#2d27f%
zoCzEc3(mz^f)m0_)>*$cmI+&&$(Bv+jLFz{j`_kG^y
zJm@eRLBk%(-pck4En_aJg!S*`_cs{)vuCW&mp600G8&`M*S9*J-Ee)(UBdidf?DJbK7nM19u9T!)JG
zTUT)^6}@X!i|bTmn%=Xj#GNW~4;FdUu`q?}RE1V7EWwGRz5{lns?h$D0?c)5=)j`W
z`6>%>E`aa_3;FO-ymw5LGsM9a1inDz1^RNSn}e==UHTFiG|}

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc/AppPkg: Fix documentation issue with edk2module.c

2023-08-07 Thread Jayaprakash, N
Reviewed-by: Jayaprakash Nevara 


-Original Message-
From: R, Vishal  
Sent: Thursday, August 3, 2023 10:12 PM
To: devel@edk2.groups.io
Cc: R, Vishal ; Rebecca Cran ; Kinney, 
Michael D ; Jayaprakash, N 
Subject: [edk2-libc Patch 1/1] edk2-libc/AppPkg: Fix documentation issue with 
edk2module.c

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4517

This commit fixes the API documentation issue reported via the BZ4517 Updated 
documentation strings for rdmsr() and wrmsr()

Cc: Rebecca Cran 
Cc: Michael D Kinney 
Cc: Jayaprakash N 
Signed-off-by: Vishal R 
---
 .../PyMod-3.6.8/Modules/edk2module.c  | 28 +++
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git 
a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c 
b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c
index 9641f86..05b1a5a 100644
--- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c
+++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2mo
+++ dule.c
@@ -3839,8 +3839,16 @@ void WritePCICfg(  }
 
 PyDoc_STRVAR(efi_rdmsr__doc__,
-"rdmsr(ecx) -> (eax,edx)\n\
-Read the given MSR.");
+"rdmsr(msr) -> (lower_32bits, higher_32bits)\n\ \n\ Read the given msr 
+and return the data as tuple.\n\ \n\ Parameters:\n\
+msr - The msr in hex or int format\n\ \n\ Return Value:\n\
+a tuple with lower and higher 32 bit values read from the msr\n\ 
+");
 
 static PyObject *
 edk2_rdmsr(PyObject *self, PyObject *args) @@ -3857,9 +3865,19 @@ 
edk2_rdmsr(PyObject *self, PyObject *args)
   return Py_BuildValue("(II)", (unsigned long)veax, (unsigned long)vedx);  }
 
-PyDoc_STRVAR(efi_wrmsr__doc__,
-"wrmsr(ecx, eax, edx) -> None\n\
-Write edx:eax to the given MSR.");
+PyDoc_STRVAR(efi_wrmsr__doc__,
+"wrmsr(msr, lower_32bits, higher_32bits) -> None\n\ \n\ Writes 
+higher_32bits:lower_32bits to the given msr.\n\ \n\ Parameters:\n\
+msr - The msr in hex or int format\n\
+lower_32bits - The lower 32 bit data for the msr\n\
+higher_32bits - The higher 32 bit data for the msr\n\ \n\ Return 
+Value:\n\
+None\n\
+");
 
 static PyObject *
 edk2_wrmsr(PyObject *self, PyObject *args)
--
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107633): https://edk2.groups.io/g/devel/message/107633
Mute This Topic: https://groups.io/mt/100551578/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 4/4] DynamicTablesPkg: Add Aml NameUnicodeString API

2023-08-07 Thread Sami Mujawar
Hi Jeff,

Thank you for this patch.
These changes look good to me.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107632): https://edk2.groups.io/g/devel/message/107632
Mute This Topic: https://groups.io/mt/100068080/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 1/4] DynamicTablesPkg: Add ThermalZone CodeGen function

2023-08-07 Thread Sami Mujawar
Hi Jeff,

Thank you for this patch.
Other than the missing sign-off, this patch looks good to me.

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107631): https://edk2.groups.io/g/devel/message/107631
Mute This Topic: https://groups.io/mt/100068076/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 3/4] DynamicTablesPkg: Add support to add Strings to package

2023-08-07 Thread Sami Mujawar
Hi Jeff,

Thank you for this patch.
Please see my response inline.

On Mon, Jul 10, 2023 at 03:26 PM, Jeff Brasen wrote:

> 
> +
> + Status = AmlVarListAddTail (
> + (AML_NODE_HANDLE)PackageNode,
> + (AML_NODE_HANDLE)DataNode
> + );
> + ASSERT_EFI_ERROR (Status);
> +

I think if the above function fails DataNode would need to be freed as it is 
not linked in the AML tree. Can you check, please?

With that addressed,

Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107630): https://edk2.groups.io/g/devel/message/107630
Mute This Topic: https://groups.io/mt/100068078/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 2/4] DynamicTablesPkg: Add support for simple method invocation.

2023-08-07 Thread Sami Mujawar
Hi Jeff,

Apologies for the delay in feedback.
Please see my response inline.

On Mon, Jul 10, 2023 at 03:26 PM, Jeff Brasen wrote:

> 
> +
> + // AmlCodeGenReturn() deletes DataNode if error.
> + Status = AmlCodeGenReturn (
> + (AML_NODE_HEADER *)DataNode,
> + ParentNode,
> + &ObjectNode
> + );
> + ASSERT_EFI_ERROR (Status);

I think the Status should be checked and error needs to be handled to free 
AmlNameString and IntNode. Can you check, please?

> 
> +
> + Status = AmlVarListAddTail (
> + (AML_NODE_HANDLE)ObjectNode,
> + (AML_NODE_HANDLE)IntNode
> + );
> + if (EFI_ERROR (Status)) {
> + ASSERT (0);
> + goto exit_handler;

I think IntNode would need to be freed as well. Can you check, please?

> 
> + }
> +

Your sign-off is also missing. Otherwise this patch looks good to me.

With the error handling addressed,
Reviewed-by: Sami Mujawar 

Regards,

Sami Mujawar


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107629): https://edk2.groups.io/g/devel/message/107629
Mute This Topic: https://groups.io/mt/100068077/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH 1/1] OvmfPkg:Fix Hii form name mismatch with EFI variable

2023-08-07 Thread Wang, Yin
Hi Sunil,
I will be providing a detailed update soon, along with a new version. Thank you 
for your careful review and comments.
Best regards,
Yin
-Original Message-
From: Sunil V L  
Sent: Monday, August 7, 2023 8:02 PM
To: devel@edk2.groups.io; Wang, Yin 
Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg:Fix Hii form name mismatch with 
EFI variable

Hi Wang,

Thanks for the patch!

It will be good if you add versions to the patch subject. Even if you go back 
to v1, better to send as v3 with the change log.

On Fri, Jul 14, 2023 at 04:59:48PM +0800, Wang, Yin wrote:
> Onemore need change beside fixs:16acacf24c ("OvmfPkg: fix 
> PlatformConfig")
fixs -> Fixes? Why don't we need "Fixes:" tag to either aefcc91805fd or 
16acacf24c2c?

I think it is better to have commit message with exact error or information on 
what is the issue instead of just pointing to another commit.

> Find by sct case:ExtractConfigConformance fail.
> 

> Signed-off-by: Yin Wang 
> ---
>  OvmfPkg/PlatformDxe/Platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/PlatformDxe/Platform.c 
> b/OvmfPkg/PlatformDxe/Platform.c index cd3bfd554c98..c32439683d83 
> 100644
> --- a/OvmfPkg/PlatformDxe/Platform.c
> +++ b/OvmfPkg/PlatformDxe/Platform.c
> @@ -279,7 +279,7 @@ ExtractConfig (
>  //
>  ConfigRequestHdr = HiiConstructConfigHdr (
>   &gOvmfPlatformConfigGuid,
> - mVariableName,
> + mHiiFormName,
>   mImageHandle
The code change LGTM.

Acked-by: Sunil V L 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107628): https://edk2.groups.io/g/devel/message/107628
Mute This Topic: https://groups.io/mt/100142143/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, August 8, 2023 #cal-reminder

2023-08-07 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Tuesday, August 8, 2023
6:30pm to 7:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d

*Organizer:* Liming Gao gaolim...@byosoft.com.cn ( 
gaolim...@byosoft.com.cn?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO
 )

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1986333 )

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao



Microsoft Teams meeting

*Join on your computer or mobile app*

Click here to join the meeting ( 
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d
 )

*Join with a video conferencing device*

te...@conf.intel.com

Video Conference ID: 116 062 094 0

Alternate VTC dialing instructions ( 
https://conf.intel.com/teams/?conf=1160620940&ivr=teams&d=conf.intel.com&test=test_call
 )

*Or call in (audio only)*

+1 916-245-6934,,77463821# ( tel:+19162456934,,77463821# ) United States, 
Sacramento

Phone Conference ID: 774 638 21#

Find a local number ( 
https://dialin.teams.microsoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821
 ) | Reset PIN ( https://mysettings.lync.com/pstnconferencing )

Learn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( 
https://teams.microsoft.com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e&tenantId=46c98d88-e344-4ed4-8496-4ed7712e255d&threadId=19_meeting_OTUyZTg2NjgtNDhlNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2&messageId=0&language=en-US
 )


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107627): https://edk2.groups.io/g/devel/message/107627
Mute This Topic: https://groups.io/mt/100614196/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Now: Tools, CI, Code base construction meeting series - Monday, August 7, 2023 #cal-notice

2023-08-07 Thread Group Notification
*Tools, CI, Code base construction meeting series*

*When:*
Monday, August 7, 2023
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1985653 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107626): https://edk2.groups.io/g/devel/message/107626
Mute This Topic: https://groups.io/mt/100612206/21656
Mute #cal-notice:https://edk2.groups.io/g/devel/mutehashtag/cal-notice
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 0/2] MdePkg: Add missing status codes

2023-08-07 Thread Nate DeSimone
The series as been pushed as ~107ddf1..3c274c0

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Nate DeSimone
Sent: Monday, July 31, 2023 11:43 AM
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 
; Liu, Zhiguang 
Subject: [edk2-devel] [PATCH v1 0/2] MdePkg: Add missing status codes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4514

Upon review it has been found that MdePkg is missing two status code 
definitions:

 1. EFI_IP_ADDRESS_CONFLICT - Added in UEFI Spec v2.5  2. 
EFI_WARN_RESET_REQUIRED - Added in UEFI Spec v2.6

Moreover, PrintLib does not correctly decode the follow status codes:

 1. EFI_IP_ADDRESS_CONFLICT
 2. EFI_HTTP_ERROR
 3. EFI_WARN_FILE_SYSTEM
 4. EFI_WARN_RESET_REQUIRED

These missing status codes and the missing decodings have been added.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Signed-off-by: Nate DeSimone 

Nate DeSimone (2):
  MdePkg: Add missing status codes
  MdePkg: Add new status codes to PrintLib

 MdePkg/Include/Base.h  | 10 ++
 MdePkg/Include/Uefi/UefiBaseType.h |  2 ++
 MdePkg/Library/BasePrintLib/PrintLibInternal.c | 10 +++---
 3 files changed, 19 insertions(+), 3 deletions(-)

--
2.30.2








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107625): https://edk2.groups.io/g/devel/message/107625
Mute This Topic: https://groups.io/mt/100468025/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 24/24] IntelFsp2WrapperPkg: CI: Add PrEval entry

2023-08-07 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Joey Vagedes 
> Sent: Monday, June 26, 2023 2:35 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Chen, Gang C ;
> Zeng, Star ; Kuo, Ted ; S, Ashraf
> Ali ; Mohapatra, Susovan
> 
> Subject: [PATCH v1 24/24] IntelFsp2WrapperPkg: CI: Add PrEval entry
> 
> Adds a PrEval entry to the package's ci.yaml file which is used to
> verify if the package uses a particular library instance when that
> library instance file (INF) is updated.
> 
> When a library instance file (INF) is updated, PrEval will review each
> package's DSC as described in the ci.yaml file to determine if the
> package uses said library instance. If the package does use the library
> instance, it will be built and tested to ensure the package is not
> broken from the change.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Chen Gang C 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> Signed-off-by: Joey Vagedes 
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.ci.yaml
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.ci.yaml
> index 45cb5a7d6f32..2d32bc65b415 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.ci.yaml
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.ci.yaml
> @@ -6,6 +6,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +"PrEval": {
> +"DscPath": "IntelFsp2WrapperPkg.dsc",
> +},
>  ## options defined .pytool/Plugin/LicenseCheck
>  "LicenseCheck": {
>  "IgnoreFiles": []
> --
> 2.41.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107624): https://edk2.groups.io/g/devel/message/107624
Mute This Topic: https://groups.io/mt/99798062/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 12/24] IntelFsp2Pkg: CI: Add PrEval entry

2023-08-07 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Joey Vagedes 
> Sent: Monday, June 26, 2023 2:34 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Duggapu, Chinni B
> ; Ng, Ray Han Lim ;
> Zeng, Star ; Kuo, Ted ; S, Ashraf
> Ali ; Mohapatra, Susovan
> 
> Subject: [PATCH v1 12/24] IntelFsp2Pkg: CI: Add PrEval entry
> 
> Adds a PrEval entry to the package's ci.yaml file which is used to
> verify if the package uses a particular library instance when that
> library instance file (INF) is updated.
> 
> When a library instance file (INF) is updated, PrEval will review each
> package's DSC as described in the ci.yaml file to determine if the
> package uses said library instance. If the package does use the library
> instance, it will be built and tested to ensure the package is not
> broken from the change.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Duggapu Chinni B 
> Cc: Ray Han Lim Ng 
> Cc: Star Zeng 
> Cc: Ted Kuo 
> Cc: Ashraf Ali S 
> Cc: Susovan Mohapatra 
> Signed-off-by: Joey Vagedes 
> ---
>  IntelFsp2Pkg/IntelFsp2Pkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.ci.yaml
> b/IntelFsp2Pkg/IntelFsp2Pkg.ci.yaml
> index 95d18cfcde1f..bd6f4cc961b0 100644
> --- a/IntelFsp2Pkg/IntelFsp2Pkg.ci.yaml
> +++ b/IntelFsp2Pkg/IntelFsp2Pkg.ci.yaml
> @@ -6,6 +6,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +"PrEval": {
> +"DscPath": "IntelFsp2Pkg.dsc",
> +},
>  ## options defined .pytool/Plugin/LicenseCheck
>  "LicenseCheck": {
>  "IgnoreFiles": []
> --
> 2.41.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107622): https://edk2.groups.io/g/devel/message/107622
Mute This Topic: https://groups.io/mt/99798045/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 19/24] PrmPkg: CI: Add PrEval entry

2023-08-07 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Joey Vagedes 
> Sent: Monday, June 26, 2023 2:34 PM
> To: devel@edk2.groups.io
> Cc: Michael Kubacki ; Desimone, Nathaniel L
> 
> Subject: [PATCH v1 19/24] PrmPkg: CI: Add PrEval entry
> 
> Adds a PrEval entry to the package's ci.yaml file which is used to
> verify if the package uses a particular library instance when that
> library instance file (INF) is updated.
> 
> When a library instance file (INF) is updated, PrEval will review each
> package's DSC as described in the ci.yaml file to determine if the
> package uses said library instance. If the package does use the library
> instance, it will be built and tested to ensure the package is not
> broken from the change.
> 
> Cc: Michael Kubacki 
> Cc: Nate DeSimone 
> Signed-off-by: Joey Vagedes 
> ---
>  PrmPkg/PrmPkg.ci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/PrmPkg/PrmPkg.ci.yaml b/PrmPkg/PrmPkg.ci.yaml
> index 2d4d12815d6b..b4b5aad67fbd 100644
> --- a/PrmPkg/PrmPkg.ci.yaml
> +++ b/PrmPkg/PrmPkg.ci.yaml
> @@ -5,6 +5,9 @@
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  {
> +"PrEval": {
> +"DscPath": "PrmPkg.dsc",
> +},
>  ## options defined .pytool/Plugin/LicenseCheck
>  "LicenseCheck": {
>  "IgnoreFiles": []
> --
> 2.41.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107623): https://edk2.groups.io/g/devel/message/107623
Mute This Topic: https://groups.io/mt/99798053/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, August 7, 2023 #cal-reminder

2023-08-07 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, August 7, 2023
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=1985653 )

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107621): https://edk2.groups.io/g/devel/message/107621
Mute This Topic: https://groups.io/mt/100590314/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB

2023-08-07 Thread Ard Biesheuvel
On Mon, 7 Aug 2023 at 13:31, Corvin Köhne  wrote:
>
> On Mon, 2023-07-24 at 14:59 +0200, Corvin Köhne wrote:
> > Copy the function BuildPlatformInfoHob() from OvmfPkg/PlatformPei.
> >
> > QemuFwCfgLib expect this HOB to be present, or fails to do anything.
> > InternalQemuFwCfgIsAvailable() from QemuFwCfgPeiLib module will not
> > check if the HOB is actually present for example and try to use a
> > NULL
> > pointer.
> >
> > Fixes: cda98df16228970dcf9a4ce2af5368219711b4b0
> > ("OvmfPkg/QemuFwCfgLib: remove mQemuFwCfgSupported +
> > mQemuFwCfgDmaSupported")
> > Signed-off-by: Corvin Köhne 
> > Cc: Ard Biesheuvel 
> > Cc: Jiewen Yao 
> > Cc: Jordan Justen 
> > Cc: Gerd Hoffmann 
> > Cc: Rebecca Cran 
> > Cc: Peter Grehan 
> > ---
> >  OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf |  1 +
> >  OvmfPkg/Bhyve/PlatformPei/Platform.c  | 20 
> >  2 files changed, 21 insertions(+)
> >

Could someone review this please?




> > diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > index 739d63098b1e..07570d4e30ca 100644
> > --- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > +++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > @@ -44,6 +44,7 @@ [Packages]
> >
> >  [Guids]
> >gEfiMemoryTypeInformationGuid
> > +  gUefiOvmfPkgPlatformInfoGuid
> >
> >  [LibraryClasses]
> >BaseLib
> > diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > b/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > index 5bfe435327c1..bdfc1614d284 100644
> > --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > @@ -17,6 +17,7 @@
> >  //
> >  // The Library classes this module consumes
> >  //
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -27,6 +28,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -534,6 +536,23 @@ MaxCpuCountInitialization (
> >  ));
> >  }
> >
> > +/**
> > + * @brief Builds PlatformInfo Hob
> > + */
> > +EFI_HOB_PLATFORM_INFO *
> > +BuildPlatformInfoHob (
> > +  VOID
> > +  )
> > +{
> > +  EFI_HOB_PLATFORM_INFO  PlatformInfoHob;
> > +  EFI_HOB_GUID_TYPE  *GuidHob;
> > +
> > +  ZeroMem (&PlatformInfoHob, sizeof PlatformInfoHob);
> > +  BuildGuidDataHob (&gUefiOvmfPkgPlatformInfoGuid, &PlatformInfoHob,
> > sizeof (EFI_HOB_PLATFORM_INFO));
> > +  GuidHob = GetFirstGuidHob (&gUefiOvmfPkgPlatformInfoGuid);
> > +  return (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA (GuidHob);
> > +}
> > +
> >  /**
> >Perform Platform PEI initialization.
> >
> > @@ -551,6 +570,7 @@ InitializePlatform (
> >)
> >  {
> >DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));
> > +  BuildPlatformInfoHob();
> >
> >//
> >// Initialize Local APIC Timer hardware and disable Local APIC
> > Timer
>
> Any comments?
>
> CI: https://github.com/tianocore/edk2/pull/4676
>
>
> --
> Kind regards,
> Corvin
>
> Attachments:
> signature.asc: https://edk2.groups.io/g/devel/attachment/107616/0
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107620): https://edk2.groups.io/g/devel/message/107620
Mute This Topic: https://groups.io/mt/100597527/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V3 3/3] ShellPkg/AcpiView: Add MPAM Parser

2023-08-07 Thread Rohit Mathew
Hi Pierre,

> -Original Message-
> From: Pierre Gondois 
> Sent: Friday, August 4, 2023 12:20 PM
> To: Rohit Mathew ; devel@edk2.groups.io
> Cc: Thomas Abraham ; Sami Mujawar
> ; James Morse ; Ray Ni
> ; Zhichao Gao ; nd
> 
> Subject: Re: [edk2-devel] [PATCH V3 3/3] ShellPkg/AcpiView: Add MPAM
> Parser
> 
> Hello Rohit,
> 
> On 7/31/23 22:14, Rohit Mathew wrote:
> > Hi Pierre,
> >
> > Apologies for the delay in response.
> >
> > ~~
> >
> >>> +
> >>> +/**
> >>> +  This function parses the locator field within the resource
> >>> +node for
> >> ACPI
> >> MPAM
> >>> +  table. The parsing is based on the locator type field.
> >>> +
> >>> +  This function also performs validation of the locator field.
> >>> + **/
> >>> +STATIC
> >>> +VOID
> >>> +EFIAPI
> >>> +ParseLocator (
> >>> +  VOID
> >>> +  )
> >>> +{
> >>> +  UINT8  *LocatorPtr;
> >>> +
> >>> +  LocatorPtr = Locator;
> >>> +
> >>> +  switch (*LocatorType) {
> >>
> >> I think it would be simpler to define names as:
> >>
> >> STATIC CONST CHAR16  *MpamLocationNames[] = {
> >>   L"Processor cache",
> >>   L"Memory",
> >>   ...
> >>
> >> and also to define ACPI_PARSER tables for the locator descriptors
> >> instead of using PrintGenericLocatorDescriptor().
> >> Eg:
> >> STATIC CONST ACPI_PARSER  SmmuLocatorDescriptorParser[] = {
> >>   { L"SMMU interface", 8, 0, L"%lu",   NULL, NULL, NULL, NULL },
> >>   { L"Reserved ID", 4, 8, L"%u", NULL, NULL,
> >> ValidateReservedGeneric,
>  (VOID
> >> *)2 },
> >>
> >
> > [Rohit] The only reason I did not want to do this was to avoid
> > manually
>  moving the offset back by x bytes to reparse the locator. We parse
>  the
> >> locator
>  using MpamMscResourceLocatorParser. If we would need to use
>  ACPI_PARSER, we would need to step back by 12 bytes (assuming
>  offset is used right after we parse the locator) and reparse the
>  locator under the respective switch case. We might not be able to
>  skip MpamMscResourceLocatorParser as
>  EFI_ACPI_MPAM_LOCATION_MEMORY_CACHE can't be parsed by
> ACPI_PARSER.
>  Would this be cleaner, what are your thoughts?
> 
>  Ok right, I misread the structure the first time.
>  In that case, would it be possible to use ParseLocator() (or a
>  remake of the
>  function)
>  as a ACPI_PARSER's PrintFormatter() callback ?
> 
>  Cf. the comment below, I think this should be possible to parse a
>  EFI_ACPI_MPAM_LOCATION_MEMORY_CACHE
>  struct using a ACPI_PARSER structure.
> 
> >>>
> >>> [Rohit] PrintFomatter would only be called for a call with Trace =
> >>> TRUE. While
> >> parsing MpamMscResourceLocatorParser, Trace is set to FALSE.
> >>>
> >>> // Snippet
> >>>   if (Trace) {
> >>> // if there is a Formatter function let the function handle
> >>> // the printing else if a Format is specified in the table use
> >>> // the Format for printing
> >>> PrintFieldName (2, Parser[Index].NameStr);
> >>> if (Parser[Index].PrintFormatter != NULL) {
> >>>   Parser[Index].PrintFormatter (Parser[Index].Format, Ptr);
> >>>
> >>
> >> IIUC, Trace = False for the MpamMscResourceLocatorParser struct
> >> because we just want to populate the 'Locator', and let
> >> ParseLocator() print/parse the fields.
> >>
> >> If a PrintFomatter() callback is implemented, the 'Locator' offset
> >> wouldn't need to be populated anymore, the printing/parsing would
> >> directly happen in the PrintFomatter(). Do you think it could work ?
> >
> > [Rohit] The format for PrintFomatter is as follows - STATIC VOID
> > (*FN)(CONST CHAR16 *Format, UINT8 *Ptr).
> >
> > This would mean that we have access to Ptr to whatever field we implement
> this callback for, but not the Offset and AcpiTableLength. A way around this
> would be to have Offset and AcpiTableLength as globals, but this seems less
> clean in my opinion.
> 
> Yes right, this would be an issue when parsing the interconnect locator.
> 
> Doing the parsing inside PrintFromatter callbacks might effectively be a bit
> dodgy. Maybe another way to parse the locators would be as the
> 'GicITSParser'
> struct is parsed in the MadtParser, the Locator type allowing to decide how to
> parse the Locator descriptor.
> 
> I think my point is that the locator structures could be represented as
> ACPI_PARSER structures, allowing to easily see a correlation between the spec
> and the code. This would allows to remove PrintGenericLocatorDescriptor().
> 
> 

[Rohit] Agreed, parsing with ACPI_PARSER using different cases for LocatorType 
would be cleaner. I will post V4 with this and other comments addressed.

> >
> >>
> >>>
> >
> >>
> >>> +case EFI_ACPI_MPAM_LOCATION_PROCESSOR_CACHE:
> >>> +  PrintGenericLocatorDescriptor (
> >>> +4,

Re: [edk2-devel] [PATCH 1/1] OvmfPkg:Fix Hii form name mismatch with EFI variable

2023-08-07 Thread Sunil V L
Hi Wang,

Thanks for the patch!

It will be good if you add versions to the patch subject. Even if you
go back to v1, better to send as v3 with the change log.

On Fri, Jul 14, 2023 at 04:59:48PM +0800, Wang, Yin wrote:
> Onemore need change beside fixs:16acacf24c ("OvmfPkg: fix PlatformConfig")
fixs -> Fixes? Why don't we need "Fixes:" tag to either aefcc91805fd or
16acacf24c2c?

I think it is better to have commit message with exact error or
information on what is the issue instead of just pointing to another
commit.

> Find by sct case:ExtractConfigConformance fail.
> 

> Signed-off-by: Yin Wang 
> ---
>  OvmfPkg/PlatformDxe/Platform.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c
> index cd3bfd554c98..c32439683d83 100644
> --- a/OvmfPkg/PlatformDxe/Platform.c
> +++ b/OvmfPkg/PlatformDxe/Platform.c
> @@ -279,7 +279,7 @@ ExtractConfig (
>  //
>  ConfigRequestHdr = HiiConstructConfigHdr (
>   &gOvmfPlatformConfigGuid,
> - mVariableName,
> + mHiiFormName,
>   mImageHandle
The code change LGTM.

Acked-by: Sunil V L 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107618): https://edk2.groups.io/g/devel/message/107618
Mute This Topic: https://groups.io/mt/100142143/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V6 0/2] SecureBoot: Support RSA 512 and RSA 384

2023-08-07 Thread Yao, Jiewen
> Set signature type to gEfiCertX509Guid when enroll RSA3072/RSA4096 KEK.

===
  switch (KeyLenInBytes) {
  case WIN_CERT_UEFI_RSA2048_SIZE:
CopyGuid (&KekSigList->SignatureType, &gEfiCertRsa2048Guid);
break;
  case WIN_CERT_UEFI_RSA3072_SIZE:
  case WIN_CERT_UEFI_RSA4096_SIZE:
CopyGuid (&KekSigList->SignatureType, &gEfiCertX509Guid);
break;
  default :
DEBUG ((DEBUG_ERROR, "Unsupported key length.\n"));
Status = EFI_UNSUPPORTED;
goto ON_EXIT;
  }
===

Sorry that I am not clear on this. I don't mean to use gEfiCertX509Guid to 
support raw RSA3K or 4K.
I mean to use *drop* raw RSA3K or 4k. And Only use gEfiCertX509Guid for RSA3K 
or 4K. You don't need to change EnrollRsa2048ToKek().
Please just support RSA3K or 4K in EnrollX509ToKek(), and add test case to 
validate that.

===
  if (IsDerEncodeCertificate (FilePostFix)) {
return EnrollX509ToKek (Private);
  } else if (CompareMem (FilePostFix, L".pbk", 4) == 0) {
return EnrollRsa2048ToKek (Private);
  } else {
===

Thank you
Yao, Jiewen


> -Original Message-
> From: Sheng, W 
> Sent: Monday, August 7, 2023 5:10 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen ; Wang, Jian J ;
> Xu, Min M ; Chen, Zeyi ; Wang,
> Fiona ; Lu, Xiaoyu1 ; Jiang,
> Guomin ; Kinney, Michael D
> 
> Subject: [PATCH V6 0/2] SecureBoot: Support RSA 512 and RSA 384
> 
> Patch V6:
> Remove the changes in MdePkg.
> The changes of patch v6 are in CryptoPkg and SecurityPkg.
> Set signature type to gEfiCertX509Guid when enroll RSA3072/RSA4096 KEK.
> This signature type is used to check the supported signature and show the 
> strings.
> 
> Patch V5:
> Using define KEY_TYPE_RSASSA to replace the magic number.
> 
> Patch V4:
> Determine the RSA algorithm by a supported algorithm list.
> 
> Patch V3:
> Select SHA algorithm automaticly for a unsigned efi image.
> 
> Patch V2:
> Determine the SHA algorithm by a supported algorithm list.
> Create SHA context for each algorithm.
> 
> Test Case:
> 1. Enroll a RSA4096 Cert, and execute an RSA4096 signed efi image under UEFI
> shell.
> 2. Enroll a RSA3072 Cert, and execute an RSA3072 signed efi image under UEFI
> shell.
> 3. Enroll a RSA2048 Cert, and execute an RSA2048 signed efi image under UEFI
> shell.
> 4. Enroll an unsigned efi image, execute the unsigned efi image under UEFI 
> shell
> 
> Test Result:
> Pass
> 
> Negative Test Case:
> 1) Enroll a RSA2048 Cert, execute an unsigned efi image.
> 2) Enroll a RSA2048 Cert, execute a RSA4096 signed efi image.
> 3) Enroll a RSA4096 Cert, execute a RSA3072 signed efi image.
> 4) Enroll a RSA4096 Cert to both DB and DBX, execute the RSA4096 signed efi
> image.
> 
> Test Result:
> Get "Access Denied" when try to execute the efi image.
> 
> Cc: Jiewen Yao 
> Cc: Jian J Wang 
> Cc: Min Xu 
> Cc: Zeyi Chen 
> Cc: Fiona Wang 
> Cc: Xiaoyu Lu 
> Cc: Guomin Jiang 
> Cc: Michael D Kinney 
> 
> Sheng Wei (2):
>   CryptoPkg/Library/BaseCryptLib: add sha384 and sha512 to
> ImageTimestampVerify
>   SecurityPkg/SecureBoot: Support RSA 512 and RSA 384
> 
>  CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c   |   3 +-
>  .../Library/AuthVariableLib/AuthService.c | 218 +++---
>  .../AuthVariableLib/AuthServiceInternal.h |   4 +-
>  .../Library/AuthVariableLib/AuthVariableLib.c |  42 ++--
>  .../DxeImageVerificationLib.c |  73 +++---
>  .../SecureBootConfigDxe.inf   |   8 +
>  .../SecureBootConfigImpl.c|  91 ++--
>  .../SecureBootConfigImpl.h|   7 +
>  .../SecureBootConfigStrings.uni   |   2 +
>  9 files changed, 356 insertions(+), 92 deletions(-)
> 
> --
> 2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107617): https://edk2.groups.io/g/devel/message/107617
Mute This Topic: https://groups.io/mt/100596018/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB

2023-08-07 Thread Corvin Köhne
On Mon, 2023-07-24 at 14:59 +0200, Corvin Köhne wrote:
> Copy the function BuildPlatformInfoHob() from OvmfPkg/PlatformPei.
> 
> QemuFwCfgLib expect this HOB to be present, or fails to do anything.
> InternalQemuFwCfgIsAvailable() from QemuFwCfgPeiLib module will not
> check if the HOB is actually present for example and try to use a
> NULL
> pointer.
> 
> Fixes: cda98df16228970dcf9a4ce2af5368219711b4b0
> ("OvmfPkg/QemuFwCfgLib: remove mQemuFwCfgSupported +
> mQemuFwCfgDmaSupported")
> Signed-off-by: Corvin Köhne 
> Cc: Ard Biesheuvel 
> Cc: Jiewen Yao 
> Cc: Jordan Justen 
> Cc: Gerd Hoffmann 
> Cc: Rebecca Cran 
> Cc: Peter Grehan 
> ---
>  OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf |  1 +
>  OvmfPkg/Bhyve/PlatformPei/Platform.c  | 20 
>  2 files changed, 21 insertions(+)
> 
> diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> index 739d63098b1e..07570d4e30ca 100644
> --- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> +++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> @@ -44,6 +44,7 @@ [Packages]
>  
>  [Guids]
>    gEfiMemoryTypeInformationGuid
> +  gUefiOvmfPkgPlatformInfoGuid
>  
>  [LibraryClasses]
>    BaseLib
> diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c
> b/OvmfPkg/Bhyve/PlatformPei/Platform.c
> index 5bfe435327c1..bdfc1614d284 100644
> --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c
> +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c
> @@ -17,6 +17,7 @@
>  //
>  // The Library classes this module consumes
>  //
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -27,6 +28,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -534,6 +536,23 @@ MaxCpuCountInitialization (
>  ));
>  }
>  
> +/**
> + * @brief Builds PlatformInfo Hob
> + */
> +EFI_HOB_PLATFORM_INFO *
> +BuildPlatformInfoHob (
> +  VOID
> +  )
> +{
> +  EFI_HOB_PLATFORM_INFO  PlatformInfoHob;
> +  EFI_HOB_GUID_TYPE  *GuidHob;
> +
> +  ZeroMem (&PlatformInfoHob, sizeof PlatformInfoHob);
> +  BuildGuidDataHob (&gUefiOvmfPkgPlatformInfoGuid, &PlatformInfoHob,
> sizeof (EFI_HOB_PLATFORM_INFO));
> +  GuidHob = GetFirstGuidHob (&gUefiOvmfPkgPlatformInfoGuid);
> +  return (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA (GuidHob);
> +}
> +
>  /**
>    Perform Platform PEI initialization.
>  
> @@ -551,6 +570,7 @@ InitializePlatform (
>    )
>  {
>    DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));
> +  BuildPlatformInfoHob();
>  
>    //
>    // Initialize Local APIC Timer hardware and disable Local APIC
> Timer

Any comments?

CI: https://github.com/tianocore/edk2/pull/4676


-- 
Kind regards,
Corvin


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107616): https://edk2.groups.io/g/devel/message/107616
Mute This Topic: https://groups.io/mt/100597527/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




signature.asc
Description: This is a digitally signed message part


Re: [edk2-devel] [PATCH v1 0/4] Use Qemu 8 in CI and enable SMP in tests

2023-08-07 Thread Laszlo Ersek
On 8/3/23 23:25, Ard Biesheuvel wrote:
> On Thu, 3 Aug 2023 at 21:21, Kinney, Michael D
>  wrote:
>>
>> Hi Ard,
>>
>> This is the email with the analysis and the flag
>> setting required for SMP to work with SMM enabled for
>> IA32/X64 QEMU.
>>
>> https://edk2.groups.io/g/devel/message/102364
>>
>>
>> I tried latest version of QEMU earlier in the Summer
>> and did not see any improvements.
>>
> 
> Ah thanks, I had forgotten all about that rabbit hole you went down :-)

Sorry Mike, I had also forgotten about that problem.

> 
> So let's respin this with -smp 4 --accel=tcg,thread=single. It is
> still an improvement to exercise the MP code even if it doesn't
> strictly execute concurrently. (It will be very hard to
> catch/reproduce true concurrency issues in TCG anyway)

I think that's a good workaround.

Thanks
Laszlo

> 
> Oliver, mind spinning a v2?
> 
> Thanks,
> 
> 
> 
>>> -Original Message-
>>> From: Ard Biesheuvel 
>>> Sent: Thursday, August 3, 2023 9:54 AM
>>> To: devel@edk2.groups.io; mikub...@linux.microsoft.com
>>> Cc: ostef...@redhat.com; Feng, Bob C ; Gerd
>>> Hoffmann ; Yao, Jiewen ;
>>> Justen, Jordan L ; Gao, Liming
>>> ; Kinney, Michael D
>>> ; Rebecca Cran ; Sean
>>> Brogan ; Chen, Christine
>>> ; Laszlo Ersek 
>>> Subject: Re: [edk2-devel] [PATCH v1 0/4] Use Qemu 8 in CI and enable SMP
>>> in tests
>>>
>>> On Thu, 3 Aug 2023 at 16:37, Michael Kubacki
>>>  wrote:

 For the series.

 Reviewed-by: Michael Kubacki 

>>>
>>> Thanks
>>>
>>> I've pushed this to the CI but Platform_CI OVMF_IA32X64_FULL_DEBUG
>>> keeps timing out for me
>>>
>>> https://github.com/tianocore/edk2/pull/4718
>>>
>>> Might it help if we restrict SMP to a subset of the builds? And would
>>> it help if we added "--accel=tcg,thread=multi" ?
>>>
>>>
>>>
 On 8/3/2023 7:44 AM, Oliver Steffen wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4324
> PR:  https://github.com/tianocore/edk2/pull/4711
>
> This series switches the OVMF CI jobs on Windows to a recent Qemu
> version and re-enables SMP in the Qemu "Run to shell" CI jobs.
> The Qemu tests run a little bit slower in SMP mode and sometimes
> hit the time limit of 2 minutes, thus this limit is increased to 4
> minutes.
>
> Together with 81cb0371f9db ("CI: Use latest image for Linux jobs
>>> (Qemu
> 8, gcc 12)" this series is sufficient to close Bug 4324.
>
>
> Gerd Hoffmann (1):
>OvmfPkg/PlatformCI: Boot OVMF in SMP mode.
>
> Oliver Steffen (3):
>OvmfPkg/PlatformCI: Use recent Qemu on Windows
>OvmfPkg/PlatformCI VS2019: Disable workaround for cpuhp bugfix
>CI: Increase time limit of "Run to shell" task to 4 minutes
>
>   .../templates/platform-build-run-steps.yml  |  2 +-
>   .../PlatformCI/.azurepipelines/Windows-VS2019.yml   |  4 ++--
>   OvmfPkg/PlatformCI/PlatformBuildLib.py  | 13 +
>>> 
>   3 files changed, 4 insertions(+), 15 deletions(-)
>


 


> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107615): https://edk2.groups.io/g/devel/message/107615
Mute This Topic: https://groups.io/mt/100524063/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add GUID for CERT_RSA3072 and CERT_RSA4096

2023-08-07 Thread Sheng Wei
Hi Jiewen,
I remove the new GUIDs.
I use signature type gEfiCertX509Guid when enroll RSA3072/RSA4096 KEK.
This signature type is used in below 6 places.
1) Show key name string in KEK delete page 
UpdateDeletePage()
2) Check supported SignatureType when delete KEK   DeleteKeyExchangeKey()
3) Check supported SignatureType when delete KEK   DeleteSignature()
4) Show key name when load the Signature  
LoadSignatureList()
5) Show help info string when load the Signature FormatHelpInfo()
6) Check supported SignatureType   
CheckSignatureListFormat()

It is no need to change MdePkg.
All the changes are in CryptoPkg and SecurityPkg.
I did the local unit test and raised the patch v6.
Could you help to review/merge the patches ?

Thank you
BR
Sheng Wei

> -Original Message-
> From: Yao, Jiewen 
> Sent: 2023年8月3日 16:13
> To: Sheng, W ; Gao, Liming
> ; devel@edk2.groups.io
> Cc: Wang, Jian J ; Xu, Min M ;
> Chen, Zeyi ; Wang, Fiona ;
> Lu, Xiaoyu1 ; Jiang, Guomin
> ; Kinney, Michael D 
> Subject: RE: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add GUID for
> CERT_RSA3072 and CERT_RSA4096
> 
> Hey
> We cannot add anything not defined in UEFI spec yet. Thanks Liming to catch
> that.
> 
> Can you remove CERT_RSA3072 and CERT_RSA4096?
> 
> I think we need to use EFI_CERT_TYPE_PKCS7_GUID + EFI_CERT_X509_GUID
> to support RSA3072 and RSA4096.
> Have you validated that configuration?
> 
> 
> > -Original Message-
> > From: Sheng, W 
> > Sent: Thursday, August 3, 2023 3:29 PM
> > To: Gao, Liming ; devel@edk2.groups.io
> > Cc: Yao, Jiewen ; Wang, Jian J
> > ; Xu, Min M ; Chen, Zeyi
> > ; Wang, Fiona ; Lu, Xiaoyu1
> > ; Jiang, Guomin ;
> > Kinney, Michael D 
> > Subject: RE: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add GUID for
> > CERT_RSA3072 and CERT_RSA4096
> >
> > Hi Liming,
> > Sorry for the late response.
> > The two new GUID are not in the public UEFI spec yet.
> > Do we have any process to add these 2 new GUIDs ?
> > Thank you.
> > BR
> > Sheng Wei
> >
> >
> >
> > > -Original Message-
> > > From: gaoliming 
> > > Sent: 2023年8月2日 17:12
> > > To: Sheng, W ; devel@edk2.groups.io
> > > Cc: Yao, Jiewen ; Wang, Jian J
> > > ; Xu, Min M ; Chen, Zeyi
> > > ; Wang, Fiona ; Lu,
> > > Xiaoyu1 ; Jiang, Guomin
> > > ; Kinney, Michael D
> > > 
> > > Subject: 回复: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add GUID
> > > for
> > > CERT_RSA3072 and CERT_RSA4096
> > >
> > > Sheng Wei:
> > >   I gave my comments for the patch 1/3 on this morning. Have you got
> > > my response?
> > >
> > >   I just want to confirm whether these two new GUID are in the
> > > public UEFI spec or not.
> > >
> > > Thanks
> > > Liming
> > > > -邮件原件-
> > > > 发件人: Sheng, W 
> > > > 发送时间: 2023年8月2日 16:04
> > > > 收件人: devel@edk2.groups.io; Gao, Liming
> 
> > > > 抄送: Yao, Jiewen ; Wang, Jian J
> > > > ; Xu, Min M ; Chen,
> > > > Zeyi ; Wang, Fiona ;
> > > > Lu, Xiaoyu1 ; Jiang, Guomin
> > > > ; Kinney, Michael D
> > > > 
> > > > 主题: RE: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add GUID for
> > > > CERT_RSA3072 and CERT_RSA4096
> > > >
> > > > Hi Gao, Liming,
> > > > For this patch group, we have got review-by from Yao, Jiewen on
> > > > patch
> > > > 2/3(CryptoPkg) and patch 3/3(SecurityPkg).
> > > > Do you any comments on the patch 1/3 (MdePkg) ?
> > > > Patch 1/3 is only to add 2 new GUIDs.
> > > > Could you help to merge it ?
> > > >
> > > > Thank you.
> > > > BR
> > > > Sheng Wei
> > > >
> > > > > -Original Message-
> > > > > From: Sheng, W
> > > > > Sent: 2023年7月31日 10:02
> > > > > To: 'devel@edk2.groups.io' ; Gao, Liming
> > > > > 
> > > > > Cc: Yao, Jiewen ; Wang, Jian J
> > > > > ; Xu, Min M ; Chen,
> > > > > Zeyi ; Wang, Fiona ;
> > > > > Lu,
> > > > > Xiaoyu1 ; Jiang, Guomin
> > > > > ; Kinney, Michael D
> > > > > 
> > > > > Subject: RE: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add
> > > > > GUID for
> > > > > CERT_RSA3072 and CERT_RSA4096
> > > > >
> > > > > Hi Gao, Liming,
> > > > > Could you help to review and merge this patch to MdePkg?
> > > > > This patch is only to add 2 new GUIDs.
> > > > > These 2 GUIDs will be used for adding RSA3072/RSA4096 cert
> > > > > support for secure boot feature.
> > > > > Thank you.
> > > > > BR
> > > > > Sheng Wei
> > > > >
> > > > > > > -Original Message-
> > > > > > > From: devel@edk2.groups.io  On Behalf
> > > > > > > Of
> > > > > Sheng
> > > > > > > Wei
> > > > > > > Sent: 2023年7月27日 14:35
> > > > > > > To: devel@edk2.groups.io
> > > > > > > Cc: Yao, Jiewen ; Wang, Jian J
> > > > > > > ; Xu, Min M ;
> > > > > > > Chen, Zeyi ; Wang, Fiona
> > > > > > > ; Lu,
> > > > > > > Xiaoyu1 ; Jiang, Guomin
> > > > > > > ; Kinney, Michael D
> > > > > > > ; Gao, Liming
> > > > 
> > > > > > > Subject: [edk2-devel] [PATCH V5 1/3] MdePkg/Include: Add
> > > > > > > GUID for
> > > > > > > CERT_RSA3072 and CERT_RSA4096
> > > > > > >
> > > > > > > Add gEfiCertRsa3072Guid and gEfiCer

[edk2-devel] [PATCH V6 2/2] SecurityPkg/SecureBoot: Support RSA 512 and RSA 384

2023-08-07 Thread Sheng Wei
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3413

Change-Id: Ic13595ffb0581a178db71d231ba34f17862fa5d8
Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Min Xu 
Cc: Zeyi Chen 
Cc: Fiona Wang 
Signed-off-by: Sheng Wei 
---
 .../Library/AuthVariableLib/AuthService.c | 218 +++---
 .../AuthVariableLib/AuthServiceInternal.h |   4 +-
 .../Library/AuthVariableLib/AuthVariableLib.c |  42 ++--
 .../DxeImageVerificationLib.c |  73 +++---
 .../SecureBootConfigDxe.inf   |   8 +
 .../SecureBootConfigImpl.c|  91 ++--
 .../SecureBootConfigImpl.h|   7 +
 .../SecureBootConfigStrings.uni   |   2 +
 8 files changed, 354 insertions(+), 91 deletions(-)

diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c 
b/SecurityPkg/Library/AuthVariableLib/AuthService.c
index d81c581d78..339021b79c 100644
--- a/SecurityPkg/Library/AuthVariableLib/AuthService.c
+++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c
@@ -29,12 +29,125 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 
+#define SHA_DIGEST_SIZE_MAX SHA512_DIGEST_SIZE
+
+/**
+  Retrieves the size, in bytes, of the context buffer required for hash 
operations.
+
+  If this interface is not supported, then return zero.
+
+  @return  The size, in bytes, of the context buffer required for hash 
operations.
+  @retval  0   This interface is not supported.
+
+**/
+typedef
+UINTN
+(EFIAPI *EFI_HASH_GET_CONTEXT_SIZE)(
+  VOID
+  );
+
+/**
+  Initializes user-supplied memory pointed by Sha1Context as hash context for
+  subsequent use.
+
+  If HashContext is NULL, then return FALSE.
+  If this interface is not supported, then return FALSE.
+
+  @param[out]  HashContext  Pointer to Hashcontext being initialized.
+
+  @retval TRUE   Hash context initialization succeeded.
+  @retval FALSE  Hash context initialization failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+typedef
+BOOLEAN
+(EFIAPI *EFI_HASH_INIT)(
+  OUT  VOID  *HashContext
+  );
+
+/**
+  Digests the input data and updates Hash context.
+
+  This function performs Hash digest on a data buffer of the specified size.
+  It can be called multiple times to compute the digest of long or 
discontinuous data streams.
+  Hash context should be already correctly initialized by HashInit(), and 
should not be finalized
+  by HashFinal(). Behavior with invalid context is undefined.
+
+  If HashContext is NULL, then return FALSE.
+  If this interface is not supported, then return FALSE.
+
+  @param[in, out]  HashContext  Pointer to the Hash context.
+  @param[in]   Data Pointer to the buffer containing the data to 
be hashed.
+  @param[in]   DataSize Size of Data buffer in bytes.
+
+  @retval TRUE   SHA-1 data digest succeeded.
+  @retval FALSE  SHA-1 data digest failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+typedef
+BOOLEAN
+(EFIAPI *EFI_HASH_UPDATE)(
+  IN OUT  VOID*HashContext,
+  IN  CONST VOID  *Data,
+  IN  UINTN   DataSize
+  );
+
+/**
+  Completes computation of the Hash digest value.
+
+  This function completes hash computation and retrieves the digest value into
+  the specified memory. After this function has been called, the Hash context 
cannot
+  be used again.
+  Hash context should be already correctly initialized by HashInit(), and 
should not be
+  finalized by HashFinal(). Behavior with invalid Hash context is undefined.
+
+  If HashContext is NULL, then return FALSE.
+  If HashValue is NULL, then return FALSE.
+  If this interface is not supported, then return FALSE.
+
+  @param[in, out]  HashContext  Pointer to the Hash context.
+  @param[out]  HashValuePointer to a buffer that receives the Hash 
digest
+value.
+
+  @retval TRUE   Hash digest computation succeeded.
+  @retval FALSE  Hash digest computation failed.
+  @retval FALSE  This interface is not supported.
+
+**/
+typedef
+BOOLEAN
+(EFIAPI *EFI_HASH_FINAL)(
+  IN OUT  VOID   *HashContext,
+  OUT UINT8  *HashValue
+  );
+
+typedef struct {
+  UINT32   HashSize;
+  EFI_HASH_GET_CONTEXT_SIZEGetContextSize;
+  EFI_HASH_INITInit;
+  EFI_HASH_UPDATE  Update;
+  EFI_HASH_FINAL   Final;
+  VOID **HashShaCtx;
+  UINT8*OidValue;
+  UINTNOidLength;
+} EFI_HASH_INFO;
+
 //
 // Public Exponent of RSA Key.
 //
 CONST UINT8  mRsaE[] = { 0x01, 0x00, 0x01 };
 
-CONST UINT8  mSha256OidValue[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 
0x02, 0x01 };
+UINT8  mSha256OidValue[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 
0x01 };
+UINT8  mSha384OidValue[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 
0x02 };
+UINT8  mSha512OidValue[] = { 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 
0x03 };
+
+EFI_HASH_INFO  mHashInfo[] = {
+  {SHA256_DIGEST_SIZE, Sha256GetContextSize, Sha256I

[edk2-devel] [PATCH V6 1/2] CryptoPkg/Library/BaseCryptLib: add sha384 and sha512 to ImageTimestampVerify

2023-08-07 Thread Sheng Wei
Register and initialize sha384/sha512 digest algorithms for PKCS#7 Handling.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3413

Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Min Xu 
Cc: Zeyi Chen 
Cc: Fiona Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
Cc: Michael D Kinney 

Change-Id: I208a618e3f6eb12704e528ab842494082de1464d
Signed-off-by: Sheng Wei 
---
 CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c 
b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
index 027dbb6842..944bcf8d38 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
@@ -591,7 +591,8 @@ ImageTimestampVerify (
   // Register & Initialize necessary digest algorithms for PKCS#7 Handling.
   //
   if ((EVP_add_digest (EVP_md5 ()) == 0) || (EVP_add_digest (EVP_sha1 ()) == 
0) ||
-  (EVP_add_digest (EVP_sha256 ()) == 0) || ((EVP_add_digest_alias 
(SN_sha1WithRSAEncryption, SN_sha1WithRSA)) == 0))
+  (EVP_add_digest (EVP_sha256 ()) == 0) || (EVP_add_digest (EVP_sha384 ()) 
== 0) ||
+  (EVP_add_digest (EVP_sha512 ()) == 0) || ((EVP_add_digest_alias 
(SN_sha1WithRSAEncryption, SN_sha1WithRSA)) == 0))
   {
 return FALSE;
   }
-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107612): https://edk2.groups.io/g/devel/message/107612
Mute This Topic: https://groups.io/mt/100596019/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH V6 0/2] SecureBoot: Support RSA 512 and RSA 384

2023-08-07 Thread Sheng Wei
Patch V6:
Remove the changes in MdePkg.
The changes of patch v6 are in CryptoPkg and SecurityPkg.
Set signature type to gEfiCertX509Guid when enroll RSA3072/RSA4096 KEK.
This signature type is used to check the supported signature and show the 
strings.

Patch V5:
Using define KEY_TYPE_RSASSA to replace the magic number.

Patch V4:
Determine the RSA algorithm by a supported algorithm list.

Patch V3:
Select SHA algorithm automaticly for a unsigned efi image.

Patch V2:
Determine the SHA algorithm by a supported algorithm list.
Create SHA context for each algorithm.

Test Case:
1. Enroll a RSA4096 Cert, and execute an RSA4096 signed efi image under UEFI 
shell. 
2. Enroll a RSA3072 Cert, and execute an RSA3072 signed efi image under UEFI 
shell. 
3. Enroll a RSA2048 Cert, and execute an RSA2048 signed efi image under UEFI 
shell. 
4. Enroll an unsigned efi image, execute the unsigned efi image under UEFI shell

Test Result:
Pass

Negative Test Case:
1) Enroll a RSA2048 Cert, execute an unsigned efi image.
2) Enroll a RSA2048 Cert, execute a RSA4096 signed efi image.
3) Enroll a RSA4096 Cert, execute a RSA3072 signed efi image.
4) Enroll a RSA4096 Cert to both DB and DBX, execute the RSA4096 signed efi 
image.

Test Result:
Get "Access Denied" when try to execute the efi image.

Cc: Jiewen Yao 
Cc: Jian J Wang 
Cc: Min Xu 
Cc: Zeyi Chen 
Cc: Fiona Wang 
Cc: Xiaoyu Lu 
Cc: Guomin Jiang 
Cc: Michael D Kinney 

Sheng Wei (2):
  CryptoPkg/Library/BaseCryptLib: add sha384 and sha512 to
ImageTimestampVerify
  SecurityPkg/SecureBoot: Support RSA 512 and RSA 384

 CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c   |   3 +-
 .../Library/AuthVariableLib/AuthService.c | 218 +++---
 .../AuthVariableLib/AuthServiceInternal.h |   4 +-
 .../Library/AuthVariableLib/AuthVariableLib.c |  42 ++--
 .../DxeImageVerificationLib.c |  73 +++---
 .../SecureBootConfigDxe.inf   |   8 +
 .../SecureBootConfigImpl.c|  91 ++--
 .../SecureBootConfigImpl.h|   7 +
 .../SecureBootConfigStrings.uni   |   2 +
 9 files changed, 356 insertions(+), 92 deletions(-)

-- 
2.26.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107611): https://edk2.groups.io/g/devel/message/107611
Mute This Topic: https://groups.io/mt/100596018/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-