Commit Graph

34241 Commits

Author SHA1 Message Date
Michael Kubacki
ab3a451b1b OvmfPkg: Update pipeline filenames
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.

To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-04-22 23:54:34 +00:00
Michael Kubacki
b9f565f8c9 EmulatorPkg: Update pipeline filenames
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.

To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-04-22 23:54:34 +00:00
Michael Kubacki
1566205a40 ArmVirtPkg: Rename Linux pipeline file
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.

To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-04-22 23:54:34 +00:00
Michael Kubacki
a0d785a560 .azurepipelines: Update pipeline filenames
Details about a particular pipeline change over time - such as the
specific Linux distro or toolchain version. At the same time, the
pipeline files are directly referenced in Azure Pipelines to run the
pipeline and few users have access to change those details.

To make the files less likely to refer to outdated information over
time and reduce the need for an Azure Pipeline administrator to get
involved, the files are updated to drop specific details apart from
the host OS environment used in the pipeline.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2025-04-22 23:54:34 +00:00
Shveta Gupta
d3b2ee2df3 ShellPkg: Updated Memory Form Factor definition per SMBIOS 3.8.0
This patch adds additional support for the new CAMM form factor
defined in SMBIOS specification 3.8.0

Signed-off-by: Shveta Gupta <shvetag@nvidia.com>
2025-04-22 17:32:39 +00:00
Jiaxin Wu
1c4c85a003 MdePkg/Library: Remove unused gEfiDevicePathProtocolGuid
Remove unused gEfiDevicePathProtocolGuid in Base UefiDevicePathLib
since it's not used.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
2025-04-22 15:42:33 +00:00
Michael D Kinney
be4ae9a97d MdePkg/Include/Ppi: Add back gEdkiiPeiMpServices2PpiGuid
Commit aef50446ce
removed gEdkiiPeiMpServices2PpiGuid from UefiCpuPkg.dec
which causes build breaks if an INF [Ppis] section
lists gEdkiiPeiMpServices2PpiGuid. There is no method
for a DEC file for conditionally declare a PPI.

In order to support the migration from use of
gEdkiiPeiMpServices2PpiGuid to the preferred use of the
gPeiMpServices2Ppi, update MpServices2.h in MdePkg
to define EDKII_PEI_MP_SERVICES2_PPI_GUID and
EDKII_PEI_MP_SERVICES2_PPI.

All references to the EDK II PEI MP Services 2 PPI can be
removed after all downstream consumers have had a chance
to perform the migration.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-04-22 14:43:52 +00:00
Michael D Kinney
3c79bd38e0 UefiCpuPkg: Add back gEdkiiPeiMpServices2PpiGuid
Commit aef50446ce
removed gEdkiiPeiMpServices2PpiGuid from UefiCpuPkg.dec
which causes build breaks if an INF [Ppis] section
lists gEdkiiPeiMpServices2PpiGuid. There is no method
for a DEC file for conditionally declare a PPI.

In order to support the migration from use of
gEdkiiPeiMpServices2PpiGuid to the preferred use of the
gPeiMpServices2Ppi, add gEdkiiPeiMpServices2PpiGuid back
to the UefiCpuPkg.dec.

All references to the EDK II PEI MP Services 2 PPI can be
removed after all downstream consumers have had a chance
to perform the migration.

Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
2025-04-22 14:43:52 +00:00
Gerd Hoffmann
63e4713c48 OvmfPkg: switch 4M builds to full openssl
The Full variant enables support for EC, which in turn is needed for TLS
1.3.  It also increases the size, so turn this on for 4M builds only.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-22 10:39:10 +00:00
Gerd Hoffmann
30c754d853 OvmfPkg: move openssl/tls library config to .dsc.inc file
Reduce dsc file duplication and simplify updates by moving openssl + tls
configuration to an include file.  No functional change.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-22 10:39:10 +00:00
Johnny.Fan
f96d38f432 ArmPkg/ArmScmiDxe: Fix SCMI param overwrite in multi-transaction scenario
Fix an issue where input parameters in SCMI messages may be overwritten by
return values during repeated transactions when retrieving large data sets.

This issue affects:
1. ClockDescribeRates: when the number of clock rates exceeds the transfer
   limit. According to the SCMI specification (Section 4.6.2.5), the first
   and second parameters are initially used to pass clock_id and rate_index.
   However, due to SCMI’s shared memory communication mechanism, these same
   memory locations are later reused to return status and num_rate_flags.

2. PerformanceDescribeLevels: when the number of performance levels is too
   large to return in a single response. As described in Section 4.5.3.5,
   the first and second parameters are initially used for domain_id and
   level_index, but are overwritten with status and num_levels in the return.

