[edk2-devel] Cancelled Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, April 9, 2024 #cal-cancelled

2024-04-08 Thread Group Notification
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:CANCEL
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20231222T233358Z
TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:2159780 
UID:mlda.1580078539586725120.r...@groups.io
DTSTAMP:20240409T063004Z
ORGANIZER;CN=Liming Gao;SENT-BY="mailto:gaolim...@byosoft.com.cn":mailto:
 gaolim...@byosoft.com.cn
DTSTART:20240410T013000Z
DTEND:20240410T023000Z
SUMMARY:TianoCore Bug Triage - APAC / NAMO
DESCRIPTION:TianoCore Bug Triage - APAC / NAMO\n\nHosted by Liming Gao\n\
 n
 \n\nMicrosoft Teams meeting\n\n*Join on your computer or mobile a
 pp*\n\nClick here to join the meeting ( https://teams.microsoft.com/l/mee
 tup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40
 thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255
 d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d )\n\n*Jo
 in with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Con
 ference ID: 116 062 094 0\n\nAlternate VTC dialing instructions ( https:/
 /conf.intel.com/teams/?conf=1160620940&ivr=teams&d=conf.intel.com&test=te
 st_call )\n\n*Or call in (audio only)*\n\n+1 916-245-6934\,\,77463821# ( 
 tel:+19162456934\,\,77463821# ) United States\, Sacramento\n\nPhone Confe
 rence ID: 774 638 21#\n\nFind a local number ( https://dialin.teams.micro
 soft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821 ) | Reset PIN (
  https://mysettings.lync.com/pstnconferencing )\n\nLearn More ( https://a
 ka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.com/
 meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e&tenantId
 =46c98d88-e344-4ed4-8496-4ed7712e255d&threadId=19_meeting_OTUyZTg2NjgtNDh
 lNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2&messageId=0&language=en-US )
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN
 2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-
 1242-431b-9a51-92cd01a5df3c%22%7d
SEQUENCE:1
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


[edk2-devel] [PATCH edk2-platforms 1/1] Sophgo/SG2042Pkg: Disable Svpbmt extension

2024-04-08 Thread Jingyu Li
From: "jingyu.li01" 

Disable Svpbmt extension as SG2042 does not support this feature.

Cc: Sunil V L 
Cc: USER0FISH 
Cc: caiyuqing379 
Cc: dahogn 
Cc: meng-cz 
Signed-off-by: Jingyu Li 
Reviewed-by: Sunil V L 
---
 Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc 
b/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc
index 127182487126..1198a30d29b8 100644
--- a/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc
+++ b/Platform/Sophgo/SG2042_EVB_Board/SG2042.dsc
@@ -265,7 +265,7 @@ [PcdsFixedAtBuild]
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeUseSerial|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdStatusCodeMemorySize|1
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
-  gEfiMdePkgTokenSpaceGuid.PcdRiscVFeatureOverride|0xFFFC
+  gEfiMdePkgTokenSpaceGuid.PcdRiscVFeatureOverride|0xFFF8
   gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x10
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxHardwareErrorVariableSize|0x8000
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117540): https://edk2.groups.io/g/devel/message/117540
Mute This Topic: https://groups.io/mt/105417216/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/1] OvmfPkg: OVMF supports USB mouses

2024-04-08 Thread Phillip Tennen
Hi, thank you for taking a look at the patch!

This patch can be verified to be working with this app (which was the
motivation for submitting this):
https://github.com/codyd51/uefirc/releases/tag/1.0.1.

I am happy to switch to a tablet device if that's a clearer choice (pending
environment setup/line ending issues on my end while generating the patch).

I am also happy to add this to other Omvf variants, but am less confident in
my ability to test those.

All the best,
Phillip

On Mon, Apr 8, 2024 at 8:35 AM Gerd Hoffmann  wrote:

> On Sat, Apr 06, 2024 at 02:41:54PM +0200, Heinrich Schuchardt wrote:
> > From: Phillip Tennen 
> >
> > From: Phillip Tennen 
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4747
> >
> > UsbMouseDxe was missing from the OVMF build description, so=20
> > the Simple Pointer Protocol wasn't usable from within QEMU.
>
> What is the use case?
>
> How can this be tested?  As far I know neither the edk2 setup utility
> (aka UiApp) nor typical OS boot loaders have mouse support ...
>
> Also note that virtual machines typically do *not* have a mouse but a
> tablet device, so UsbMouseAbsolutePointerDxe looks like the more
> sensible choice to me.
>
> >  OvmfPkg/OvmfPkgX64.dsc | 1 +
> >  OvmfPkg/OvmfPkgX64.fdf | 1 +
>
> What about the other ovmf variants?
>
> take care,
>   Gerd
>
>


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




回复: [edk2-devel] [PATCH v2 1/1] MdeModulePkg/AcpiTableDxe: PCD switch to avoid using ACPI reclaim memory