Because SCMI reuses the same shared memory buffer for both input and output,
the return values can override input parameters if the buffer is not properly
re-initialized before each request. This patch ensures that the first and
second parameters are correctly set before every transaction to preserve
input integrity and ensure correct protocol behavior.

Signed-off-by: jie.fu <jie.fu@cixtech.com>
2025-04-22 09:23:32 +00:00
Nick Ramirez
8406e672e8 MdePkg: Updated Memory Form Factor definition per SMBIOS 3.8.0
This patch adds support for the new CAMM form factor
defined in SMBIOS specification 3.8.0

Signed-off-by: Nick Ramirez <nramirez@nvidia.com>
2025-04-22 11:53:23 +08:00
Guo Dong
99a5f388df UefiPayloadPkg: Fix a typo in SMM base
There is a typo when calculating smrr base on S3 path.
This change fixes the typo.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-04-22 00:32:00 +00:00
Guo Dong
238dfc54d0 UefiPayloadPkg: Add MemoryTypeInformation HOB
MemoryTypeInformation HOB was built in FD and FIT image format UEFI payload.
But this HOB was not built in ELF image format UEFI payload. Adding this HOB
for ELF image format to keep payload consistent in different image format.

When this HOB is missing, DXE/SMM driver might be dispatched above 4GB and
MemoryType information HOB assists GCD with defragmenting the memory map.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-04-22 00:32:00 +00:00
Guo Dong
19c6189f54 UefiPayloadPkg: Fix SMM build failure
when SMM_SUPPORT is enabled, a build failure was seen since two SMM
libraries are missing. Just add them in the DSC file to fix it.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2025-04-22 00:32:00 +00:00
Kun Qin
003873db21 MdeModulePkg: PiSmmIpl: Fix physical address dereferencing
With current implemenation, all 3 SmmCommunication* functions go through
the same routine, which will dereference the incoming pointer to inspect
whether this is a V3 buffer or not.

However, the caller always pass in the physical addresses, which could
cause the system to page fault after OS take over the runtime control.

This change reverted the common routine to its previous form to handle MM
communicate v1 and v2. Additionally, a specific communicate function for
v3 was created to support MM communicate v3.

Co-authored-by: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-21 06:07:39 +00:00
Oliver Smith-Denny
2e85d12685 CryptoPkg: Resolve CodeQL Errors
This patch updates several CodeQL errors for potential null pointer
access and unguarded header conclusion across production and test
code that have been flagged in the build/security tab in GitHub.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2025-04-21 02:14:50 +00:00
Paul Huang
62390a89c5 MdePkg: Fix typos in PerformanceLib.h
propery -> property
lof     -> log
evnent  -> event

Signed-off-by: Paul Huang <aphroteus@gmail.com>
2025-04-19 00:47:42 +00:00
Kun Qin
5e5ca20bf7 Maintainers.txt: Add Kun Qin as reviewer for ARM-FFA folders in SecurityPkg
- Updated Maintainers.txt to include Kun Qin as a maintainer for the ARM-
  FFA sections in SecurityPkg.
- Added his contact information: email and GitHub username.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
Kun Qin
548c29129c SecurityPkg: Tpm2InstanceLibFfa: Introduce Tpm2InstanceLib over FF-A
This change introduces a `Tpm2InstanceLibFfa` library to support TPM over
FF-A and works with Tpm2DeviceLibRouter* libraries.

The implementation follows the TPM over FF-A spec v1.0 BET:
https://developer.arm.com/documentation/den0138/latest/

The change is tested on QEMU SBSA virtual platform and proprietary
hardware platforms.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
kuqin12
86d5680817 SecurityPkg: Tpm2DeviceLibFfa: Introduce TPM device library over FF-A
This change introduces a `Tpm2DeviceLibFfa` library to support TPM over
FF-A.

The implementation follows the TPM over FF-A spec v1.0 BET:
https://developer.arm.com/documentation/den0138/latest/

The change is tested on QEMU SBSA virtual platform and proprietary
hardware platforms.

Co-authored-by: Raymond Diaz <raymonddiaz@microsoft.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
Kun Qin
df77417d39 SecurityPkg: Tpm2ServiceFfa: Introduce TPM over FF-A Definitions
TPM over FF-A is a mechanism enabling the normal world to communicate
with TPM devices offered as a FF-A service in the secure world.

This update introduces a header file containing definitions from the TPM
over FF-A specification, as detailed in the following documentation:
https://developer.arm.com/documentation/den0138/latest/

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
Kun Qin
7d297e370e SecurityPkg: Tcg2AcpiFfa: Add Tcg2Acpi for FFA enabled ARM platforms
This change adds a new driver Tcg2AcpiFfa. It will publish the TPM2 and
the corresponding SSDT table that is responsible for supporting the
physical presence interface through ASL methods during OS runtime.

Co-authored-by: Raymond Diaz <raymonddiaz@microsoft.com>
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
Kun Qin
219c3bac05 SecurityPkg: SmmTcg2PhysicalPresenceLib: Add ARM platforms implementation
This change adds a new library instance of SmmTcg2PhysicalPresenceLib. It
will directly check on the PCD value instead of relying on the HOB value,
which will require change on the TFA/SPMC side.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
Kun Qin
ec5d8ad35f SecurityPkg: Tcg2StandaloneMmArm: Add Tcg2StandaloneMm for ARM platforms
This change adds a new driver Tcg2StandaloneMmArm. It will register an
MMI handler that is responsible for supporting the physical presence
interface from ASL methods during OS runtime.

Platforms need to expose the PPI ACPI function GUID in the Standalone MM
secure partition.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
Kun Qin
f89ae9ca2a SecurityPkg: PhysicalPresenceData: Add a GUID used for ACPI functions
This change adds a GUID for the physical presence interface. This is
defined in TCG Physical Presence Interface v1.30, Rev. 00.52: Section
8.1 ACPI Functions.

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2025-04-18 18:52:33 +00:00
INDIA\sachinganesh
29960f389f MdePkg: Add conditional backwards compatibility to MpServices2 aliases
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg. EDKII_PEI_MP_SERVICES2_PPI structure and PPI GUID
are provided as backward compatible references.

These references have been wrapped under a conditional to aid with
its eventual removal.

To enable, define ENABLE_DEPRECATED_EDKII_MP_SERVICES2.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
e5dae263fe UefiCpuPkg/S3Resume2Pei: Rename EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

Relevant changes have been made here.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
7aa2b3106c UefiCpuPkg/Test: Rename EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

Relevant changes have been made here.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
1d6b8aafa7 UefiCpuPkg/Library: Rename EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

Relevant changes have been made here.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
b66d325cc0 UefiCpuPkg/Include: Rename EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

Relevant changes have been made here.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
7de3a1014f UefiCpuPkg/CpuMpPei: Rename EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

Relevant changes have been made here.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
997e4e393f OvmfPkg: Rename EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

Relevant changes have been made here.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
aef50446ce UefiCpuPkg: Remove EDKII_PEI_MP_SERVICES2_PPI
EDKII_PEI_MP_SERVICES2_PPI has been renamed to EFI_PEI_MP_SERVICES2_PPI
and moved to MdePkg.

The related header and PPI GUID has been removed from UefiCpuPkg

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
INDIA\sachinganesh
27b063a1ff MdePkg: Add EFI_PEI_MP_SERVICES2_PPI
EFI_PEI_MP_SERVICES2_PPI has been added to MdePkg.

This PPI earlier existed as EDKII_PEI_MP_SERVICES2_PPI in UefiCpuPkg.

EDKII_PEI_MP_SERVICES2_PPI structure and PPI GUID are provided as
references for backwards compatibility.

Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
2025-04-18 17:13:55 +00:00
Gerd Hoffmann
89b595d115 OvmfPkg/QemuKernelLoaderFsDxe: fix allocation failure check
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2025-04-18 15:07:02 +00:00
Dun Tan
be720b8d6c EmbeddedPkg: Add two new APIs in PrePiHobLib
This commit is to add two new APIs in EmbeddedPkg
PrePiHobLib:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Dun Tan
9ae1c8d425 ArmVirtPkg: Add two new APIs in ArmVirtDxeHobLib
This commit is to add two new APIs in ArmVirtDxeHobLib:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Dun Tan
6b48cdc917 StandaloneMmPkg: Add two new APIs in HobLib
This commit is to add two new APIs in StandaloneMmPkg
StandaloneMmHobLib and StandaloneMmCoreHobLib:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Dun Tan
cdd31b6460 UefiPayloadPkg: Add two new APIs in HobLib
This commit is to add two new APIs in UefiPayloadPkg
DxeHobLib and PayloadEntryHobLib:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Dun Tan
a9cf419ed9 MdeModulePkg: Add two new APIs in BaseHobLibNull
This commit is to add two new APIs in MdeModulePkg
BaseHobLibNull:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Dun Tan
161fa22bef MdePkg: Add two new APIs in HobLib
This commit is to add two new APIs in MdePkg PeiHobLib,
DxeHobLib, DxeCoreHobLib and MockHobLib:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched

GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB

list for the Memory Allocation HOB with a matching base

address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is

returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Dun Tan
3872c38049 MdePkg/Include: Add two new APIs in HobLib.h
This commit is to add two new APIs in HobLib.h:
GetNextMemoryAllocationGuidHob ()
TagMemoryAllocationHobWithGuid ()

The UEFI_PI_SPEC defines the EFI_GUID Name in the
EFI_HOB_MEMORY_ALLOCATION_HEADER as:
A GUID that defines the memory allocation region’s type
and purpose, as well as other fields within the memory
allocation HOB.

Currently there is no API in HobLib to handle this Name
GUID in EFI_HOB_MEMORY_ALLOCATION_HEADER, and the code
logic is common. So the following 2 APIs are added to:

1.The GetNextMemoryAllocationGuidHob () returns the next
instance of the Memory Allocation HOB with the matched
GUID from a starting HOB pointer.

2.The TagMemoryAllocationHobWithGuid () searchs the HOB
list for the Memory Allocation HOB with a matching base
address and set the Name GUID. Then the instance of the
tagged Memory Allocation HOB with matched base address is
returned.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2025-04-18 03:48:07 +00:00
Ceping Sun
cd76265f1a OvmfPkg: Enable Smbios measurement
Refer to TCG spec section 3.4.2 "SMBIOS structures that contain static
configuration information (e.g. Platform Manufacturer Enterprise Number
assigned by IANA, platform model number, Vendor and Device IDs for each
SMBIOS table) that is relevant to the security of the platform MUST be
measured using the event type EV_EFI_HANDOFF_TABLES2"

Smbios tables shall be measured as defined in the spec.

Spec: PC-Client-Platform-Firmware-Profile-Version-1.06-Revision-52

https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hunter Adrian <adrian.hunter@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2025-04-17 15:13:00 +00:00
Sarah Walker
8d3c7c196d DynamicTablesPkg: AcpiSpcrLib: Support as-is baud rate setting
The SPCR specification at
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table
states that baud rate 0 is interpreted as "as-is". This indicates that the
OS should rely on the current UART configuration until the full featured
driver is initialized.

Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-04-17 14:13:07 +01:00
Sarah Walker
28b952a56b MdePkg: Add as-is baud rate setting to SPCR
The SPCR specification at
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table
states that baud rate 0 is interpreted as "as-is". This indicates that the
OS should rely on the current UART configuration until the full featured
driver is initialized.

Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-04-17 14:13:07 +01:00
Sarah Walker
edaae7bc75 ShellPkg: AcpiView: Add parser support for SPCR Revision 4
Revision 4 adds fields for UART clock frequency, precise baud rate and ACPI
object namespace string. The revision 4 specification is at
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table

Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-04-17 14:13:07 +01:00
Sarah Walker
605582551a DynamicTablesPkg: AcpiSpcrLib: Add support for SPCR revision 4
Revision 4 adds fields for UART clock frequency, precise baud rate and ACPI
object namespace string. The revision 4 specification is at
https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/serial-port-console-redirection-table

Signed-off-by: Sarah Walker <Sarah.Walker2@arm.com>
2025-04-17 14:13:07 +01:00
Phil Noh
1f6c875d37 SecurityPkg/OpalPasswordDxe: Improve the function to get device name
Improve OpalDriverGetDriverDeviceName function that gets device name
through the component name protocol. Currently the function searches for
all handles (as controller handle) to find the right GetControllerName
service for the child handle. The update improves the way to get device
name and supports better performance (e.g. 1681(μs) -> 3(μs) for 1 NVMe
device). This can prevent a compatibility issue for GetControllerName
service of some drivers, which is not flexible for handle parameter
information (e.g. it was found that an EFI driver caused an exception
error/hang when GetControllerName service for the driver is called in
OpalDriverGetDeviceNameByProtocol function).

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2025-04-17 08:15:14 +00:00
Jacob Xu
c2d8e92367 SecurityPkg-Tpm2DeviceLibDTpm: Check SNP enabled prior to using AmdSvsmLib
AmdSvsmLib currently doesn't check if SNP enabled, thus using AmdSvsmLib
may errantly cause the caller code to believe SVSM is present. This
leads to boot failure on non-SNP enabled VMs.

We use the PcdConfidentialComputingGuestAttr since it remains valid
after MpInitLib runs which invalidates PcdSevEsWorkArea's cached
sev-status msr which we use to check for SNP enabled in other places.

The added functions ConfidentialComputingGuestHas() and
AmdMemEncryptionAttrCheck() are copied from MpLib.c, which is intended
to be replaced later on with a more minimal library perhaps in MdePkg to
cleanup some of the circular dependencies currently surrounding SvsmLib.

Signed-off-by: Jacob Xu <jacobhxu@google.com>
Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>
2025-04-17 06:32:18 +00:00