2024-04-08 Thread gaoliming via groups.io
PR https://github.com/tianocore/edk2/pull/5539 has been created.

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Aaron Li
> 发送时间: 2024年4月1日 10:32
> 收件人: devel@edk2.groups.io; Liming Gao 
> 抄送: Bi, Dandan ; Liu, Yun Y ;
> Yao, Jiewen ; Ni, Ray ; Kinney,
> Michael D ; Liu, Zhiguang
> 
> 主题: Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg/AcpiTableDxe: PCD
> switch to avoid using ACPI reclaim memory
> 
> Hi Liming,
> 
> Could you please help review and merge it? Thanks.
> 
> Best,
> Aaron
> 
> -Original Message-
> From: Liu, Zhiguang 
> Sent: Monday, April 1, 2024 10:06 AM
> To: Li, Aaron ; devel@edk2.groups.io
> Cc: Bi, Dandan ; Liming Gao
> ; Liu, Yun Y ; Yao, Jiewen
> ; Ni, Ray ; Kinney, Michael D
> 
> Subject: RE: [PATCH v2 1/1] MdeModulePkg/AcpiTableDxe: PCD switch to
> avoid using ACPI reclaim memory
> 
> Reviewed-by: Zhiguang Liu 
> 
> > -Original Message-
> > From: Li, Aaron 
> > Sent: Tuesday, March 26, 2024 3:58 PM
> > To: devel@edk2.groups.io
> > Cc: Liu, Zhiguang ; Bi, Dandan
> > ; Liming Gao ; Liu, Yun
> Y
> > ; Yao, Jiewen ; Ni, Ray
> > ; Kinney, Michael D 
> > Subject: [PATCH v2 1/1] MdeModulePkg/AcpiTableDxe: PCD switch to avoid
> > using ACPI reclaim memory
> >
> > UEFI spec defined ACPI Tables at boot time can be contained in memory of
> > type EfiACPIReclaimMemory or EfiAcpiMemoryNVS, although
> InstallAcpiTable
> > with AcpiTableProtocol will only allocate memory with type
> > EfiACPIReclaimMemory (Except FACS).
> >
> > This patch provides an optional method controlled by PCD to avoid using
> > EfiACPIReclaimMemory, by setting the PCD PcdNoACPIReclaimMemory to
> > TRUE, all ACPI allocated memory will use EfiAcpiMemoryNVS instead.
> >
> > Cc: Zhiguang Liu 
> > Cc: Dandan Bi 
> > Cc: Liming Gao 
> > Cc: Liu Yun 
> > Cc: Jiewen Yao 
> > Cc: Ray Ni 
> > Cc: Michael D Kinney 
> > Signed-off-by: Aaron Li 
> > ---
> >  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 37
> > +++-
> >  MdeModulePkg/MdeModulePkg.dec
> |  7 
> >  MdeModulePkg/MdeModulePkg.uni
> |  8 +
> >  MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf|  1
> +
> >  4 files changed, 45 insertions(+), 8 deletions(-)
> >
> > diff --git
> a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> > b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> > index e09bc9b704f5..080768033cfa 100644
> > --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> > +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
> > @@ -340,6 +340,7 @@ ReallocateAcpiTableBuffer (
> >EFI_ACPI_TABLE_INSTANCE  TempPrivateData;
> >EFI_STATUS   Status;
> >UINT64   CurrentData;
> > +  EFI_MEMORY_TYPE  AcpiAllocateMemoryType;
> >
> >CopyMem (&TempPrivateData, AcpiTableInstance, sizeof
> > (EFI_ACPI_TABLE_INSTANCE));
> >//
> > @@ -359,6 +360,12 @@ ReallocateAcpiTableBuffer (
> >   NewMaxTableNumber * sizeof (UINT32);
> >}
> >
> > +  if (PcdGetBool (PcdNoACPIReclaimMemory)) {
> > +AcpiAllocateMemoryType = EfiACPIMemoryNVS;  } else {
> > +AcpiAllocateMemoryType = EfiACPIReclaimMemory;  }
> > +
> >if (mAcpiTableAllocType != AllocateAnyPages) {
> >  //
> >  // Allocate memory in the lower 32 bit of address range for @@
> -372,13
> > +379,13 @@ ReallocateAcpiTableBuffer (
> >  PageAddress = 0x;
> >  Status  = gBS->AllocatePages (
> >   mAcpiTableAllocType,
> > - EfiACPIReclaimMemory,
> > + AcpiAllocateMemoryType,
> >   EFI_SIZE_TO_PAGES (TotalSize),
> >   &PageAddress
> >   );
> >} else {
> >  Status = gBS->AllocatePool (
> > -EfiACPIReclaimMemory,
> > +AcpiAllocateMemoryType,
> >  TotalSize,
> >  (VOID **)&Pointer
> >  );
> > @@ -512,6 +519,7 @@ AddTableToList (
> >EFI_PHYSICAL_ADDRESS  AllocPhysAddress;
> >UINT64Buffer64;
> >BOOLEAN   AddToRsdt;
> > +  EFI_MEMORY_TYPE   AcpiAllocateMemoryType;
> >
> >//
> >// Check for invalid input parameters @@ -550,6 +558,12 @@
> > AddTableToList (
> >CurrentTableList->TableSize  = CurrentTableSize;
> >CurrentTableList->PoolAllocation = FALSE;
> >
> > +  if (PcdGetBool (PcdNoACPIReclaimMemory)) {
> > +AcpiAllocateMemoryType = EfiACPIMemoryNVS;  } else {
> > +AcpiAllocateMemoryType = EfiACPIReclaimMemory;  }
> > +
> >//
> >// Allocation memory type depends on the type of the table
> >//
> > @@ -585,7 +599,7 @@ AddTableToList (
> >  // such as AArch64 that allocate multiples of 64 KB
> >  //
> >  Status = gBS->AllocatePool (
> > -EfiACPIReclaimMemory,
> > +AcpiAllocateMemoryType,
> >  CurrentTableLis

Re: [edk2-devel] [PATCH v2 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-04-08 Thread Chao Li

Hi Ray,

Ha, you mean to move the ConfigureMemoryManagementUint instance into 
some LoongArch PEIM, right? I just understood it wrong.


What I want to say is that this API can called in both virtual and 
really mechine, if it be moved into the private code, then if other 
platform want to call it, they will have to copy the same code under 
their private code. So I think it is better if this API or function is 
made public.



Thanks,
Chao
On 2024/4/9 13:27, Ni, Ray wrote:

Chao,
Current patch introduces the CpuMmuInitLib which contains 
ConfigureMemoryManagementUnit () API. You told me the API will be 
called by a PEIM.

Then, the new proposal is to move the library code into that PEIM.

I don't quite understand your needs of the new GUID to store the 
memory map resource. How is the GUID used to store the memory map 
resource?

Can the PEIM be placed in edk2-platforms repo?

Thanks,
Ray


*From:* Chao Li 
*Sent:* Tuesday, April 9, 2024 12:29
*To:* devel@edk2.groups.io ; Ni, Ray 
; Gerd Hoffmann 
*Cc:* Kumar, Rahul R ; Sami Mujawar 
; Sunil V L ; Bibo Mao 
; Dongyan Qian 
*Subject:* Re: [edk2-devel] [PATCH v2 00/13] Part 2 patch set to add 
LoongArch support into UefiCpuPkg


Hi Ray,

I'm willing change it to a PEIM if it doesn't fit as a library. I 
think if it is a PEIM, we need a new GUID to sotre the memory map 
resouce, or use an already defined GUID.


I will put it under the UefiCpuPkg, called CpuMmuInitPei, folder: 
UefiCpuPkg/CpuMmuInitPei/LoongArch64/. May I?



Thanks,
Chao
On 2024/4/9 10:06, Ni, Ray wrote:

Chao,
Sorry I missed your mail.

If ConfigureMemoryManagementUnit() is called in PEI, can you move
the logic to a LoongArch specific PEIM? My concern is we may need
more review on the lib API ConfigureMemoryManagementUnit() if we
position it as a library.

If we move the logic in a PEIM and the implementation becomes a
PEIM internal logic, we can lower the quality expectation of the
function prototype as no other module is able to call it.


Thanks,
Ray


For patches 10, 11: Can the lib be avoided if the
logic is implemented in CpuDxe driver?

This library is will be called in the PEI stage, so I
can't move it under the CpuDxe.

This library is the low-level libary of CpuMmuLib, which
will consume CpuMmuLIb to configure the MMU.

This way is suggested by Laszlo, who saied if CpuMmuLib
can not content the configure API(high-level libary is the
basecal libaray, it should not include the configure API),
we can split it into two, where the hight-livel is
CpuMmuLib, and the low-level is CpuMmuInitLib.


For patch 12(UefiCpuPkg: Add multiprocessor library
for LoongArch64): Reviewed-by: Ray Ni
 
For patch 13: Please make accordingly changes when you
address comments for patch 8.

OK.


Thanks,
Ray


*From:* Gerd Hoffmann 

*Sent:* Friday, March 22, 2024 20:39
*To:* Chao Li 

*Cc:* devel@edk2.groups.io
 
; Ni, Ray
 ; Kumar,
Rahul R 
; Sami Mujawar
 ;
Sunil V L 
; Bibo Mao
 ;
Dongyan Qian 

*Subject:* Re: [PATCH v2 00/13] Part 2 patch set to
add LoongArch support into UefiCpuPkg
On Wed, Mar 20, 2024 at 04:41:52PM +0800, Chao Li wrote:
> This patch set adjusted some order in UefiCpuPig
alphabetically, added
> LoongArch libraries and drivers into UefiCpuPkg, it
is a continuation of
> the first patch series v8 submitted at
> https://edk2.groups.io/g/devel/message/114526
.
>
> And also separated from
https://edk2.groups.io/g/devel/message/116583
.
>
> This series only contents the changes for UefiCpuPkg.
>
> Patch1-Patch4: Reorder some INF files located in
UefiCpuPkg
 

回复: [edk2-devel] [PATCH v2 3/9] MdePkg: Add devAuthBoot GlobalVariable

2024-04-08 Thread gaoliming via groups.io
Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Wenxing Hou
> 发送时间: 2024年4月8日 9:47
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney ; Liming Gao
> ; Zhiguang Liu ; Jiewen
> Yao 
> 主题: [edk2-devel] [PATCH v2 3/9] MdePkg: Add devAuthBoot GlobalVariable
> 
> According to UEFI 2.10 spec 3.3 Globally Defined Variables section,
> add devAuthBoot GlobalVariable.
> 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Jiewen Yao 
> Signed-off-by: Wenxing Hou 
> ---
>  MdePkg/Include/Guid/GlobalVariable.h  | 8 +++-
>  MdePkg/Include/Guid/ImageAuthentication.h | 5 -
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/MdePkg/Include/Guid/GlobalVariable.h
> b/MdePkg/Include/Guid/GlobalVariable.h
> index eb2ce6aaf2..eb6e5a043e 100644
> --- a/MdePkg/Include/Guid/GlobalVariable.h
> +++ b/MdePkg/Include/Guid/GlobalVariable.h
> @@ -1,7 +1,7 @@
>  /** @file
> 
>GUID for EFI (NVRAM) Variables.
> 
> 
> 
> -  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> 
> +  Copyright (c) 2006 - 2024, Intel Corporation. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
> 
>@par Revision Reference:
> 
> @@ -183,4 +183,10 @@ extern EFI_GUID  gEfiGlobalVariableGuid;
>  ///
> 
>  #define EFI_VENDOR_KEYS_VARIABLE_NAME  L"VendorKeys"
> 
> 
> 
> +///
> 
> +/// Whether the platform firmware is operating in device authentication
boot
> mode (1) or not (0).
> 
> +/// The content is UINT8.
> 
> +///
> 
> +#define EFI_DEVICE_AUTH_BOOT_MODE_NAME  L"devAuthBoot"
> 
> +
> 
>  #endif
> 
> diff --git a/MdePkg/Include/Guid/ImageAuthentication.h
> b/MdePkg/Include/Guid/ImageAuthentication.h
> index fe83596571..f95255c0fb 100644
> --- a/MdePkg/Include/Guid/ImageAuthentication.h
> +++ b/MdePkg/Include/Guid/ImageAuthentication.h
> @@ -1,7 +1,7 @@
>  /** @file
> 
>Image signature database are defined for the signed image validation.
> 
> 
> 
> -  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> 
> +  Copyright (c) 2009 - 2024, Intel Corporation. All rights reserved.
> 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
> 
>@par Revision Reference:
> 
> @@ -41,6 +41,9 @@
>  #define SETUP_MODE  1
> 
>  #define USER_MODE   0
> 
> 
> 
> +#define DEVICE_AUTH_BOOT_MODE_ENABLE   1
> 
> +#define DEVICE_AUTH_BOOT_MODE_DISABLE  0
> 
> +
> 
>  //
> **
> *
> 
>  // Signature Database
> 
>  //
> **
> *
> 
> --
> 2.26.2.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#117480):
> https://edk2.groups.io/g/devel/message/117480
> Mute This Topic: https://groups.io/mt/105394115/4905953
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaolim...@byosoft.com.cn]
> -=-=-=-=-=-=
> 





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




[edk2-devel] 回复: [PATCH] MdePkg: Update the comments of GetInformation function

2024-04-08 Thread gaoliming via groups.io
Reviewed-by: Liming Gao 

> -邮件原件-
> 发件人: Qingyu 
> 发送时间: 2024年4月8日 17:28
> 收件人: devel@edk2.groups.io
> 抄送: Liming Gao ; Michael D Kinney
> ; Zhiguang Liu ;
> Gahan Saraiya 
> 主题: [PATCH] MdePkg: Update the comments of GetInformation function
> 
> Refer to Uefi spec 2.10 section 11.11.2, add a new retval
> EFI_NOT_FOUND to
> EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
> Reference: [mantis #1866] - GetInfo() of Adapter Information
> Protocol should have a provision for IHV to return no data.
> 
> Cc: Liming Gao 
> Cc: Michael D Kinney 
> Cc: Zhiguang Liu 
> Signed-off-by: Qingyu 
> Signed-off-by: Gahan Saraiya 
> ---
>  MdePkg/Include/Protocol/AdapterInformation.h | 5 -
>  MdePkg/Library/DxeHstiLib/HstiAip.c  | 5 -
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/MdePkg/Include/Protocol/AdapterInformation.h
> b/MdePkg/Include/Protocol/AdapterInformation.h
> index ed19e5736c3c..8e4448eb0f87 100644
> --- a/MdePkg/Include/Protocol/AdapterInformation.h
> +++ b/MdePkg/Include/Protocol/AdapterInformation.h
> @@ -140,7 +140,9 @@ typedef struct {
> 
>This function returns information of type InformationType from the
> adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain
> Information for
> +  the requested InformationType, it fills InformationBlockSize with 0 and
> +  returns EFI_NOT_FOUND.
> 
>@param[in]  This   A pointer to the
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that
> defines the contents of InformationBlock.
> @@ -150,6 +152,7 @@ typedef struct {
> 
>@retval EFI_SUCCESSThe InformationType
> information was retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not
> known.
> +  @retval EFI_NOT_FOUND  Information is not available for
> the requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be
> completed due to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c
> b/MdePkg/Library/DxeHstiLib/HstiAip.c
> index a2454ffeaa7a..523a712e6f6e 100644
> --- a/MdePkg/Library/DxeHstiLib/HstiAip.c
> +++ b/MdePkg/Library/DxeHstiLib/HstiAip.c
> @@ -12,7 +12,9 @@
> 
>This function returns information of type InformationType from the
> adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain
> Information for
> +  the requested InformationType, it fills InformationBlockSize with 0 and
> +  returns EFI_NOT_FOUND.
> 
>@param[in]  This   A pointer to the
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that
> defines the contents of InformationBlock.
> @@ -22,6 +24,7 @@
> 
>@retval EFI_SUCCESSThe InformationType
> information was retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not
> known.
> +  @retval EFI_NOT_FOUND  Information is not available for
> the requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be
> completed due to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> --
> 2.39.1.windows.1





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




[edk2-devel] [PATCH] AlderlakeOpenBoardPkg: Fix BootStage 5 can't install Windows11.

2024-04-08 Thread dorax . hsueh
From: DoraX Hsueh 

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

1. Since installing windows does not meet the minimum system requirements,
   Added TPM related code to meet the requirements.
2. Remove FvAdvanced.

Cc: Sai Chaganty 
Cc: Rosen Chuang 
Cc: Saloni Kasbekar 
Cc: Haoyu Tang 
Cc: Nate DeSimone 
Signed-off-by: DoraX Hsueh 
---
 .../Include/Fdf/FlashMapInclude.fdf   | 20 +-
 .../AlderlakePRvp/OpenBoardPkg.fdf| 37 +++
 .../AlderlakePRvp/OpenBoardPkgPcd.dsc | 10 -
 .../AlderlakeOpenBoardPkg/BiosInfo/BiosInfo.c |  9 +
 .../BiosInfo/BiosInfo.inf |  2 -
 .../AlderlakeOpenBoardPkg/OpenBoardPkg.dec|  1 -
 6 files changed, 25 insertions(+), 54 deletions(-)

diff --git 
a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
index 03c198c0..9a4ae7e8 100644
--- 
a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
+++ 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
@@ -25,23 +25,21 @@ SET 
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize= 0x20
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareOffset = 
0x0003  # Flash addr (0xFF03)
 SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize  = 
0x0003  #
 
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedOffset= 
0x000E  # Flash addr (0xFF0E)
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize  = 
0x0031  #
-SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalOffset   = 
0x003F  # Flash addr (0xFF40)
-SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalSize = 
0x0036  #
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityOffset= 
0x0075  # Flash addr (0xFF76)
+SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalOffset   = 
0x000E  # Flash addr (0xFF40)
+SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalSize = 
0x0065  #
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityOffset= 
0x0073  # Flash addr (0xFF76)
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize  = 
0x0009  #
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootOffset  = 
0x007E  # Flash addr (0xFF7F)
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootOffset  = 
0x007C  # Flash addr (0xFF7F)
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize= 
0x000A  #
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootOffset= 
0x0088  # Flash addr (0xFF86)
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootOffset= 
0x0086  # Flash addr (0xFF86)
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize  = 
0x0018  #
 
-SET gBoardModuleTokenSpaceGuid.PcdFlashFvFirmwareBinariesOffset   = 
0x00A0  # Flash addr (0xFFA0)
+SET gBoardModuleTokenSpaceGuid.PcdFlashFvFirmwareBinariesOffset   = 
0x009E  # Flash addr (0xFFA0)
 SET gBoardModuleTokenSpaceGuid.PcdFlashFvFirmwareBinariesSize = 
0x0008  # Keep 0x8 or larger
-SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvOffset  = 
0x00A8  # Flash addr (0xFFA8)
+SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvOffset  = 
0x00A6  # Flash addr (0xFFA8)
 SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize= 
0x0023  #
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryOffset  = 
0x00CB  # Flash addr (0xFFCB)
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize= 
0x0004  #
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryOffset  = 
0x00C9  # Flash addr (0xFFCB)
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize= 
0x0006  #
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSOffset= 
0x00CF  # Flash addr (0xFFCF)
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize  = 
0x000A
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMOffset= 
0x00D9  # Flash addr (0xFFD9)
diff --git 
a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/OpenBoardPkg.fdf 
b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/OpenBoardPkg.fdf
index f1ce271b..7fb6198f 100644
--- a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/OpenBoardPkg.fdf
+++ b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/OpenBoardPkg.fdf
@@ -113,9 +113,15 @@ DATA = {
   #Blockmap[1]: End
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   ## This is the VARIABLE_STORE_HEADER
+!if gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable == TRUE
+  #  Signature: gEfiAuthenticatedVariableGuid = { 0xaaf32c78, 0x947b, 0x439a, 
{ 0xa1, 0x80, 0x2e, 0x14

[edk2-devel] [PATCH] AlderlakeSiliconPkg: Update for SPI2 Protocol and Identify flash regions by GUID

2024-04-08 Thread dorax . hsueh
From: DoraX Hsueh 

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

1. Updates references to the "PCH_SPI_PROTOCOL" to instead refer to 
"PCH_SPI2_PROTOCOL".
2. Updates the library to identify flash regions by GUID and internally
map the GUID entries to values specific to AlderlakeSiliconPkg.
3. Libs/modules that need to reference IntelSiliconPkg are updated.
4. Add B_TCO_IO_TCO1_CNT_TMR_HLT define.

Cc: Sai Chaganty 
Cc: Rosen Chuang 
Cc: Saloni Kasbekar 
Cc: Haoyu Tang 
Cc: Nate DeSimone 
Signed-off-by: DoraX Hsueh 
---
 .../Cpu/Include/Register/CommonMsr.h  |   4 +
 .../Fru/AdlPch/CommonLib.dsc  |   2 +-
 .../AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc |   2 -
 .../Include/Library/SpiAccessLib.h|  44 ++
 .../Include/Register/PttPtpRegs.h |  26 +
 .../Include/Register/TcoRegs.h|   1 +
 .../Spi/IncludePrivate/Library/SpiCommonLib.h |  60 +--
 .../Spi/IncludePrivate/Register/SpiRegs.h |   8 +-
 .../PeiDxeSmmSpiAccessLib.inf |  33 ++
 .../PeiDxeSmmSpiAccessLib/SpiAccessLib.c  |  75 +++
 .../IpBlock/Spi/Library/PeiSpiLib/PchSpi.c|   2 +-
 .../Spi/Library/PeiSpiLib/PeiSpiLib.inf   |   2 +-
 .../BaseSpiCommonLib/BaseSpiCommonLib.inf |  19 +-
 .../BaseSpiCommonLib/SpiCommon.c  | 491 --
 .../AlderlakeSiliconPkg/IpBlock/Spi/Smm/Spi.c |  30 +-
 .../IpBlock/Spi/Smm/SpiSmm.inf|   5 +-
 .../IncludePrivate/Library/SmmPchPrivateLib.h |  27 +
 .../SmmPchPrivateLib/SmmPchPrivateLib.c   |  61 +++
 .../SmmPchPrivateLib/SmmPchPrivateLib.inf |  32 ++
 .../Product/Alderlake/SiPkgDxeLib.dsc |   5 +
 Silicon/Intel/AlderlakeSiliconPkg/SiPkg.dec   |   4 +-
 21 files changed, 733 insertions(+), 200 deletions(-)
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/Include/Library/SpiAccessLib.h
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/Include/Register/PttPtpRegs.h
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/PeiDxeSmmSpiAccessLib.inf
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/SpiAccessLib.c
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/Pch/IncludePrivate/Library/SmmPchPrivateLib.h
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/Pch/LibraryPrivate/SmmPchPrivateLib/SmmPchPrivateLib.c
 create mode 100644 
Silicon/Intel/AlderlakeSiliconPkg/Pch/LibraryPrivate/SmmPchPrivateLib/SmmPchPrivateLib.inf

diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h 
b/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
index caa0e67b..44a476c0 100644
--- a/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
+++ b/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
@@ -56,5 +56,9 @@ typedef union {
 
 } MSR_CORE_THREAD_COUNT_REGISTER;
 
+/**
+  Special Chipset Usage MSR
+**/
+#define MSR_SPCL_CHIPSET_USAGE 0x01FE
 
 #endif /* _COMMONMSR_h */
diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc 
b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
index 3f508f83..ee5800a9 100644
--- a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
+++ b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
@@ -11,7 +11,7 @@
 
   
EspiLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Espi/Library/PeiDxeSmmEspiLib/PeiDxeSmmEspiLib.inf
 
-
+  
SpiAccessLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/PeiDxeSmmSpiAccessLib.inf
   
PmcLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Pmc/Library/PeiDxeSmmPmcLib/PeiDxeSmmPmcLib.inf
   
PmcPrivateLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Pmc/LibraryPrivate/PeiDxeSmmPmcPrivateLib/PeiDxeSmmPmcPrivateLib.inf
   
SpiCommonLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/BaseSpiCommonLib.inf
diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc 
b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
index ebe2bbfd..cbaf8e37 100644
--- a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
+++ b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
@@ -5,8 +5,6 @@
 #   SPDX-License-Identifier: BSD-2-Clause-Patent
 ##
 
-  SpiLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/Library/PeiSpiLib/PeiSpiLib.inf
-
   
GpioHelpersLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Gpio/LibraryPrivate/PeiGpioHelpersLib/PeiGpioHelpersLib.inf
 
 
diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Include/Library/SpiAccessLib.h 
b/Silicon/Intel/AlderlakeSiliconPkg/Include/Library/SpiAccessLib.h
new file mode 100644
index ..6e7f48fe
--- /dev/null
+++ b/Silicon/Intel/AlderlakeSiliconPkg/Include/Library/SpiAccessLib.h
@@ -0,0 +1,44 @@
+/** @file
+  SPI library header for abstraction of SPI HW registers accesses
+
+  Copyright (c) 2023, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+#ifndef _SPI_ACCESS_LIB_H_
+#define _SPI_ACCESS_LIB_H_
+
+
+/**
+  Returns SPI BAR0 value
+
+  @retval 

[edk2-devel] [PATCH] AlderlakeOpenBoardPkg: Change MinPlatform MinDsdt and Update SpiFlashCommonLib

2024-04-08 Thread dorax . hsueh
From: DoraX Hsueh 

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

1. Change MinPlatform MinDsdt to fix hang logo issue.
2. Update SecFspWrapperPlatformSecLib for FSP use.
3. Update SpiFlashCommonLib to fix boot assert issue.
4. Create SmmLocked callback to fix assert
5. Halt the TCO timer to fix release mode hang.

Cc: Sai Chaganty 
Cc: Rosen Chuang 
Cc: Saloni Kasbekar 
Cc: Haoyu Tang 
Cc: Nate DeSimone 
Signed-off-by: DoraX Hsueh 
---
 .../Acpi/MinDsdt/MinDsdt.asl  |  68 ---
 .../Acpi/MinDsdt/MinDsdt.c| 232 ---
 .../Acpi/MinDsdt/MinDsdt.inf  |  48 ---
 .../AlderlakePRvp/OpenBoardPkg.dsc|   7 +-
 .../AlderlakePRvp/OpenBoardPkg.fdf|   2 +-
 .../AlderlakePRvp/OpenBoardPkgPcd.dsc |   8 +
 .../FspWrapperPlatformSecLib.c| 186 +
 .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 394 ++
 .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h|  42 ++
 .../Ia32/PeiCoreEntry.nasm| 130 ++
 .../Ia32/SecEntry.nasm| 361 
 .../Ia32/Stack.nasm   |  72 
 .../PlatformInit.c|  55 +++
 .../SecFspWrapperPlatformSecLib.inf   | 107 +
 .../SecGetPerformance.c   |  89 
 .../SecPlatformInformation.c  |  78 
 .../SecRamInitData.c  |  57 +++
 .../SecTempRamDone.c  |  93 +
 .../Include/Library/SpiFlashCommon.h  |  99 -
 .../SmmSpiFlashCommonLib.inf  |  49 ---
 .../SmmSpiFlashCommonLib/SpiFlashCommon.c | 215 --
 .../SpiFlashCommonSmmLib.c|  60 ---
 .../OpenBoardPlatformInitPostMem.c|  96 +
 .../OpenBoardPlatformInitPostMem.inf  |  20 -
 .../DxeSaPolicyInit.c |  71 
 .../DxeSiliconPolicyUpdateLib.inf |   2 +
 .../PeiCpuPolicyUpdatePreMem.c|   3 -
 .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf |   3 +-
 28 files changed, 1752 insertions(+), 895 deletions(-)
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
 delete mode 100644 Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.c
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Fsp.h
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.nasm
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Stack.nasm
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/PlatformInit.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecGetPerformance.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecPlatformInformation.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecTempRamDone.c
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Include/Library/SpiFlashCommon.h
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SmmSpiFlashCommonLib.inf
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommon.c
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommonSmmLib.c

diff --git a/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl 
b/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
deleted file mode 100644
index be110145..
--- a/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
+++ /dev/null
@@ -1,68 +0,0 @@
-/** @file
-  ACPI minimum DSDT table
-
-   Copyright (c) 2022, Intel Corporation. All rights reserved.
-   SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-DefinitionBlock (
-  "DSDT.aml",
-  "DSDT",
-  0x01, // DSDT revision.
-// A Revision field value greater than or equal to 2 signifies that 
integers
-// declared within the Definition Block are to be evaluated as 64-bi

回复: [edk2-devel] [PATCH V5 0/6] SPI NOR Flash Driver for SFDP flash device

2024-04-08 Thread gaoliming via groups.io
Abner:
  The change is good to me. Reviewed-by: Liming Gao


Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Chang, Abner
> via groups.io
> 发送时间: 2024年4月4日 17:25
> 收件人: devel@edk2.groups.io
> 抄送: Michael D Kinney ; Liming Gao
> ; Zhiguang Liu ; Abdul
> Lateef Attar ; Hao A Wu ; Ray Ni
> ; Jian J Wang ; Brit Chesley
> 
> 主题: [edk2-devel] [PATCH V5 0/6] SPI NOR Flash Driver for SFDP flash
device
> 
> From: Abner Chang 
> 
> Sending V4 for review as SPI related ECR is approved by
> PIWG in PI spec 1.8A
> 
> In V5: Correct patch 6/6, as some source files are fixed in this patch.
> In RESEND V4: Add Cc in patch 6/6
> In V4: Enhance timeout algorithm
> In V3: Relocate GUIDs/PCDs for SPI SFDP drivers to
>MdeModulePkg.dec.
> In V2: Add maintainer entry for Bus/Spi.
> 
> This patch fixes the missing SPI defintions per to PI spec
> 1.8 errata A.
> This patch also provides the implemtation of SPI NOR flash
> driver that supports JEDEC SFDP specification.
> This driver support the flash device that has the GUID
> gEdk2JedecSfdpSpiDxeDriverGuid or gEdk2JedecSfdpSpiSmmDriverGuid
> declared in EFI_SPI_PERIPHERAL SpiPeripheralDriverGuid structure.
> 
> The driver has been verified with Macronix MX25U6435F flash device.
> 
> Signed-off-by: Abner Chang 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Abdul Lateef Attar 
> Cc: Hao A Wu 
> Cc: Ray Ni 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Cc: Brit Chesley 
> 
> Abner Chang (2):
>   MdeModulePkg: Add definitions in DEC for SPI NOR Flash SFDP driver
>   Maintainers: AMD as SPI driver stack maintainer
> 
> abnchang (4):
>   MdePkg/Include: Update definitions of SPI related header files
>   MdePkg/Include: Add SPI NOR Flash JEDEC SFDP header file
>   MdeModulePkg/SpiNorFlashJedecSfdp: SPI NOR Flash JEDEC SFDP
>   MdeModulePkg: Add SPI NOR FLash SFDP drivers to DSC
> 
>  MdeModulePkg/MdeModulePkg.dec |   28 +-
>  MdeModulePkg/MdeModulePkg.dsc |4 +-
>  .../SpiNorFlashJedecSfdpDxe.inf   |   64 +
>  .../SpiNorFlashJedecSfdpSmm.inf   |   64 +
>  .../Spi/SpiNorFlashJedecSfdp/SpiNorFlash.h|  286 +++
>  .../SpiNorFlashJedecSfdpInternal.h|  299 +++
>  .../IndustryStandard/SpiNorFlashJedecSfdp.h   |  324 +++
>  MdePkg/Include/Protocol/SpiConfiguration.h|   10 +-
>  MdePkg/Include/Protocol/SpiHc.h   |   16 +-
>  MdePkg/Include/Protocol/SpiIo.h   |   12 +-
>  .../Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c| 1141 +++
>  .../SpiNorFlashJedecSfdp.c| 1780
> +
>  .../SpiNorFlashJedecSfdpDxe.c |  261 +++
>  .../SpiNorFlashJedecSfdpSmm.c |  234 +++
>  Maintainers.txt   |   11 +
>  .../SpiNorFlashJedecSfdpDxe.uni   |   13 +
>  .../SpiNorFlashJedecSfdpExtra.uni |   11 +
>  .../SpiNorFlashJedecSfdpSmm.uni   |   13 +
>  18 files changed, 4566 insertions(+), 5 deletions(-)
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpDxe.inf
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpSmm.in
> f
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.h
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpInternal
> .h
>  create mode 100644
> MdePkg/Include/IndustryStandard/SpiNorFlashJedecSfdp.h
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlash.c
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdp.c
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpDxe.c
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpSmm.c
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpDxe.uni
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpExtra.u
> ni
>  create mode 100644
> MdeModulePkg/Bus/Spi/SpiNorFlashJedecSfdp/SpiNorFlashJedecSfdpSmm.u
> ni
> 
> --
> 2.37.1.windows.1
> 
> 
> 
> 
> 





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




[edk2-devel] PcdMemoryProfilePropertyMask declared as dynamic type

2024-04-08 Thread Yoshinoya
Hello,
PcdMemoryProfilePropertyMask declared as a PcdsFixedAtBuild type
It means user should recompile source code if he wants to change this pcd 
default value.


So, could we declare it as a PcdsDynamic type?


So, user could change PcdMemoryProfilePropertyMask's setting value through BIOS 
Setup UI or other method dynamically.


Thanks

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117530): https://edk2.groups.io/g/devel/message/117530
Mute This Topic: https://groups.io/mt/105416946/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 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-04-08 Thread Ni, Ray
Chao,
Current patch introduces the CpuMmuInitLib which contains 
ConfigureMemoryManagementUnit () API. You told me the API will be called by a 
PEIM.
Then, the new proposal is to move the library code into that PEIM.

I don't quite understand your needs of the new GUID to store the memory map 
resource. How is the GUID used to store the memory map resource?
Can the PEIM be placed in edk2-platforms repo?

Thanks,
Ray


From: Chao Li 
Sent: Tuesday, April 9, 2024 12:29
To: devel@edk2.groups.io ; Ni, Ray ; 
Gerd Hoffmann 
Cc: Kumar, Rahul R ; Sami Mujawar 
; Sunil V L ; Bibo Mao 
; Dongyan Qian 
Subject: Re: [edk2-devel] [PATCH v2 00/13] Part 2 patch set to add LoongArch 
support into UefiCpuPkg


Hi Ray,

I'm willing change it to a PEIM if it doesn't fit as a library. I think if it 
is a PEIM, we need a new GUID to sotre the memory map resouce, or use an 
already defined GUID.

I will put it under the UefiCpuPkg, called CpuMmuInitPei, folder: 
UefiCpuPkg/CpuMmuInitPei/LoongArch64/. May I?

Thanks,
Chao
On 2024/4/9 10:06, Ni, Ray wrote:
Chao,
Sorry I missed your mail.

If ConfigureMemoryManagementUnit() is called in PEI, can you move the logic to 
a LoongArch specific PEIM? My concern is we may need more review on the lib API 
ConfigureMemoryManagementUnit() if we position it as a library.

If we move the logic in a PEIM and the implementation becomes a PEIM internal 
logic, we can lower the quality expectation of the function prototype as no 
other module is able to call it.

Thanks,
Ray


For patches 10, 11: Can the lib be avoided if the logic is implemented in 
CpuDxe driver?

This library is will be called in the PEI stage, so I can't move it under the 
CpuDxe.

This library is the low-level libary of CpuMmuLib, which will consume CpuMmuLIb 
to configure the MMU.

This way is suggested by Laszlo, who saied if CpuMmuLib can not content the 
configure API(high-level libary is the basecal libaray, it should not include 
the configure API), we can split it into two, where the hight-livel is 
CpuMmuLib, and the low-level is CpuMmuInitLib.


For patch 12(UefiCpuPkg: Add multiprocessor library for LoongArch64): 
Reviewed-by: Ray Ni 
For patch 13: Please make accordingly changes when you address comments for 
patch 8.
OK.

Thanks,
Ray

From: Gerd Hoffmann 
Sent: Friday, March 22, 2024 20:39
To: Chao Li 
Cc: devel@edk2.groups.io 
; Ni, Ray 
; Kumar, Rahul R 
; Sami Mujawar 
; Sunil V L 
; Bibo Mao 
; Dongyan Qian 

Subject: Re: [PATCH v2 00/13] Part 2 patch set to add LoongArch support into 
UefiCpuPkg

On Wed, Mar 20, 2024 at 04:41:52PM +0800, Chao Li wrote:
> This patch set adjusted some order in UefiCpuPig alphabetically, added
> LoongArch libraries and drivers into UefiCpuPkg, it is a continuation of
> the first patch series v8 submitted at
> https://edk2.groups.io/g/devel/message/114526.
>
> And also separated from https://edk2.groups.io/g/devel/message/116583.
>
> This series only contents the changes for UefiCpuPkg.
>
> Patch1-Patch4: Reorder some INF files located in UefiCpuPkg
> alphabetically.
>
> Patch5-Patch13: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, CpuDxe
> for LoongArch, and added some PCD and header files requested by the
> above libraries and drivers.
>
> Modfied modules: UefiCpuPkg
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734
>
> PR: https://github.com/tianocore/edk2/pull/5483
>
> V1 -> V2:
> 1. Removed PcdCpuMmuIsEnabled.
> 2. Removed API GetMemoryRegionAttributes API as it is no longer needed.
> 3. Patch3, added two empty line in DXE and PEI INF files.
> 4. Patch5, added the Status check in GetTimeInnanoSecond function.
> 5. Separated into two series, this is series one, and the second one is
> OvmfPkg.

While I can't comment on the loongarch architecture details the code
and the integration into build system looks overall sane to me.

Series:
Acked-by: Gerd Hoffmann 

take care,
  Gerd




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




Re: [edk2-devel] [PATCH] IntelFsp2Pkg: Optional Plugin for FSP SecCore/PeiCore Rebasing

2024-04-08 Thread Ni, Ray


This optional plugin is designed to execute before the FSP SecCore to
rebase SecCore and PeiCore during runtime. If the FSP binary requires
rebasing at runtime, this module should be included within the FSP
binary. Additionally, specific patches must be applied to ensure proper
functionality.
In the absence of this module, manual patching of API offsets within
the FSP header is necessary. To illustrate, let's consider a scenario
within FSP-S where 'FspSiliconInitEntry' is the initial API to be
executed post-rebase.
Rather than directly inputting the 'FspSiliconInit' offset into the
'FspSiliconInitEntryOffset' field of the FSP header, the entry point
of this module should be used.
Furthermore, the 'FspSiliconInit' offset should be placed into
'AsmGetFspSecEntry', which signifies the address to which this module
will jump.
It is also essential to patch the image bases of SecCore and PeiCore
to enable the rebasing functionality of this module.

The following is an example of how to apply the necessary patches:
Patch Address   Patch Value
 PreFspSecS:_ModuleEntryPoint - [0x]
PreFspSecS:SecCoreRelativeOff   PreFspSecS:AsmGetFspSecCore
   - Fsp24SecCoreS:BASE
PreFspSecS:PeiCoreRelativeOff   PreFspSecS:AsmGetFspPeiCore
   - PeiCore:BASE
PreFspSecS:SecEntryRelativeOff  PreFspSecS:AsmGetFspSecEntry
  - Fsp24SecCoreS:FspSiliconInitApi


[Ray.1] Can you emphasize this optional plug-in only applies to 64bit FSP?



+/**
+  Relocate Pe/Te Image
+
+  @param[in] ImageBaseAddress   Image base address
+
+  @retval EFI_SUCCESS   Image is relocated successfully
+  @retval OthersImage is not relocated successfully
+**/
+EFI_STATUS
+RelocatePeTeImage (
+  UINT64  ImageBaseAddress
+  )
+{
+  RETURN_STATUS Status;
+  PE_COFF_LOADER_IMAGE_CONTEXT  ImageContext;
+
+  ZeroMem (&ImageContext, sizeof (ImageContext));
+
+  ImageContext.Handle= (VOID *)ImageBaseAddress;
+  ImageContext.ImageRead = PeCoffLoaderImageReadFromMemory;
+
+  Status = PeCoffLoaderGetImageInfo (&ImageContext);
+  if (EFI_ERROR (Status)) {
+ASSERT_EFI_ERROR (Status);
+return Status;
+  }
+
+  ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)ImageBaseAddress;
+
+  //
+  // rebase the image
+  //
+  Status = PeCoffLoaderRelocateImage (&ImageContext);
+
+  ASSERT_EFI_ERROR (Status);
+  return Status;
+}
+
+/**
+  This function will patch the Sec Core and Pei Core in current FSP.
+**/
+VOID
+EFIAPI
+FspPatchSecAndPeiCore (

[Ray.2] Can you rename it as "Fsp*Relocate*SecAndPeiCore"?
It's to align with "RelocatePeTeImage".

+;
+;
+global ASM_PFX(_ModuleEntryPoint)
+ASM_PFX(_ModuleEntryPoint):
+  PUSHA_64
+  call   ASM_PFX(FspPatchSecAndPeiCore)
+  POPA_64
+  call   ASM_PFX(AsmGetFspSecEntry)
+  jmprax
+
+global ASM_PFX(AsmGetFspSecCore)

[Ray.3] rename as AsmGetFspSecCoreImageBase and add function header.

+ASM_PFX(AsmGetFspSecCore):
+   lea   rax, [ASM_PFX(AsmGetFspSecCore)]
+   mov   rcx, rax
+   xor   rdx, rdx
+   DB0x48, 0x2d   ; sub rax, 0x
+global ASM_PFX(SecCoreRelativeOff)
+ASM_PFX(SecCoreRelativeOff):
+   DD0; This value can be patched by the build 
script if need to rebase SecCore

[Ray.4] ; RAX = SecCore image base at runtime, RCX = AsmGetFspSecCore runtime 
address

+   xchgrax, rcx   ; After exchange, rcx is the value be 
subtract by the patched value
+  ; rax == rcx means patched value is zero
[Ray.5] ; RCX = SecCore image base at runtime, RAX = AsmGetFspSecCore runtime 
address.
; If SecCoreRelativeOff is not patched, RCX = RAX = AsmGetFspSecCore runtime 
address. This happens when there is no SecCore in the binary.


+   CMPXCHG rcx, rdx   ; if (rcx == rax) {rcx = rdx (0) } else {rax 
= rcx (SecCore image base at runtime)}
+   mov rax, rcx
+   ret
+
+global ASM_PFX(AsmGetFspPeiCore)
+ASM_PFX(AsmGetFspPeiCore):
+   lea   rax, [ASM_PFX(AsmGetFspPeiCore)]
+   mov   rcx, rax
+   xor   rdx, rdx
+   DB0x48, 0x2d   ; sub rax, 0x
+global ASM_PFX(PeiCoreRelativeOff)
+ASM_PFX(PeiCoreRelativeOff):
+   DD0; This value can be patched by the build 
script if need to rebase PeiCore
+   xchgrax, rcx   ; After exchange, rcx is the value be 
subtract by the patched value
+  ; rax == rcx means patched value is zero
+   CMPXCHG rcx, rdx   ; if (rcx == rax) {rcx = rdx} else {rax = 
rcx}
+   mov rax, rcx
+   ret
+



[Ray.6] rename it as AsmGetFspOriginalEntry.
+global ASM_PFX(AsmGetFspSecEntry)
+ASM_PFX(AsmGetFspSecEntry):
+   lea   rax, [ASM_PFX(AsmGetFspSecEntry)]
+   DB0x48, 0x2d   ; sub rax, 0x
+global ASM_PFX(SecEntryRelativeOff)
+ASM_PFX(SecEntryRelativeOff):

Re: [edk2-devel] OVMF SMM Support

2024-04-08 Thread Wu, Jiaxin
Thank you Michael & Gerd, it does the problem of 
https://gitlab.com/qemu-project/qemu/-/issues/2064.

The issue is gone with latest QEMU version.

Thanks,
Jiaxin

> -Original Message-
> From: Michael Kubacki 
> Sent: Tuesday, April 9, 2024 8:55 AM
> To: devel@edk2.groups.io; Wu, Jiaxin ; Gerd Hoffmann
> 
> Subject: Re: [edk2-devel] OVMF SMM Support
> 
> Might be related to this issue
> https://gitlab.com/qemu-project/qemu/-/issues/2064.
> 
> On 4/8/2024 4:33 AM, Wu, Jiaxin wrote:
> > Hi Gerd,
> >
> > With below OVMF build and QEMU command, OVMF hangs after
> SendSmiIpi
> > (mBspApicId) during SmmRelocateBases(), is there any issues with latest
> > code to support SMM on OVMF or my local command/configuration issue?
> >
> > *Build (latest edk2 code):*
> >
> > build -p OvmfPkg\OvmfPkgIa32X64.dsc -a IA32 -a X64 -D SECURE_BOOT -D
> > SMM_REQUIRE -D DEBUG_ON_SERIAL_PORT
> >
> > *QEMU command (QEMU version: 8.2.0):*
> >
> > qemu-system-x86_64 -machine q35,smm=on -m 4G -net none -drive
> >
> if=pflash,format=raw,unit=0,file=C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG
> _VS2019\FV\OVMF_CODE.fd,readonly=on -drive
> if=pflash,format=raw,unit=1,file=C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG
> _VS2019\FV\OVMF_VARS.fd -hda fat:rw:hda-contents -serial file:log.log
> >
> > Thanks,
> >
> > Jiaxin
> >
> > 


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




Re: [edk2-devel] [edk2-platforms][PATCH v3 1/5] MdeModulePkg: Allow dynamic generation of HEST ACPI table

2024-04-08 Thread Dhaval Sharma
Hi,
Is there any plan to upstream these HEST/ACPI patches? They seem to be arch 
agnostic.


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




[edk2-devel] [PATCH v5 6/6] uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test

2024-04-08 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLock Locked with
 Key State test cases
 -Add remaining Assertions 32 - 49 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest
 -Changed several assertion strings to be more
  descriptive

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  90 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  11 +-
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  36 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 715 +++-
 4 files changed, 828 insertions(+), 24 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 065f197987cc..cf7f3e180f54 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -118,6 +118,60 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_031_GUID \
 { 0xe88b22ce, 0x3de6, 0x49b0, {0xb2, 0x46, 0x9e, 0x35, 0x98, 0x2b, 0x9b, 0x1c 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_032_GUID \
+{ 0xc8894201, 0x7a3a, 0x47d4, {0xa8, 0x8d, 0xdf, 0x4b, 0x03, 0xff, 0xde, 0x4f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_033_GUID \
+{ 0x38a813ac, 0x8eb9, 0x46ce, {0xa8, 0x6b, 0x40, 0x8c, 0x07, 0x5f, 0xc7, 0xed 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_034_GUID \
+{ 0x919b8392, 0xcb78, 0x49ff, {0xa3, 0x18, 0x49, 0x78, 0x76, 0xe0, 0xf8, 0xf8 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_035_GUID \
+{ 0x219abaf2, 0x04a9, 0x407c, {0xb5, 0xde, 0xa0, 0x03, 0x6e, 0x65, 0xb0, 0xb9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_036_GUID \
+{ 0x9a51640a, 0xff14, 0x402b, {0xb0, 0x57, 0xa0, 0xc4, 0xf7, 0x20, 0x8e, 0x44 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_037_GUID \
+{ 0x8ccd0dbb, 0x9b0a, 0x4bfb, {0xa0, 0x7e, 0xc6, 0x06, 0x8b, 0x91, 0x0d, 0xfb 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_038_GUID \
+{ 0xde6f4e17, 0xe375, 0x4dcb, {0x8f, 0x07, 0x77, 0x7e, 0x62, 0x49, 0xea, 0x2c 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_039_GUID \
+{ 0x4ab6927b, 0x5ee4, 0x4748, {0xa4, 0x9d, 0x2d, 0xf3, 0x70, 0x01, 0x41, 0xd5 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_040_GUID \
+{ 0x33142ecf, 0x0f92, 0x4625, {0xb7, 0xf6, 0x7f, 0x15, 0x25, 0x74, 0xd3, 0x03 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_041_GUID \
+{ 0xf73c04df, 0x2e42, 0x4174, {0x82, 0x18, 0x0f, 0x25, 0x46, 0x4a, 0x55, 0xe9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_042_GUID \
+{ 0xd4eacf82, 0x55d1, 0x4ba1, {0xbe, 0x89, 0x6a, 0x2e, 0x44, 0x0f, 0xc7, 0xc0 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_043_GUID \
+{ 0xfd88fe63, 0x5ed4, 0x482a, {0x98, 0x44, 0x23, 0x90, 0xf9, 0x09, 0x1c, 0x20 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_044_GUID \
+{ 0x176f16cb, 0xf3a4, 0x4f12, {0x8f, 0x96, 0x4a, 0xc1, 0x8b, 0xdd, 0x6e, 0x3c 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_045_GUID \
+{ 0xf0d5e7b3, 0xdc0f, 0x4a18, {0xb9, 0x78, 0x09, 0x3b, 0x15, 0x55, 0x66, 0xbf 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_046_GUID \
+{ 0x9bf14c4b, 0x2950, 0x4c4e, {0x8b, 0xa3, 0x06, 0x46, 0xf1, 0x27, 0x8c, 0x05 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_047_GUID \
+{ 0xb0468dee, 0xb1d0, 0x4795, {0x9f, 0xbf, 0xbe, 0x3f, 0x40, 0x2f, 0x3d, 0x6f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_048_GUID \
+{ 0x1f7dd903, 0xcd58, 0x4d6f, {0x80, 0xd6, 0x4f, 0x6d, 0xcb, 0x4a, 0xd6, 0xc9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_049_GUID \
+{ 0x439179c2, 0x744d, 0x43bc, {0xb0, 0x67, 0x7b, 0x65, 0x60, 0x62, 0x6f, 0x5e 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -179,3 +233,39 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid029;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid030;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid032;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid033;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid034;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFu

[edk2-devel] [PATCH v5 5/6] uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test

2024-04-08 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLock Locked No Key
 State test cases
 -Add Assertions 21 - 31 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  55 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  11 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  22 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 472 
 4 files changed, 560 insertions(+)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 1ca43a393f29..065f197987cc 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -85,6 +85,39 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_020_GUID \
 { 0x2eba284a, 0xf701, 0x4c19, {0xbe, 0x5c, 0x39, 0x27, 0xb0, 0x68, 0x4f, 0xd7 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_021_GUID \
+{ 0x9a1b44ae, 0x08ce, 0x474c, {0xa5, 0x8e, 0xa6, 0xe2, 0xcf, 0xaf, 0x91, 0x2c 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_022_GUID \
+{ 0x490d7b39, 0xcad4, 0x4e8c, {0xb1, 0x5d, 0x63, 0xd2, 0x0c, 0xb3, 0xe9, 0x45 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_023_GUID \
+{ 0x397394ae, 0xce01, 0x4350, {0xa2, 0x0c, 0xe1, 0xb3, 0xe8, 0x74, 0xdc, 0x01 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_024_GUID \
+{ 0x9cf27a60, 0x94b5, 0x4e2e, {0xb3, 0x2b, 0x51, 0x0f, 0x24, 0x7a, 0x80, 0xd7 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_025_GUID \
+{ 0x766dc008, 0x2a88, 0x4eed, {0x91, 0x95, 0x46, 0x92, 0xdc, 0xcc, 0x1d, 0xf6 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_026_GUID \
+{ 0x5f66c8e5, 0x1bf8, 0x4af4, {0x86, 0x45, 0xf4, 0x93, 0xa0, 0xee, 0x26, 0x88 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_027_GUID \
+{ 0x1064f6ce, 0xb307, 0x4981, {0xac, 0x8f, 0xe5, 0xca, 0x20, 0x6c, 0x1b, 0x8b 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_028_GUID \
+{ 0x40f2c4e9, 0xe937, 0x426e, {0x98, 0xc5, 0x62, 0xca, 0x23, 0x68, 0x52, 0xd0 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_029_GUID \
+{ 0x6d5dcb4d, 0xe008, 0x41cc, {0x98, 0x32, 0xdf, 0xa8, 0x38, 0xb1, 0xb6, 0x02 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_030_GUID \
+{ 0x29b81ee0, 0x368d, 0x447c, {0x9e, 0xd0, 0xa5, 0xfe, 0xd7, 0x02, 0x65, 0x7b 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_031_GUID \
+{ 0xe88b22ce, 0x3de6, 0x49b0, {0xb2, 0x46, 0x9e, 0x35, 0x98, 0x2b, 0x9b, 0x1c 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -124,3 +157,25 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid019;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid020;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid021;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid022;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid023;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid024;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid025;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid026;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid027;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid028;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid029;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid030;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid031;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 15eedc60f19d..94ed476f86ad 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCG

[edk2-devel] [PATCH v5 4/6] uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test

2024-04-08 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLock Unlocked State
 test cases
 -Add Assertions 17, 18, 19, and 20 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  20 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |   7 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|   8 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 241 +++-
 4 files changed, 275 insertions(+), 1 deletion(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 891f494dbc70..1ca43a393f29 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -73,6 +73,18 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID \
 { 0x169a43cc, 0x23fa, 0x4887, {0x8b, 0x4f, 0x11, 0xb2, 0xa0, 0x88, 0x4f, 0x63 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_017_GUID \
+{ 0x7c11d0ab, 0x7a84, 0x482b, {0xb7, 0x5a, 0xd7, 0x72, 0x6c, 0x3e, 0xae, 0x0e 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_018_GUID \
+{ 0xbbaa52b6, 0x5576, 0x4acd, {0xb9, 0x5f, 0x86, 0x22, 0x5e, 0xfc, 0xb0, 0x31 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_019_GUID \
+{ 0x60b227e0, 0x9f5c, 0x412c, {0x88, 0x79, 0xd3, 0x59, 0xfc, 0xd0, 0xdd, 0x3f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_020_GUID \
+{ 0x2eba284a, 0xf701, 0x4c19, {0xbe, 0x5c, 0x39, 0x27, 0xb0, 0x68, 0x4f, 0xd7 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -104,3 +116,11 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid018;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid019;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid020;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 553959762be8..15eedc60f19d 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
@@ -100,6 +100,13 @@ TCGMemoryOverwriteRequestControlLockSetVariable (
   IN RESET_DATA   *ResetData
   );
 
+EFI_STATUS
+TCGMemoryOverwriteRequestControlLockUnlockedState (
+  IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL   *StandardLib,
+  IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL   *RecoveryLib,
+  IN RESET_DATA   *ResetData
+);
+
 // 
 //   Entry GUIDs for Test
 // 
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
index d861c44e3960..fe8853452979 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
@@ -59,3 +59,11 @@ EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014 = EFI_TEST_TCGMO
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_015_GUID;
 
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID;
+
+EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid017 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSER

[edk2-devel] [PATCH v5 3/6] uefi-sct/SctPkg: TCG MORLOCK SetVariable Test

2024-04-08 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlLockSetVariable test
 cases
 -Add Assertions 7 through 16 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  50 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |   8 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  20 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 418 
 4 files changed, 496 insertions(+)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index 1d6d86ebed07..891f494dbc70 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -43,6 +43,36 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID \
 { 0x94811e97, 0x7513, 0x4099, {0xae, 0xb8, 0x5a, 0x7e, 0x7d, 0x50, 0xb4, 0x99 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_007_GUID \
+{ 0x15378290, 0x17dd, 0x4cbf, {0x8e, 0x8f, 0xc2, 0x4b, 0xc9, 0x09, 0xb4, 0x14 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_008_GUID \
+{ 0x5f0b42ef, 0x3cec, 0x46ad, {0xbc, 0x5b, 0xc3, 0x7a, 0x1d, 0x45, 0x41, 0x29 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_009_GUID \
+{ 0x9665c8d9, 0x267c, 0x4393, {0xa4, 0x72, 0x10, 0x54, 0x43, 0x56, 0x20, 0x21 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_010_GUID \
+{ 0xce655812, 0xcc40, 0x42b0, {0x80, 0xd1, 0xa7, 0x26, 0xdb, 0x14, 0x9e, 0xa8 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_011_GUID \
+{ 0xd34348ad, 0x5d46, 0x4961, {0x91, 0x3e, 0xb1, 0xf2, 0xc5, 0xe7, 0x0f, 0x7d 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_012_GUID \
+{ 0x838311e0, 0x419a, 0x4c92, {0x90, 0x60, 0xbf, 0x94, 0x59, 0xd3, 0xc3, 0x59 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_013_GUID \
+{ 0x12998a9c, 0xc863, 0x4572, {0x80, 0x6c, 0xb6, 0x40, 0x97, 0x91, 0x89, 0x7f 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_014_GUID \
+{ 0xebd4ba26, 0x44c3, 0x464a, {0x88, 0xe3, 0x3b, 0x44, 0x94, 0x88, 0xbb, 0xb8 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_015_GUID \
+{ 0x00920c8e, 0x241d, 0x4da0, {0x8b, 0x59, 0xc3, 0xad, 0xe0, 0xd6, 0x4e, 0xc9 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_016_GUID \
+{ 0x169a43cc, 0x23fa, 0x4887, {0x8b, 0x4f, 0x11, 0xb2, 0xa0, 0x88, 0x4f, 0x63 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -54,3 +84,23 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid007;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid008;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid009;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid010;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid011;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid012;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid013;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid014;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid015;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid016;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 46c2c2faa388..553959762be8 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
@@ -49,6 +49,7 @@ typedef struct _RESET_DATA {
 #define MOR_BIT_HIGH  0x1
 
 #define MOR_LOCK_DATA_UNLOCKED0x0
+#define MOR_LOCK_DATA_LOCKED_WITHOUT_KEY  0x1

[edk2-devel] [PATCH v5 2/6] uefi-sct/SctPkg: TCG MOR SetVariable Test

2024-04-08 Thread Abhimanyu Singh
SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement MemoryOverwriteRequestControlSetVariable test cases
 -Add Assertions 5 and 6 from SCT spec
 -Add Test Case to MemoryOverwriteRequestFunctionTest

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  10 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |   7 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|   4 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 141 
 4 files changed, 162 insertions(+)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
index a3d87a3eb764..1d6d86ebed07 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
@@ -37,6 +37,12 @@ Abstract:
 #define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_004_GUID \
 { 0x002519c6, 0x859f, 0x4d25, {0xb1, 0x36, 0xb2, 0xef, 0x61, 0xe5, 0xd9, 0x6f 
}}
 
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_005_GUID \
+{ 0x13e97668, 0xe905, 0x452d, {0xa0, 0x72, 0x03, 0xde, 0xbf, 0x53, 0xdf, 0xa2 
}}
+
+#define EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID \
+{ 0x94811e97, 0x7513, 0x4099, {0xae, 0xb8, 0x5a, 0x7e, 0x7d, 0x50, 0xb4, 0x99 
}}
+
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid001;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
@@ -44,3 +50,7 @@ extern EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002;
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid003;
 
 extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005;
+
+extern EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
index 45bd921ecca4..46c2c2faa388 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
@@ -85,6 +85,13 @@ TCGMemoryOverwriteRequestPlatformResetCheck (
   IN RESET_DATA   *ResetData
   );
 
+EFI_STATUS
+TCGMemoryOverwriteRequestControlSetVariable (
+  IN EFI_STANDARD_TEST_LIBRARY_PROTOCOL   *StandardLib,
+  IN EFI_TEST_RECOVERY_LIBRARY_PROTOCOL   *RecoveryLib,
+  IN RESET_DATA   *ResetData
+  );
+
 // 
 //   Entry GUIDs for Test
 // 
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
index 59c798a710f1..649de8196990 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
@@ -35,3 +35,7 @@ EFI_GUID 
gTCGMemoryOverwriteRequestTestFunctionAssertionGuid002 = EFI_TEST_TCGMO
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid003 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_003_GUID;
 
 EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid004 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_004_GUID;
+
+EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid005 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_005_GUID;
+
+EFI_GUID gTCGMemoryOverwriteRequestTestFunctionAssertionGuid006 = 
EFI_TEST_TCGMORTESTFUNCTION_ASSERTION_006_GUID;
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
index 8acad88b2365..2b9f5dd93a32 100644
--- 
a/uefi-sct/SctPkg/TestCase/

[edk2-devel] [PATCH v5 1/6] uefi-sct/SctPkg: TCG Platform Reset Check Test

2024-04-08 Thread Abhimanyu Singh
From: "Abhi.Singh" 

SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

-Implement initial test infrastructure for all test cases
 including updates to: CommonGenFramework.sh, UEFI_SCT.dsc,
 and Category.ini.
-Add Guid.c and Guid.h files to cover the assertions 4/49
 assertions defined in the SCT spec
-Add TCGMemoryOverwriteRequestBBTestMain.h alongside used
 define/global variables
-Add Platform Reset Check Test
 -check if the platform creates the MOR & MORLOCK
  EFI variables as defined in the TCG Spec
 -sets MOR bit 0 and validate if the platform
  clears the MOR bit 0 upon reset.

Cc: G Edhaya Chandran 
Cc: Barton Gao 
Cc: Carolyn Gjertsen 

Signed-off-by: Abhi Singh 

Reviewed-by: Stuart Yoder 
---
 uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc  
|   1 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
   |  53 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  46 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  95 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  37 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 451 
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c
 | 115 +
 uefi-sct/SctPkg/CommonGenFramework.sh  
|   1 +
 uefi-sct/SctPkg/Config/Data/Category.ini   
|   7 +
 9 files changed, 806 insertions(+)

diff --git a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc 
b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
index 155490fa39d3..536d5f2ed37a 100644
--- a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
@@ -235,6 +235,7 @@ [Components]
 
SctPkg/TestCase/UEFI/EFI/RuntimeServices/MiscRuntimeServices/BlackBoxTest/MiscRuntimeServicesBBTest.inf
 
SctPkg/TestCase/UEFI/EFI/RuntimeServices/TimeServices/BlackBoxTest/TimeServicesBBTest.inf
 
SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/VariableServicesBBTest.inf
+SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
 
 
SctPkg/TestCase/UEFI/EFI/Protocol/GraphicsOutput/BlackBoxTest/GraphicsOutputBBTest.inf
 SctPkg/TestCase/UEFI/EFI/Protocol/Bis/BlackBoxTest/BisBBTest.inf
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
new file mode 100644
index ..35d82043e2e7
--- /dev/null
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
@@ -0,0 +1,53 @@
+## @file
+#
+#  Copyright 2006 - 2015 Unified EFI, Inc.
+#  Copyright (c) 2013, Intel Corporation. All rights reserved.
+#  Copyright (c) 2023, Arm Inc. All rights reserved.
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD 
License
+#  which accompanies this distribution.  The full text of the license may be 
found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
IMPLIED.
+#
+##
+#/*++
+#
+# Module Name:
+#
+#   TCGMemoryOverwriteRequestBBTest.inf
+#
+# Abstract:
+#
+#   Component description file for TCG MemoryOverwriteRequest UEFI variables 
Test.
+#
+#--*/
+
+[defines]
+  INF_VERSION  = 0x00010005
+  BASE_NAME= TCGMemoryOverwriteRequestBBTest
+  FILE_GUID= ACA989CD-4AEE-45A3-B80F-E9A523BB7164
+  MODULE_TYPE  = UEFI_DRIVER
+  VERSION_STRING   = 1.0
+  ENTRY_POINT  = InitializeTestTCGMemoryOverwriteRequest
+
+[sources.common]
+  TCGMemoryOverwriteRequestBBTestMain.c
+  TCGMemoryOverwriteRequestBBTestMain.h
+  TCGMemoryOverwriteRequestBBTestFunction.c
+  Guid.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SctPkg/SctPkg.dec
+  SctPkg/UEFI/UEFI.dec
+
+[LibraryClasses]
+  UefiDriverEntryPoint
+  SctLib
+  EfiTestLib
+
+[Protocols]
+  gEfiTestRecoveryLibraryGuid
diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 
b/uefi-sc

[edk2-devel] [PATCH v5 0/6] EDK2-TEST TCG MOR Tests

2024-04-08 Thread Abhimanyu Singh
Updates after feedback from Sunny 

-updated several SCT assertion string outputs
-these were done make the assertions more descriptive
-fixed the issue in patch 5/6 that contained stray chars
 from a merge

Patch series:
These tests support platform firmware that implement
MemoryOverwriteRequestControl & MemoryOverwriteRequestControlLock
UEFI variables in accordance with TCG PC Platform Reset Attack
Mitigation Specification.

The patches are split according to the six sections
documented in the SCT spec document referenced below.

SCT spec: https://bugzilla.tianocore.org/show_bug.cgi?id=4374

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4419

Abhi Singh (5):
  uefi-sct/SctPkg: TCG MOR SetVariable Test
  uefi-sct/SctPkg: TCG MORLOCK SetVariable Test
  uefi-sct/SctPkg: TCG MORLOCK Unlocked State Test
  uefi-sct/SctPkg: TCG MORLOCK Locked No Key State Test
  uefi-sct/SctPkg: TCG MORLOCK Locked with Key State Test

Abhi.Singh (1):
  uefi-sct/SctPkg: TCG Platform Reset Check Test

 uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc  
|1 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
   |   53 +
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
|  271 +++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 |  137 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
|  127 ++
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 | 2390 
 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c
 |  115 +
 uefi-sct/SctPkg/CommonGenFramework.sh  
|1 +
 uefi-sct/SctPkg/Config/Data/Category.ini   
|7 +
 9 files changed, 3102 insertions(+)
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTest.inf
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.h
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.h
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/Guid.c
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestFunction.c
 create mode 100644 
uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/TCGMemoryOverwriteRequest/BlackBoxTest/TCGMemoryOverwriteRequestBBTestMain.c

-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117519): https://edk2.groups.io/g/devel/message/117519
Mute This Topic: https://groups.io/mt/105416468/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 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-04-08 Thread Chao Li

Hi Ray,

I'm willing change it to a PEIM if it doesn't fit as a library. I think 
if it is a PEIM, we need a new GUID to sotre the memory map resouce, or 
use an already defined GUID.


I will put it under the UefiCpuPkg, called CpuMmuInitPei, folder: 
UefiCpuPkg/CpuMmuInitPei/LoongArch64/. May I?



Thanks,
Chao
On 2024/4/9 10:06, Ni, Ray wrote:

Chao,
Sorry I missed your mail.

If ConfigureMemoryManagementUnit() is called in PEI, can you move the 
logic to a LoongArch specific PEIM? My concern is we may need more 
review on the lib API ConfigureMemoryManagementUnit() if we position 
it as a library.


If we move the logic in a PEIM and the implementation becomes a PEIM 
internal logic, we can lower the quality expectation of the function 
prototype as no other module is able to call it.



Thanks,
Ray


For patches 10, 11: Can the lib be avoided if the logic is
implemented in CpuDxe driver?

This library is will be called in the PEI stage, so I can't
move it under the CpuDxe.

This library is the low-level libary of CpuMmuLib, which will
consume CpuMmuLIb to configure the MMU.

This way is suggested by Laszlo, who saied if CpuMmuLib can
not content the configure API(high-level libary is the basecal
libaray, it should not include the configure API), we can
split it into two, where the hight-livel is CpuMmuLib, and the
low-level is CpuMmuInitLib.


For patch 12(UefiCpuPkg: Add multiprocessor library for
LoongArch64): Reviewed-by: Ray Ni 

For patch 13: Please make accordingly changes when you
address comments for patch 8.

OK.


Thanks,
Ray


*From:* Gerd Hoffmann 

*Sent:* Friday, March 22, 2024 20:39
*To:* Chao Li  
*Cc:* devel@edk2.groups.io 
 ; Ni,
Ray  ; Kumar,
Rahul R 
; Sami Mujawar
 ;
Sunil V L 
; Bibo Mao
 ;
Dongyan Qian 

*Subject:* Re: [PATCH v2 00/13] Part 2 patch set to add
LoongArch support into UefiCpuPkg
On Wed, Mar 20, 2024 at 04:41:52PM +0800, Chao Li wrote:
> This patch set adjusted some order in UefiCpuPig
alphabetically, added
> LoongArch libraries and drivers into UefiCpuPkg, it is a
continuation of
> the first patch series v8 submitted at
> https://edk2.groups.io/g/devel/message/114526
.
>
> And also separated from
https://edk2.groups.io/g/devel/message/116583
.
>
> This series only contents the changes for UefiCpuPkg.
>
> Patch1-Patch4: Reorder some INF files located in UefiCpuPkg
> alphabetically.
>
> Patch5-Patch13: Added Timer, CpuMmuLib, CpuMmuInitLib,
MpInitLib, CpuDxe
> for LoongArch, and added some PCD and header files
requested by the
> above libraries and drivers.
>
> Modfied modules: UefiCpuPkg
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726

> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734

>
> PR: https://github.com/tianocore/edk2/pull/5483

>
> V1 -> V2:
> 1. Removed PcdCpuMmuIsEnabled.
> 2. Removed API GetMemoryRegionAttributes API as it is no
longer needed.
> 3. Patch3, added two empty line in DXE and PEI INF files.
> 4. Patch5, added the Status check in GetTimeInnanoSecond
function.
> 5. Separated into two series, this is series one, and
the second one is
> OvmfPkg.

While I can't comment on the loongarch architecture
details the code
and the integration into build system looks overall sane
to me.

Series:
Acked-by: Gerd Hoffmann 


take care,
  Gerd





-=-=-=-=-=-=-=-=-=-=-=-
G

Re: [edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function

2024-04-08 Thread Pedro Falcato
On Mon, Apr 8, 2024 at 10:48 AM Qingyu  wrote:
>
> Refer to Uefi spec 2.10 section 11.11.2, add a new retval
> EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
> Reference: [mantis #1866] - GetInfo() of Adapter Information
> Protocol should have a provision for IHV to return no data.

Let's reword this commit message a bit, shall we? Something like this:

Add a new return value EFI_NOT_FOUND to
EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation(), according to UEFI
spec 2.10 section 11.11.2.
This brings the documentation up to par with UEFI 2.10.
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

I'm not sure about the commit title too, but it's late here and I
can't figure out a nice succinct description. Maybe:
"OptionRomPkg/UndiRuntimeDxe: Update UndiAipGetInfo's docs to UEFI spec 2.10"

>
> Cc: Pedro Falcato 

Why was I CC'd on this? /me is confused

> Cc: Ray Ni 
> Signed-off-by: Qingyu 
> Signed-off-by: Gahan Saraiya 
> ---
>  Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h  | 5 -
>  Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 -
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h 
> b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> index 31c55a8e11..665221e952 100644
> --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
> @@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI 
> *PxePtr);
>
>This function returns information of type InformationType from the adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
> +  the requested InformationType, it fills InformationBlockSize with 0 and
> +  returns EFI_NOT_FOUND.
>
>@param[in]  This   A pointer to the 
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that defines 
> the contents of InformationBlock.
> @@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI 
> *PxePtr);
>
>@retval EFI_SUCCESSThe InformationType information was 
> retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not known.
> +  @retval EFI_NOT_FOUND  Information is not available for the 
> requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be completed due 
> to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c 
> b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> index 21151a076f..d80ce65da9 100644
> --- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> +++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
> @@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {
>
>This function returns information of type InformationType from the adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
> +  the requested InformationType, it fills InformationBlockSize with 0 and
> +  returns EFI_NOT_FOUND.
>
>@param[in]  This   A pointer to the 
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that defines 
> the contents of InformationBlock.
> @@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {
>
>@retval EFI_SUCCESSThe InformationType information was 
> retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not known.
> +  @retval EFI_NOT_FOUND  Information is not available for the 
> requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be completed due 
> to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.

In any case, since I've been meaning to say this for some time: I know
this is not your fault (and this is part of some UEFI spec upgrade
goal), but changing all of these comments isn't the win you think it
is. It's very churny and gains us nothing. The function does not
return EFI_NOT_FOUND, so why are we changing its docs? Changing the
protocol header's docs is fine (and expected), changing the individual
implementations is very... iffy.

I'm not a maintainer for this, but if this helps: with the changes above:
Acked-by: Pedro Falcato 

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117517): https://edk2.groups.io/g/devel/message/117517
Mute This Topic: https://groups.io/mt/10539

Re: [edk2-devel] [PATCH v2 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-04-08 Thread Ni, Ray
Chao,
Sorry I missed your mail.

If ConfigureMemoryManagementUnit() is called in PEI, can you move the logic to 
a LoongArch specific PEIM? My concern is we may need more review on the lib API 
ConfigureMemoryManagementUnit() if we position it as a library.

If we move the logic in a PEIM and the implementation becomes a PEIM internal 
logic, we can lower the quality expectation of the function prototype as no 
other module is able to call it.

Thanks,
Ray


For patches 10, 11: Can the lib be avoided if the logic is implemented in 
CpuDxe driver?

This library is will be called in the PEI stage, so I can't move it under the 
CpuDxe.

This library is the low-level libary of CpuMmuLib, which will consume CpuMmuLIb 
to configure the MMU.

This way is suggested by Laszlo, who saied if CpuMmuLib can not content the 
configure API(high-level libary is the basecal libaray, it should not include 
the configure API), we can split it into two, where the hight-livel is 
CpuMmuLib, and the low-level is CpuMmuInitLib.


For patch 12(UefiCpuPkg: Add multiprocessor library for LoongArch64): 
Reviewed-by: Ray Ni 
For patch 13: Please make accordingly changes when you address comments for 
patch 8.
OK.

Thanks,
Ray

From: Gerd Hoffmann 
Sent: Friday, March 22, 2024 20:39
To: Chao Li 
Cc: devel@edk2.groups.io 
; Ni, Ray 
; Kumar, Rahul R 
; Sami Mujawar 
; Sunil V L 
; Bibo Mao 
; Dongyan Qian 

Subject: Re: [PATCH v2 00/13] Part 2 patch set to add LoongArch support into 
UefiCpuPkg

On Wed, Mar 20, 2024 at 04:41:52PM +0800, Chao Li wrote:
> This patch set adjusted some order in UefiCpuPig alphabetically, added
> LoongArch libraries and drivers into UefiCpuPkg, it is a continuation of
> the first patch series v8 submitted at
> https://edk2.groups.io/g/devel/message/114526.
>
> And also separated from https://edk2.groups.io/g/devel/message/116583.
>
> This series only contents the changes for UefiCpuPkg.
>
> Patch1-Patch4: Reorder some INF files located in UefiCpuPkg
> alphabetically.
>
> Patch5-Patch13: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, CpuDxe
> for LoongArch, and added some PCD and header files requested by the
> above libraries and drivers.
>
> Modfied modules: UefiCpuPkg
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734
>
> PR: https://github.com/tianocore/edk2/pull/5483
>
> V1 -> V2:
> 1. Removed PcdCpuMmuIsEnabled.
> 2. Removed API GetMemoryRegionAttributes API as it is no longer needed.
> 3. Patch3, added two empty line in DXE and PEI INF files.
> 4. Patch5, added the Status check in GetTimeInnanoSecond function.
> 5. Separated into two series, this is series one, and the second one is
> OvmfPkg.

While I can't comment on the loongarch architecture details the code
and the integration into build system looks overall sane to me.

Series:
Acked-by: Gerd Hoffmann 

take care,
  Gerd




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117516): https://edk2.groups.io/g/devel/message/117516
Mute This Topic: https://groups.io/mt/105041080/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/3] OptionRomPkg: Update the comments of GetInformation function

2024-04-08 Thread Ni, Ray
Reviewed-by: Ray Ni 

Thanks,
Ray

From: Shang, Qingyu 
Sent: Monday, April 8, 2024 17:47
To: devel@edk2.groups.io 
Cc: Pedro Falcato ; Ni, Ray ; Gahan 
Saraiya 
Subject: [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation 
function

Refer to Uefi spec 2.10 section 11.11.2, add a new retval
EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

Cc: Pedro Falcato 
Cc: Ray Ni 
Signed-off-by: Qingyu 
Signed-off-by: Gahan Saraiya 
---
 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h  | 5 -
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h 
b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
index 31c55a8e11..665221e952 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
@@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI 
*PxePtr);

   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned.
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.

   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI 
*PxePtr);

   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL.
diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c 
b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
index 21151a076f..d80ce65da9 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
@@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {

   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned.
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.

   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {

   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL.
--
2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117515): https://edk2.groups.io/g/devel/message/117515
Mute This Topic: https://groups.io/mt/105398061/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, April 9, 2024 #cal-reminder

2024-04-08 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Tuesday, April 9, 2024
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=2159780 )

*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 (#117514): https://edk2.groups.io/g/devel/message/117514
Mute This Topic: https://groups.io/mt/105414371/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] OVMF SMM Support

2024-04-08 Thread Michael Kubacki
Might be related to this issue 
https://gitlab.com/qemu-project/qemu/-/issues/2064.


On 4/8/2024 4:33 AM, Wu, Jiaxin wrote:

Hi Gerd,

With below OVMF build and QEMU command, OVMF hangs after SendSmiIpi 
(mBspApicId) during SmmRelocateBases(), is there any issues with latest 
code to support SMM on OVMF or my local command/configuration issue?


*Build (latest edk2 code):*

build -p OvmfPkg\OvmfPkgIa32X64.dsc -a IA32 -a X64 -D SECURE_BOOT -D 
SMM_REQUIRE -D DEBUG_ON_SERIAL_PORT


*QEMU command (QEMU version: 8.2.0):*

qemu-system-x86_64 -machine q35,smm=on -m 4G -net none -drive 
if=pflash,format=raw,unit=0,file=C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG_VS2019\FV\OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG_VS2019\FV\OVMF_VARS.fd -hda fat:rw:hda-contents -serial file:log.log


Thanks,

Jiaxin





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117513): https://edk2.groups.io/g/devel/message/117513
Mute This Topic: https://groups.io/mt/105397533/21656
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, April 8, 2024 #cal-notice

2024-04-08 Thread Group Notification
*Tools, CI, Code base construction meeting series*

*When:*
Monday, April 8, 2024
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=2159786 )

*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 (#117512): https://edk2.groups.io/g/devel/message/117512
Mute This Topic: https://groups.io/mt/105412785/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] AlderlakeOpenBoardPkg: Change MinPlatform MinDsdt and Update SpiFlashCommonLib

2024-04-08 Thread Nate DeSimone
Pushed as 39bb294

> -Original Message-
> From: Hsueh, DoraX 
> Sent: Monday, March 25, 2024 10:48 PM
> To: devel@edk2.groups.io
> Cc: Hsueh, DoraX ; Chaganty, Rangasai V
> ; Chuang, Rosen ;
> Kasbekar, Saloni ; Tang, Haoyu
> ; Desimone, Nathaniel L
> 
> Subject: [PATCH] AlderlakeOpenBoardPkg: Change MinPlatform MinDsdt and
> Update SpiFlashCommonLib
> 
> From: DoraX Hsueh 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4662
> 
> 1. Change MinPlatform MinDsdt to fix hang logo issue.
> 2. Update SecFspWrapperPlatformSecLib for FSP use.
> 3. Update SpiFlashCommonLib to fix boot assert issue.
> 4. Create SmmLocked callback to fix assert
> 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Cc: Haoyu Tang 
> Cc: Nate DeSimone 
> Signed-off-by: DoraX Hsueh 
> ---
>  .../Acpi/MinDsdt/MinDsdt.asl  |  68 ---
>  .../Acpi/MinDsdt/MinDsdt.c| 232 ---
>  .../Acpi/MinDsdt/MinDsdt.inf  |  48 ---
>  .../AlderlakePRvp/OpenBoardPkg.dsc|   6 +-
>  .../AlderlakePRvp/OpenBoardPkg.fdf|   2 +-
>  .../AlderlakePRvp/OpenBoardPkgPcd.dsc |   8 +
>  .../FspWrapperPlatformSecLib.c| 186 +
>  .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 394 ++
>  .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h|  42 ++
>  .../Ia32/PeiCoreEntry.nasm| 130 ++
>  .../Ia32/SecEntry.nasm| 361 
>  .../Ia32/Stack.nasm   |  72 
>  .../PlatformInit.c|  47 +++
>  .../SecFspWrapperPlatformSecLib.inf   | 106 +
>  .../SecGetPerformance.c   |  89 
>  .../SecPlatformInformation.c  |  78 
>  .../SecRamInitData.c  |  57 +++
>  .../SecTempRamDone.c  |  93 +
>  .../Include/Library/SpiFlashCommon.h  |  99 -
>  .../SmmSpiFlashCommonLib.inf  |  49 ---
>  .../SmmSpiFlashCommonLib/SpiFlashCommon.c | 215 --
>  .../SpiFlashCommonSmmLib.c|  60 ---
>  .../OpenBoardPlatformInitPostMem.c|  96 +
>  .../OpenBoardPlatformInitPostMem.inf  |  20 -
>  .../DxeSaPolicyInit.c |  71 
>  .../DxeSiliconPolicyUpdateLib.inf |   2 +
>  .../PeiCpuPolicyUpdatePreMem.c|   3 -
>  .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf |   3 +-
>  28 files changed, 1742 insertions(+), 895 deletions(-)
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.c
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.inf
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Fsp.h
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.nasm
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Stack.nasm
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/PlatformInit.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecGetPerformance.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecPlatformInformation.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecTempRamDone.c
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Include/Library/SpiFlashCommon.h
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SmmSpiFlashCommonLib.inf
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommon.c
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommonSmmLib.c
> 
> diff --git a/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl 
> b/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
> deleted file mode 100644
> index be110145..
> --

Re: [edk2-devel] [PATCH] AlderlakeOpenBoardPkg: Change MinPlatform MinDsdt and Update SpiFlashCommonLib

2024-04-08 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Hsueh, DoraX 
> Sent: Monday, March 25, 2024 10:48 PM
> To: devel@edk2.groups.io
> Cc: Hsueh, DoraX ; Chaganty, Rangasai V
> ; Chuang, Rosen ;
> Kasbekar, Saloni ; Tang, Haoyu
> ; Desimone, Nathaniel L
> 
> Subject: [PATCH] AlderlakeOpenBoardPkg: Change MinPlatform MinDsdt and
> Update SpiFlashCommonLib
> 
> From: DoraX Hsueh 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4662
> 
> 1. Change MinPlatform MinDsdt to fix hang logo issue.
> 2. Update SecFspWrapperPlatformSecLib for FSP use.
> 3. Update SpiFlashCommonLib to fix boot assert issue.
> 4. Create SmmLocked callback to fix assert
> 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Cc: Haoyu Tang 
> Cc: Nate DeSimone 
> Signed-off-by: DoraX Hsueh 
> ---
>  .../Acpi/MinDsdt/MinDsdt.asl  |  68 ---
>  .../Acpi/MinDsdt/MinDsdt.c| 232 ---
>  .../Acpi/MinDsdt/MinDsdt.inf  |  48 ---
>  .../AlderlakePRvp/OpenBoardPkg.dsc|   6 +-
>  .../AlderlakePRvp/OpenBoardPkg.fdf|   2 +-
>  .../AlderlakePRvp/OpenBoardPkgPcd.dsc |   8 +
>  .../FspWrapperPlatformSecLib.c| 186 +
>  .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 394 ++
>  .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h|  42 ++
>  .../Ia32/PeiCoreEntry.nasm| 130 ++
>  .../Ia32/SecEntry.nasm| 361 
>  .../Ia32/Stack.nasm   |  72 
>  .../PlatformInit.c|  47 +++
>  .../SecFspWrapperPlatformSecLib.inf   | 106 +
>  .../SecGetPerformance.c   |  89 
>  .../SecPlatformInformation.c  |  78 
>  .../SecRamInitData.c  |  57 +++
>  .../SecTempRamDone.c  |  93 +
>  .../Include/Library/SpiFlashCommon.h  |  99 -
>  .../SmmSpiFlashCommonLib.inf  |  49 ---
>  .../SmmSpiFlashCommonLib/SpiFlashCommon.c | 215 --
>  .../SpiFlashCommonSmmLib.c|  60 ---
>  .../OpenBoardPlatformInitPostMem.c|  96 +
>  .../OpenBoardPlatformInitPostMem.inf  |  20 -
>  .../DxeSaPolicyInit.c |  71 
>  .../DxeSiliconPolicyUpdateLib.inf |   2 +
>  .../PeiCpuPolicyUpdatePreMem.c|   3 -
>  .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf |   3 +-
>  28 files changed, 1742 insertions(+), 895 deletions(-)
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.c
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.inf
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Fsp.h
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.nasm
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Stack.nasm
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/PlatformInit.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecGetPerformance.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecPlatformInformation.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
>  create mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecTempRamDone.c
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Include/Library/SpiFlashCommon.h
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SmmSpiFlashCommonLib.inf
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommon.c
>  delete mode 100644 
> Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommonSmmLib.c
> 
> diff --git a/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl 
> b/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
> deleted file mode 100644
> index be110145..000

Re: [edk2-devel] [PATCH] AlderlakeSiliconPkg: Update for SPI2 Protocol and Identify flash regions by GUID

2024-04-08 Thread Nate DeSimone
Pushed as e0051bc

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> dorax.hs...@intel.com
> Sent: Thursday, February 1, 2024 10:32 PM
> To: devel@edk2.groups.io
> Cc: Hsueh, DoraX ; Chaganty, Rangasai V
> ; Chuang, Rosen ;
> Kasbekar, Saloni ; Tang, Haoyu
> 
> Subject: [edk2-devel] [PATCH] AlderlakeSiliconPkg: Update for SPI2 Protocol
> and Identify flash regions by GUID
> 
> From: DoraX Hsueh 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4664
> 
> 1. Updates references to the "PCH_SPI_PROTOCOL" to instead refer to
> "PCH_SPI2_PROTOCOL".
> 2. Updates the library to identify flash regions by GUID and internally
> map the GUID entries to values specific to AlderlakeSiliconPkg.
> 3. Libs/modules that need to reference IntelSiliconPkg are updated.
> 4. Add gUsbConfigGuid to fix USB not working issue in OS.
> 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Cc: Haoyu Tang 
> Signed-off-by: DoraX Hsueh 
> ---
>  .../Cpu/Include/Register/CommonMsr.h  |   4 +
>  .../Fru/AdlPch/CommonLib.dsc  |   2 +-
>  .../AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc |   2 -
>  .../Include/Library/SpiAccessLib.h|  44 ++
>  .../Include/Register/PttPtpRegs.h |  26 +
>  .../Include/Register/TcoRegs.h|   1 +
>  .../Spi/IncludePrivate/Library/SpiCommonLib.h |  60 +--
>  .../Spi/IncludePrivate/Register/SpiRegs.h |   8 +-
>  .../PeiDxeSmmSpiAccessLib.inf |  33 ++
>  .../PeiDxeSmmSpiAccessLib/SpiAccessLib.c  |  75 +++
>  .../IpBlock/Spi/Library/PeiSpiLib/PchSpi.c|   2 +-
>  .../Spi/Library/PeiSpiLib/PeiSpiLib.inf   |   2 +-
>  .../BaseSpiCommonLib/BaseSpiCommonLib.inf |  19 +-
>  .../BaseSpiCommonLib/SpiCommon.c  | 491 --
>  .../AlderlakeSiliconPkg/IpBlock/Spi/Smm/Spi.c |  30 +-
>  .../IpBlock/Spi/Smm/SpiSmm.inf|   5 +-
>  .../IncludePrivate/Library/SmmPchPrivateLib.h |  27 +
>  .../SmmPchPrivateLib/SmmPchPrivateLib.c   |  61 +++
>  .../SmmPchPrivateLib/SmmPchPrivateLib.inf |  32 ++
>  .../Product/Alderlake/SiPkgDxeLib.dsc |   5 +
>  Silicon/Intel/AlderlakeSiliconPkg/SiPkg.dec   |   4 +-
>  21 files changed, 733 insertions(+), 200 deletions(-)
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Include/Library/SpiAccessLib.h
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Include/Register/PttPtpRegs.h
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/PeiDxeSmmSpiAccessLib.inf
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/SpiAccessLib.c
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Pch/IncludePrivate/Library/SmmPchPrivateLib.h
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Pch/LibraryPrivate/SmmPchPrivateLib/SmmPchPrivateLib.c
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Pch/LibraryPrivate/SmmPchPrivateLib/SmmPchPrivateLib.inf
> 
> diff --git 
> a/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h 
> b/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
> index caa0e67b..44a476c0 100644
> --- a/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
> +++ b/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
> @@ -56,5 +56,9 @@ typedef union {
>  
>  } MSR_CORE_THREAD_COUNT_REGISTER;
>  
> +/**
> +  Special Chipset Usage MSR
> +**/
> +#define MSR_SPCL_CHIPSET_USAGE 0x01FE
>  
>  #endif /* _COMMONMSR_h */
> diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc 
> b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
> index 3f508f83..ee5800a9 100644
> --- a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
> +++ b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
> @@ -11,7 +11,7 @@
>  
>
> EspiLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Espi/Library/PeiDxeSmmEspiLib/PeiDxeSmmEspiLib.inf
>  
> -
> +  
> SpiAccessLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/PeiDxeSmmSpiAccessLib.inf
>
> PmcLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Pmc/Library/PeiDxeSmmPmcLib/PeiDxeSmmPmcLib.inf
>
> PmcPrivateLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Pmc/LibraryPrivate/PeiDxeSmmPmcPrivateLib/PeiDxeSmmPmcPrivateLib.inf
>
> SpiCommonLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/BaseSpiCommonLib.inf
> diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc 
> b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
> index ebe2bbfd..cbaf8e37 100644
> --- a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
> +++ b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
> @@ -5,8 +5,6 @@
>  #   SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  
> -  SpiLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/Library/PeiSpiLib/PeiSpiLib.inf
> -
>
> GpioHelpersLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Gpio/LibraryPrivate/PeiGpioHelpersLib/PeiGpioHelpersLib.

Re: [edk2-devel] [PATCH] AlderlakeSiliconPkg: Update for SPI2 Protocol and Identify flash regions by GUID

2024-04-08 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> dorax.hs...@intel.com
> Sent: Thursday, February 1, 2024 10:32 PM
> To: devel@edk2.groups.io
> Cc: Hsueh, DoraX ; Chaganty, Rangasai V
> ; Chuang, Rosen ;
> Kasbekar, Saloni ; Tang, Haoyu
> 
> Subject: [edk2-devel] [PATCH] AlderlakeSiliconPkg: Update for SPI2 Protocol
> and Identify flash regions by GUID
> 
> From: DoraX Hsueh 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4664
> 
> 1. Updates references to the "PCH_SPI_PROTOCOL" to instead refer to
> "PCH_SPI2_PROTOCOL".
> 2. Updates the library to identify flash regions by GUID and internally
> map the GUID entries to values specific to AlderlakeSiliconPkg.
> 3. Libs/modules that need to reference IntelSiliconPkg are updated.
> 4. Add gUsbConfigGuid to fix USB not working issue in OS.
> 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Cc: Haoyu Tang 
> Signed-off-by: DoraX Hsueh 
> ---
>  .../Cpu/Include/Register/CommonMsr.h  |   4 +
>  .../Fru/AdlPch/CommonLib.dsc  |   2 +-
>  .../AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc |   2 -
>  .../Include/Library/SpiAccessLib.h|  44 ++
>  .../Include/Register/PttPtpRegs.h |  26 +
>  .../Include/Register/TcoRegs.h|   1 +
>  .../Spi/IncludePrivate/Library/SpiCommonLib.h |  60 +--
>  .../Spi/IncludePrivate/Register/SpiRegs.h |   8 +-
>  .../PeiDxeSmmSpiAccessLib.inf |  33 ++
>  .../PeiDxeSmmSpiAccessLib/SpiAccessLib.c  |  75 +++
>  .../IpBlock/Spi/Library/PeiSpiLib/PchSpi.c|   2 +-
>  .../Spi/Library/PeiSpiLib/PeiSpiLib.inf   |   2 +-
>  .../BaseSpiCommonLib/BaseSpiCommonLib.inf |  19 +-
>  .../BaseSpiCommonLib/SpiCommon.c  | 491 --
>  .../AlderlakeSiliconPkg/IpBlock/Spi/Smm/Spi.c |  30 +-
>  .../IpBlock/Spi/Smm/SpiSmm.inf|   5 +-
>  .../IncludePrivate/Library/SmmPchPrivateLib.h |  27 +
>  .../SmmPchPrivateLib/SmmPchPrivateLib.c   |  61 +++
>  .../SmmPchPrivateLib/SmmPchPrivateLib.inf |  32 ++
>  .../Product/Alderlake/SiPkgDxeLib.dsc |   5 +
>  Silicon/Intel/AlderlakeSiliconPkg/SiPkg.dec   |   4 +-
>  21 files changed, 733 insertions(+), 200 deletions(-)
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Include/Library/SpiAccessLib.h
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Include/Register/PttPtpRegs.h
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/PeiDxeSmmSpiAccessLib.inf
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/SpiAccessLib.c
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Pch/IncludePrivate/Library/SmmPchPrivateLib.h
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Pch/LibraryPrivate/SmmPchPrivateLib/SmmPchPrivateLib.c
>  create mode 100644 
> Silicon/Intel/AlderlakeSiliconPkg/Pch/LibraryPrivate/SmmPchPrivateLib/SmmPchPrivateLib.inf
> 
> diff --git 
> a/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h 
> b/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
> index caa0e67b..44a476c0 100644
> --- a/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
> +++ b/Silicon/Intel/AlderlakeSiliconPkg/Cpu/Include/Register/CommonMsr.h
> @@ -56,5 +56,9 @@ typedef union {
>  
>  } MSR_CORE_THREAD_COUNT_REGISTER;
>  
> +/**
> +  Special Chipset Usage MSR
> +**/
> +#define MSR_SPCL_CHIPSET_USAGE 0x01FE
>  
>  #endif /* _COMMONMSR_h */
> diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc 
> b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
> index 3f508f83..ee5800a9 100644
> --- a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
> +++ b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/CommonLib.dsc
> @@ -11,7 +11,7 @@
>  
>
> EspiLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Espi/Library/PeiDxeSmmEspiLib/PeiDxeSmmEspiLib.inf
>  
> -
> +  
> SpiAccessLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/Library/PeiDxeSmmSpiAccessLib/PeiDxeSmmSpiAccessLib.inf
>
> PmcLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Pmc/Library/PeiDxeSmmPmcLib/PeiDxeSmmPmcLib.inf
>
> PmcPrivateLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Pmc/LibraryPrivate/PeiDxeSmmPmcPrivateLib/PeiDxeSmmPmcPrivateLib.inf
>
> SpiCommonLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/LibraryPrivate/BaseSpiCommonLib/BaseSpiCommonLib.inf
> diff --git a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc 
> b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
> index ebe2bbfd..cbaf8e37 100644
> --- a/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
> +++ b/Silicon/Intel/AlderlakeSiliconPkg/Fru/AdlPch/PeiLib.dsc
> @@ -5,8 +5,6 @@
>  #   SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
>  
> -  SpiLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Spi/Library/PeiSpiLib/PeiSpiLib.inf
> -
>
> GpioHelpersLib|$(PLATFORM_SI_PACKAGE)/IpBlock/Gpio/LibraryPrivate/PeiGpioHelpersLib/PeiGpioH

[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, April 8, 2024 #cal-reminder

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

*When:*
Monday, April 8, 2024
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=2159786 )

*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 (#117507): https://edk2.groups.io/g/devel/message/117507
Mute This Topic: https://groups.io/mt/105392351/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] AlderlakeOpenBoardPkg: Fix BootStage 5 can't install Windows11.

2024-04-08 Thread Nate DeSimone
Hi Dora,

Removing FvAdvanced in a violation of the MinPlatform specification. The 
relevant section is here:

https://tianocore-docs.github.io/edk2-MinimumPlatformSpecification/draft/appendix_a_full_maps/a1_firmware_volume_layout.html#a1-firmware-volume-layout

Please add FvAdvanced back into the ROM.

In addition, PcdBootStage should be set to 6 by default (not 5).

Thanks,
Nate

> -Original Message-
> From: Hsueh, DoraX 
> Sent: Friday, February 2, 2024 1:12 AM
> To: devel@edk2.groups.io
> Cc: Hsueh, DoraX ; Chaganty, Rangasai V
> ; Chuang, Rosen ;
> Kasbekar, Saloni ; Tang, Haoyu
> ; Desimone, Nathaniel L
> 
> Subject: [PATCH] AlderlakeOpenBoardPkg: Fix BootStage 5 can't install
> Windows11.
> 
> From: DoraX Hsueh 
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=4665
> 
> Since installing windows does not meet the minimum system requirements,
> Added TPM related code to meet the requirements.
> 
> Cc: Sai Chaganty 
> Cc: Rosen Chuang 
> Cc: Saloni Kasbekar 
> Cc: Haoyu Tang 
> Cc: Nate DeSimone 
> Signed-off-by: DoraX Hsueh 
> ---
>  .../Include/Fdf/FlashMapInclude.fdf   | 20 +-
>  .../AlderlakePRvp/OpenBoardPkg.fdf| 37 +++
>  .../AlderlakePRvp/OpenBoardPkgPcd.dsc | 10 -
>  .../AlderlakeOpenBoardPkg/BiosInfo/BiosInfo.c |  9 +
>  .../BiosInfo/BiosInfo.inf |  2 -
>  .../AlderlakeOpenBoardPkg/OpenBoardPkg.dec|  1 -
>  6 files changed, 25 insertions(+), 54 deletions(-)
> 
> diff --git 
> a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
>  
> b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
> index 03c198c0..9a4ae7e8 100644
> --- 
> a/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
> +++ 
> b/Platform/Intel/AlderlakeOpenBoardPkg/AlderlakePRvp/Include/Fdf/FlashMapInclude.fdf
> @@ -25,23 +25,21 @@ SET 
> gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize= 0x20
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareOffset = 
> 0x0003  # Flash addr (0xFF03)
>  SET gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize  = 
> 0x0003  #
>  
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedOffset= 
> 0x000E  # Flash addr (0xFF0E)
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize  = 
> 0x0031  #
> -SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalOffset   = 
> 0x003F  # Flash addr (0xFF40)
> -SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalSize = 
> 0x0036  #
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityOffset= 
> 0x0075  # Flash addr (0xFF76)
> +SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalOffset   = 
> 0x000E  # Flash addr (0xFF40)
> +SET gBoardModuleTokenSpaceGuid.PcdFlashFvOptionalSize = 
> 0x0065  #
> +SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityOffset= 
> 0x0073  # Flash addr (0xFF76)
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize  = 
> 0x0009  #
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootOffset  = 
> 0x007E  # Flash addr (0xFF7F)
> +SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootOffset  = 
> 0x007C  # Flash addr (0xFF7F)
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize= 
> 0x000A  #
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootOffset= 
> 0x0088  # Flash addr (0xFF86)
> +SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootOffset= 
> 0x0086  # Flash addr (0xFF86)
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize  = 
> 0x0018  #
>  
> -SET gBoardModuleTokenSpaceGuid.PcdFlashFvFirmwareBinariesOffset   = 
> 0x00A0  # Flash addr (0xFFA0)
> +SET gBoardModuleTokenSpaceGuid.PcdFlashFvFirmwareBinariesOffset   = 
> 0x009E  # Flash addr (0xFFA0)
>  SET gBoardModuleTokenSpaceGuid.PcdFlashFvFirmwareBinariesSize = 
> 0x0008  # Keep 0x8 or larger
> -SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvOffset  = 
> 0x00A8  # Flash addr (0xFFA8)
> +SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvOffset  = 
> 0x00A6  # Flash addr (0xFFA8)
>  SET gIntelSiliconPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize= 
> 0x0023  #
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryOffset  = 
> 0x00CB  # Flash addr (0xFFCB)
> -SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize= 
> 0x0004  #
> +SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryOffset  = 
> 0x00C9  # Flash addr (0xFFCB)
> +SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize= 
> 0x0006  #
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSOffset= 
> 0x00CF 

Re: [edk2-devel] [PATCH 2/3] MinPlatformPkg: Update the comments of GetInformation function

2024-04-08 Thread Nate DeSimone
Pushed as 1c41906

> -Original Message-
> From: Shang, Qingyu 
> Sent: Monday, April 8, 2024 2:47 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric ; Gahan Saraiya 
> Subject: [PATCH 2/3] MinPlatformPkg: Update the comments of
> GetInformation function
> 
> Refer to Uefi spec 2.10 section 11.11.2, add a new retval EFI_NOT_FOUND to
> EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
> Reference: [mantis #1866] - GetInfo() of Adapter Information Protocol should
> have a provision for IHV to return no data.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Qingyu 
> Signed-off-by: Gahan Saraiya 
> ---
>  .../Test/Library/TestPointLib/DxeTestPointAip.c  | 5 -
>  .../Test/Library/TestPointLib/SmmTestPointAip.c  | 5 -
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> index a7fe9530cf..f2c44afb50 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPoi
> +++ ntAip.c
> @@ -12,7 +12,9 @@
> 
>This function returns information of type InformationType from the adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain
> + Information for  the requested InformationType, it fills
> + InformationBlockSize with 0 and  returns EFI_NOT_FOUND.
> 
>@param[in]  This   A pointer to the
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that defines 
> the
> contents of InformationBlock.
> @@ -22,6 +24,7 @@
> 
>@retval EFI_SUCCESSThe InformationType information was
> retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not known.
> +  @retval EFI_NOT_FOUND  Information is not available for the
> requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be completed
> due to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAi
> p.c
> index 84c3f8292e..96fadb6f6f 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoi
> +++ ntAip.c
> @@ -12,7 +12,9 @@
> 
>This function returns information of type InformationType from the adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain
> + Information for  the requested InformationType, it fills
> + InformationBlockSize with 0 and  returns EFI_NOT_FOUND.
> 
>@param[in]  This   A pointer to the
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that defines 
> the
> contents of InformationBlock.
> @@ -22,6 +24,7 @@
> 
>@retval EFI_SUCCESSThe InformationType information was
> retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not known.
> +  @retval EFI_NOT_FOUND  Information is not available for the
> requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be completed
> due to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> --
> 2.39.1.windows.1



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




Re: [edk2-devel] [PATCH 2/3] MinPlatformPkg: Update the comments of GetInformation function

2024-04-08 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Shang, Qingyu 
> Sent: Monday, April 8, 2024 2:47 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Liming Gao ;
> Dong, Eric ; Gahan Saraiya 
> Subject: [PATCH 2/3] MinPlatformPkg: Update the comments of
> GetInformation function
> 
> Refer to Uefi spec 2.10 section 11.11.2, add a new retval EFI_NOT_FOUND to
> EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
> Reference: [mantis #1866] - GetInfo() of Adapter Information Protocol should
> have a provision for IHV to return no data.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Eric Dong 
> Signed-off-by: Qingyu 
> Signed-off-by: Gahan Saraiya 
> ---
>  .../Test/Library/TestPointLib/DxeTestPointAip.c  | 5 -
>  .../Test/Library/TestPointLib/SmmTestPointAip.c  | 5 -
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> index a7fe9530cf..f2c44afb50 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.
> c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPoi
> +++ ntAip.c
> @@ -12,7 +12,9 @@
> 
>This function returns information of type InformationType from the adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain
> + Information for  the requested InformationType, it fills
> + InformationBlockSize with 0 and  returns EFI_NOT_FOUND.
> 
>@param[in]  This   A pointer to the
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that defines 
> the
> contents of InformationBlock.
> @@ -22,6 +24,7 @@
> 
>@retval EFI_SUCCESSThe InformationType information was
> retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not known.
> +  @retval EFI_NOT_FOUND  Information is not available for the
> requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be completed
> due to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> diff --git
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAi
> p.c
> index 84c3f8292e..96fadb6f6f 100644
> ---
> a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip
> .c
> +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoi
> +++ ntAip.c
> @@ -12,7 +12,9 @@
> 
>This function returns information of type InformationType from the adapter.
>If an adapter does not support the requested informational type, then
> -  EFI_UNSUPPORTED is returned.
> +  EFI_UNSUPPORTED is returned. If an adapter does not contain
> + Information for  the requested InformationType, it fills
> + InformationBlockSize with 0 and  returns EFI_NOT_FOUND.
> 
>@param[in]  This   A pointer to the
> EFI_ADAPTER_INFORMATION_PROTOCOL instance.
>@param[in]  InformationTypeA pointer to an EFI_GUID that defines 
> the
> contents of InformationBlock.
> @@ -22,6 +24,7 @@
> 
>@retval EFI_SUCCESSThe InformationType information was
> retrieved.
>@retval EFI_UNSUPPORTEDThe InformationType is not known.
> +  @retval EFI_NOT_FOUND  Information is not available for the
> requested information type.
>@retval EFI_DEVICE_ERROR   The device reported an error.
>@retval EFI_OUT_OF_RESOURCES   The request could not be completed
> due to a lack of resources.
>@retval EFI_INVALID_PARAMETER  This is NULL.
> --
> 2.39.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117504): https://edk2.groups.io/g/devel/message/117504
Mute This Topic: https://groups.io/mt/105398062/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 3/3] IntelFsp2WrapperPkg: Fix UPD structure Reserved bytes

2024-04-08 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Friday, April 5, 2024 10:06 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Desimone,
> Nathaniel L ; Chiu, Chasel
> ; Duggapu, Chinni B 
> Subject: [PATCH v6 3/3] IntelFsp2WrapperPkg: Fix UPD structure Reserved
> bytes
> 
> Changes to update SecRamInitData UPD structure reserved bytes as par the
> latest spec.
> 
> 
> Cc: Sai Chaganty 
> Cc: Nate DeSimone 
> Cc: Chiu Chasel 
> Cc: Duggapu Chinni B 
> 
> 
> Signed-off-by: Duggapu Chinni B 
> ---
>  .../SecFspWrapperPlatformSecLibSample/SecRamInitData.c | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRa
> mInitData.c
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRa
> mInitData.c
> index f4ed658674..dabcd83eef 100644
> ---
>  .../SecFspWrapperPlatformSecLibSample/SecRamInitData.c | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git 
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
>  
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
> index f4ed658674..dabcd83eef 100644
> --- 
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
> +++ 
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
> @@ -34,8 +34,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST FSPT_UPD_CORE_DATA  
> FsptUpdDataPtr = {
>  // UPD header revision must be equal or greater than 2 when the 
> structure is compliant with FSP spec 2.2.
>  //
>  0x02,
> -{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
> +{
> +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +  0x00, 0x00, 0x00
> +}
>},
>//
>// If FSP spec version < 2.2, remove FSPT_ARCH_UPD structure.
> -- 
> 2.39.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117503): https://edk2.groups.io/g/devel/message/117503
Mute This Topic: https://groups.io/mt/105352679/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 2/3] IntelFsp2WrapperPkg: Fsp T new ARCH UPD Support

2024-04-08 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Friday, April 5, 2024 10:06 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Desimone,
> Nathaniel L ; Chiu, Chasel
> ; Duggapu, Chinni B 
> Subject: [PATCH v6 2/3] IntelFsp2WrapperPkg: Fsp T new ARCH UPD Support
> 
> Changes to update SecRamInitData as per New Spec
> 
> 
> Cc: Sai Chaganty 
> Cc: Nate DeSimone 
> Cc: Chiu Chasel 
> Cc: Duggapu Chinni B 
> 
> 
> Signed-off-by: Duggapu Chinni B 
> ---
>  .../SecFspWrapperPlatformSecLibSample/SecRamInitData.c   | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git 
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
>  
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
> index fb0d9a8683..f4ed658674 100644
> --- 
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
> +++ 
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecRamInitData.c
> @@ -43,14 +43,15 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST FSPT_UPD_CORE_DATA  
> FsptUpdDataPtr = {
>// Else, use FSPT_ARCH2_UPD structure.
>//
>{
> -0x02,
> +0x03,
>  {
>0x00, 0x00, 0x00
>  },
>  0x0020,
>  0x,
> +0x,
>  {
> -  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> +  0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>0x00, 0x00, 0x00, 0x00, 0x00, 0x00
>  }
>},
> -- 
> 2.39.1.windows.1




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117502): https://edk2.groups.io/g/devel/message/117502
Mute This Topic: https://groups.io/mt/105352676/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 1/3] IntelFsp2Pkg: Fsp T new ARCH UPD Support

2024-04-08 Thread Nate DeSimone
Hi Chinni,

One minor feedback below. With that change...

Reviewed-by: Nate DeSimone 

> -Original Message-
> From: Duggapu, Chinni B 
> Sent: Friday, April 5, 2024 10:06 AM
> To: devel@edk2.groups.io
> Cc: Chaganty, Rangasai V ; Desimone,
> Nathaniel L ; Chiu, Chasel
> ; Duggapu, Chinni B 
> Subject: [PATCH v6 1/3] IntelFsp2Pkg: Fsp T new ARCH UPD Support
> 
> Changes to support spec changes
> 
> 1. Remove usage of Pcd.
> 2. Change code to validate the Temporary Ram size input.
> 3. Consume the input saved in YMM Register
> 
> Cc: Sai Chaganty 
> Cc: Nate DeSimone 
> Cc: Chiu Chasel 
> Cc: Duggapu Chinni B 
> 
> 
> Signed-off-by: Duggapu Chinni B 
> ---
>  IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf |  1 +
>  IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf   |  1 +
>  .../FspSecCore/Ia32/Fsp24ApiEntryM.nasm   |  1 -
>  .../FspSecCore/Ia32/FspApiEntryM.nasm |  1 -
>  .../FspSecCore/Ia32/FspApiEntryT.nasm | 60 +---
>  .../FspSecCore/Ia32/SaveRestoreSseNasm.inc| 11 +++
>  IntelFsp2Pkg/FspSecCore/SecFsp.c  |  9 +++
>  IntelFsp2Pkg/FspSecCore/SecFsp.h  |  1 +
>  IntelFsp2Pkg/FspSecCore/X64/FspApiEntryT.nasm | 68 +++
>  IntelFsp2Pkg/Include/FspEas/FspApi.h  | 12 +++-
>  IntelFsp2Pkg/Include/Library/FspPlatformLib.h | 13 
>  .../Include/SaveRestoreSseAvxNasm.inc | 21 ++
>  .../BaseFspPlatformLib/FspPlatformMemory.c| 38 +++
>  13 files changed, 211 insertions(+), 26 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf 
> b/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> index cb011f99f9..8cb0e6411f 100644
> --- a/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> +++ b/IntelFsp2Pkg/FspSecCore/Fsp24SecCoreM.inf
> @@ -60,6 +60,7 @@
>FspSecPlatformLib
>CpuLib
>FspMultiPhaseLib
> +  FspPlatformLib
>  
>  [Pcd]
>gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ## CONSUMES
> diff --git a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf 
> b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> index 8029832235..ef19c6ae78 100644
> --- a/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> +++ b/IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> @@ -59,6 +59,7 @@
>FspCommonLib
>FspSecPlatformLib
>CpuLib
> +  FspPlatformLib
>  
>  [Pcd]
>gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ## CONSUMES
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm 
> b/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> index 15f8ecea83..5fa5c03569 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/Fsp24ApiEntryM.nasm
> @@ -11,7 +11,6 @@
>  ; Following are fixed PCDs
>  ;
>  extern   ASM_PFX(PcdGet32(PcdTemporaryRamBase))
> -extern   ASM_PFX(PcdGet32(PcdTemporaryRamSize))
>  extern   ASM_PFX(PcdGet32(PcdFspTemporaryRamSize))
>  extern   ASM_PFX(PcdGet8 (PcdFspHeapSizePercentage))
>  
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm 
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> index 61ab4612a3..861cce4d01 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryM.nasm
> @@ -11,7 +11,6 @@
>  ; Following are fixed PCDs
>  ;
>  extern   ASM_PFX(PcdGet32(PcdTemporaryRamBase))
> -extern   ASM_PFX(PcdGet32(PcdTemporaryRamSize))
>  extern   ASM_PFX(PcdGet32(PcdFspTemporaryRamSize))
>  extern   ASM_PFX(PcdGet8 (PcdFspHeapSizePercentage))
>  
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm 
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> index 900126b93b..088bd7ee7f 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> @@ -109,7 +109,8 @@ struc LoadMicrocodeParamsFsp24
>  .FsptArchReserved:resb3
>  .FsptArchLength:  resd1
>  .FspDebugHandler  resq1
> -.FsptArchUpd: resd4
> +.FspTemporaryRamSize: resd1  ; Supported only if ArchRevison is 
> >= 3
> +.FsptArchUpd: resd3
>  ; }
>  ; FSPT_CORE_UPD {
>  .MicrocodeCodeAddr:   resq1
> @@ -267,7 +268,7 @@ ASM_PFX(LoadMicrocodeDefault):
> cmpbyte [esp + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2
> jb Fsp20UpdHeader
> cmpbyte [esp + LoadMicrocodeParamsFsp22.FsptArchRevision], 2
> -   je Fsp24UpdHeader
> +   jaeFsp24UpdHeader
> jmpFsp22UpdHeader
>  
>  Fsp20UpdHeader:
> @@ -405,7 +406,7 @@ CheckAddress:
> cmp   byte [esp + LoadMicrocodeParamsFsp22.FspUpdHeaderRevision], 2
> jb Fsp20UpdHeader1
> cmpbyte [esp + LoadMicrocodeParamsFsp22.FsptArchRevision], 2
> -   je Fsp24UpdHeader1;
> +   jaeFsp24UpdHeader1;
> jmpFsp22UpdHeader1
>  
>  Fsp20UpdHeader1:
> @@ -497,7 +498,8 @@ ASM_PFX(EstablishStackFsp):
>; Enable FSP STACK
>;
>mov   esp, DWORD [ASM_PFX(PcdGet32 (PcdTemporaryRamBase))]
> -  add   esp, DWORD [ASM_PFX(PcdGet32 (PcdTemporaryR

Re: [edk2-devel] [PATCH v2] NetworkPkg/HttpBootDxe: Correctly uninstall HttpBootCallbackProtocol

2024-04-08 Thread Mike Beaton
Does anybody have any suggestions who I should cc as regards this?

Is it preferred to make a bugtracker issue too?


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




[edk2-devel] [PATCH 3/3] Silicon/Marvell: Update the comments of GetInformation function

2024-04-08 Thread Qingyu
Refer to Uefi spec 2.10 section 11.11.2, add a new retval
EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

Cc: Marcin Wojtas 
Signed-off-by: Qingyu 
Signed-off-by: Gahan Saraiya 
Reviewed-by: Marcin Wojtas 
---
 Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c 
b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
index 5e463ac932..c0073daa8e 100644
--- a/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
+++ b/Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c
@@ -1384,7 +1384,9 @@ Pp2DxeSnpInstall (
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned.
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -1394,6 +1396,7 @@ Pp2DxeSnpInstall (
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL.
-- 
2.39.1.windows.1



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




[edk2-devel] [PATCH 2/3] MinPlatformPkg: Update the comments of GetInformation function

2024-04-08 Thread Qingyu
Refer to Uefi spec 2.10 section 11.11.2, add a new retval
EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: Qingyu 
Signed-off-by: Gahan Saraiya 
---
 .../Test/Library/TestPointLib/DxeTestPointAip.c  | 5 -
 .../Test/Library/TestPointLib/SmmTestPointAip.c  | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c 
b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c
index a7fe9530cf..f2c44afb50 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/DxeTestPointAip.c
@@ -12,7 +12,9 @@
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned. 
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -22,6 +24,7 @@
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL. 
diff --git 
a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c 
b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c
index 84c3f8292e..96fadb6f6f 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPointAip.c
@@ -12,7 +12,9 @@
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned. 
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -22,6 +24,7 @@
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL. 
-- 
2.39.1.windows.1



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




[edk2-devel] [PATCH 1/3] OptionRomPkg: Update the comments of GetInformation function

2024-04-08 Thread Qingyu
Refer to Uefi spec 2.10 section 11.11.2, add a new retval
EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

Cc: Pedro Falcato 
Cc: Ray Ni 
Signed-off-by: Qingyu 
Signed-off-by: Gahan Saraiya 
---
 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h  | 5 -
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h 
b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
index 31c55a8e11..665221e952 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h
@@ -350,7 +350,9 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI 
*PxePtr);
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned. 
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -360,6 +362,7 @@ VOID PxeUpdate (NIC_DATA_INSTANCE *NicPtr, PXE_SW_UNDI 
*PxePtr);
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL. 
diff --git a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c 
b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
index 21151a076f..d80ce65da9 100644
--- a/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
+++ b/Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c
@@ -18,7 +18,9 @@ EFI_GUID   mSupportedInfoTypes[] = {
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned. 
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -28,6 +30,7 @@ EFI_GUID   mSupportedInfoTypes[] = {
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL. 
-- 
2.39.1.windows.1



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




[edk2-devel] [PATCH 0/3] Update the comments of GetInformation function

2024-04-08 Thread Qingyu
Refer to Uefi spec 2.10 section 11.11.2, add a new retval
EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

This patch series update GetInformation() API signature comments of
EFI_ADAPTER_INFORMATION_PROTOCOL implementations in Edk2-platform.

Qingyu (3):
  OptionRomPkg: Update the comments of GetInformation function
  MinPlatformPkg: Update the comments of GetInformation function
  Silicon/Marvell: Update the comments of GetInformation function

 Drivers/OptionRomPkg/UndiRuntimeDxe/Undi32.h | 5 -
 Drivers/OptionRomPkg/UndiRuntimeDxe/UndiAipImpl.c| 5 -
 .../Test/Library/TestPointLib/DxeTestPointAip.c  | 5 -
 .../Test/Library/TestPointLib/SmmTestPointAip.c  | 5 -
 Silicon/Marvell/Drivers/Net/Pp2Dxe/Pp2Dxe.c  | 5 -
 5 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.39.1.windows.1



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




Re: [edk2-devel] OVMF SMM Support

2024-04-08 Thread Gerd Hoffmann
On Mon, Apr 08, 2024 at 08:33:30AM +, Wu, Jiaxin wrote:
> Hi Gerd,
> 
> With below OVMF build and QEMU command, OVMF hangs after SendSmiIpi
> (mBspApicId) during SmmRelocateBases(), is there any issues with
> latest code to support SMM on OVMF or my local command/configuration
> issue?

Have not noticed any problems.  I've stopped using OvmfPkgIa32X64.dsc
though and switched to OvmfPkgX64.dsc.  Also running on linux not
windows host, which might make a difference too.

take care,
  Gerd



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




[edk2-devel] [PATCH] MdePkg: Update the comments of GetInformation function

2024-04-08 Thread Qingyu
Refer to Uefi spec 2.10 section 11.11.2, add a new retval
EFI_NOT_FOUND to EFI_ADAPTER_INFORMATION_PROTOCOL.GetInformation().
Reference: [mantis #1866] - GetInfo() of Adapter Information
Protocol should have a provision for IHV to return no data.

Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Zhiguang Liu 
Signed-off-by: Qingyu 
Signed-off-by: Gahan Saraiya 
---
 MdePkg/Include/Protocol/AdapterInformation.h | 5 -
 MdePkg/Library/DxeHstiLib/HstiAip.c  | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Protocol/AdapterInformation.h 
b/MdePkg/Include/Protocol/AdapterInformation.h
index ed19e5736c3c..8e4448eb0f87 100644
--- a/MdePkg/Include/Protocol/AdapterInformation.h
+++ b/MdePkg/Include/Protocol/AdapterInformation.h
@@ -140,7 +140,9 @@ typedef struct {
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned.
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -150,6 +152,7 @@ typedef struct {
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL.
diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c 
b/MdePkg/Library/DxeHstiLib/HstiAip.c
index a2454ffeaa7a..523a712e6f6e 100644
--- a/MdePkg/Library/DxeHstiLib/HstiAip.c
+++ b/MdePkg/Library/DxeHstiLib/HstiAip.c
@@ -12,7 +12,9 @@
 
   This function returns information of type InformationType from the adapter.
   If an adapter does not support the requested informational type, then
-  EFI_UNSUPPORTED is returned.
+  EFI_UNSUPPORTED is returned. If an adapter does not contain Information for
+  the requested InformationType, it fills InformationBlockSize with 0 and
+  returns EFI_NOT_FOUND.
 
   @param[in]  This   A pointer to the 
EFI_ADAPTER_INFORMATION_PROTOCOL instance.
   @param[in]  InformationTypeA pointer to an EFI_GUID that defines the 
contents of InformationBlock.
@@ -22,6 +24,7 @@
 
   @retval EFI_SUCCESSThe InformationType information was 
retrieved.
   @retval EFI_UNSUPPORTEDThe InformationType is not known.
+  @retval EFI_NOT_FOUND  Information is not available for the 
requested information type.
   @retval EFI_DEVICE_ERROR   The device reported an error.
   @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to 
a lack of resources.
   @retval EFI_INVALID_PARAMETER  This is NULL.
-- 
2.39.1.windows.1



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




[edk2-devel] OVMF SMM Support

2024-04-08 Thread Wu, Jiaxin
Hi Gerd,

With below OVMF build and QEMU command, OVMF hangs after SendSmiIpi 
(mBspApicId) during SmmRelocateBases(), is there any issues with latest code to 
support SMM on OVMF or my local command/configuration issue?

Build (latest edk2 code):
build -p OvmfPkg\OvmfPkgIa32X64.dsc -a IA32 -a X64 -D SECURE_BOOT -D 
SMM_REQUIRE -D DEBUG_ON_SERIAL_PORT

QEMU command (QEMU version: 8.2.0):
qemu-system-x86_64 -machine q35,smm=on -m 4G -net none -drive 
if=pflash,format=raw,unit=0,file=C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG_VS2019\FV\OVMF_CODE.fd,readonly=on
 -drive 
if=pflash,format=raw,unit=1,file=C:\Dev\Code\edk2\Build\Ovmf3264\DEBUG_VS2019\FV\OVMF_VARS.fd
 -hda fat:rw:hda-contents -serial file:log.log

Thanks,
Jiaxin


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117493): https://edk2.groups.io/g/devel/message/117493
Mute This Topic: https://groups.io/mt/105397533/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/1] OvmfPkg: OVMF supports USB mouses

2024-04-08 Thread Gerd Hoffmann
On Sat, Apr 06, 2024 at 02:41:54PM +0200, Heinrich Schuchardt wrote:
> From: Phillip Tennen 
> 
> From: Phillip Tennen 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4747
> 
> UsbMouseDxe was missing from the OVMF build description, so=20
> the Simple Pointer Protocol wasn't usable from within QEMU.

What is the use case?

How can this be tested?  As far I know neither the edk2 setup utility
(aka UiApp) nor typical OS boot loaders have mouse support ...

Also note that virtual machines typically do *not* have a mouse but a
tablet device, so UsbMouseAbsolutePointerDxe looks like the more
sensible choice to me.

>  OvmfPkg/OvmfPkgX64.dsc | 1 +
>  OvmfPkg/OvmfPkgX64.fdf | 1 +

What about the other ovmf variants?

take care,
  Gerd



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