Commit Graph

32816 Commits

Author SHA1 Message Date
Jiaxin Wu 8befdb1441 MdeModulePkg/VariableSmm: Add func for Primary Buffer valid check
Add a new function (VariableSmmIsPrimaryBufferValid) to check
Primary Buffer valid or not.

original function (VariableSmmIsBufferOutsideSmmValid) is used to
check the buffer outside MMRAM.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-07-07 08:40:03 +00:00
Jiaxin Wu acfdb6771c MdeModulePkg/VarCheckPolicyLib: Fix buffer valid check for MM
For MM, the MM Handlers do not need to validate the buffer if it is
the CommBuffer passed from MmCore through the MmiHandler() parameter.
Return TRUE directly in this case. Fix buffer valid check for MM in
this patch.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-07-07 08:40:03 +00:00
Jiaxin Wu c0021d31f8 MdeModulePkg/VarCheckPolicyLib: Update buffer valid check func name
In the MdeModulePkg/VarCheckPolicyLib, the Primary Buffer
(CommBuffer) check function has been updated to match the buffer
validation behavior.

For SMM, the SMM Handlers is to validate the buffer outside MMRAM.

For MM, the MM Handlers do not need to validate the buffer if it is
the CommBuffer passed from MmCore through the MmiHandler() parameter.
Return TRUE directly in this case. Existing code is incorrect for
the MM check. This will be fixed in the following patch.

There is no function impact.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-07-07 08:40:03 +00:00
Jiaxin Wu 67d3be644f MdeModulePkg/FaultTolerantWriteSmm: Update buffer valid check func name
In the MdeModulePkg/FaultTolerantWriteSmm, the Primary Buffer
(CommBuffer) check function has been updated to match the buffer
validation behavior:

For SMM, the SMM Handlers is to validate the buffer outside MMRAM.

For MM, the MM Handlers do not need to validate the buffer if it is
the CommBuffer passed from MmCore through the MmiHandler() parameter.
Return TRUE directly in this case.

There is no function impact.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-07-07 08:40:03 +00:00
Sergii Dmytruk 26bc42f1e3 BaseTools/GenerateCapsule.py: Fix checking for DepExp presence
struct.unpack() returns a tuple even for a single-element pack,
resulting in signature verification being evaluated to false even when
the signature is there.

This fixes --decode and --dump-info actions incorrectly reporting issues
with parsing capsule dependencies when there are none.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Sergii Dmytruk eeddb86aaa BaseTools/GenerateCapsule.py: Fix inconsistent error formatting
Just add a space between colon and a more detailed error message in two
places.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Sergii Dmytruk 47c1078175 BaseTools/GenerateCapsule.py: Require --output for --decode
--decode unconditionally uses args.OutputFile.name as a prefix for
output files that it creates and fails in a non-pretty way without
--output option.

This doesn't address creation/truncation of the file specified via
--output, but at least you're able to decode a capsule.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Sergii Dmytruk 822ff966c6 BaseTools/GenerateCapsule.py: Better error message on --decode failure
Print error text from the exception.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Sergii Dmytruk 3be79ece37 BaseTools/GenerateCapsule.py: Disallow UpdateImageIndex == 0 on --encode
This field seems to be one-based according UEFI specification, default
value is 1 and --decode of GenerateCapsule.py errors upon seeing
UpdateImageIndex less than 1.  So align --encode behaviour to enforce a
value within the 1..255 range.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Sergii Dmytruk 8e7bd66dc1 BaseTools/GenerateCapsule.py: Fix --decode operation
Commit b68d566439 added support for
input subject name with signtool and broke --decode operation by using
incorrect identifier in one place (could be an incomplete rename during
review).

It's `args.SignToolSubjectName`, not `args.SignSubjectName`.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Sergii Dmytruk 5a4a7172bc BaseTools/FmpCapsuleHeader.py: Explain error when throwing exceptions
This gives a caller a chance to report a meaningful error to the user.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-07-05 19:33:50 +00:00
Yanbo Huang f8bf46be59 UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2
This patch is to consume the PcdCpuSmmApSyncTimeout2 to
enhance the flexibility of timeout configuration.
In some cases, certain processors may not be able to enter
SMI, and prolonged waiting could lead to kernel soft/hard
lockup. We have now defined two timeouts. The first timeout
can be set to a smaller value to reduce the waiting period.
Processors that are unable to enter SMI will be woken up
through SMIIPL to enter SMI, followed by a second waiting
period. The second timeout can be set to a larger value to
prevent delays in processors entering SMI case due to the
long instruction execution.

This patch adjust the location of PcdCpuSmmApSyncTimeout2
to avoid conflict.

Signed-off-by: Yanbo Huang <yanbo.huang@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
2024-07-05 17:55:48 +00:00
Yanbo Huang 4efcd654ec Revert "UefiCpuPkg/PiSmmCpuDxeSmm: Consume PcdCpuSmmApSyncTimeout2"
This reverts commit cb3134612d.
Intel server platform sync this commit will hit conflict since our code base is old.
We don't want to cherry-pick the dependent patches to avoid potential issue.
We need to revert this commit first and then fix the conflict and reapply the change.
Sorry for the incovenience.

Signed-off-by: Yanbo Huang <yanbo.huang@intel.com>
2024-07-05 17:55:48 +00:00
Xianglai Li a3359ffb25 OvmfPkg/LoongArchVirt: Optimize the use of serial port libraries
Because the complex dependency between SerialPortLib and
PciExpressLib leads to multiple references to the lib
library in the loongarch dsc file, optimizing SerialPortLib
now simplifies multiple references to lib in the dsc file.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Bibo Mao <maobibo@loongson.cn>
Cc: Chao Li <lichao@loongson.cn>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Xianglai Li <lixianglai@loongson.cn>

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
2024-07-05 16:01:02 +00:00
Jiaxin Wu 22d0babd33 MdeModulePkg/StandaloneMmReportStatusCodeLib: Support MM_CORE_STANDALONE
Support the module type for MM_CORE_STANDALONE

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-07-05 14:52:00 +00:00
Jiaxin Wu a1d94d9e6e MdePkg/StandaloneMmServicesTableLib: Support MM_CORE_STANDALONE
Support the module type for MM_CORE_STANDALONE

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
2024-07-05 14:52:00 +00:00
Michael Kubacki 051c7bb434 StandaloneMmPkg: Fix section data length returned larger than actual data
This change fixes an issue where the returned section data length
is always 4 bytes larger than the actual section length. This could
cause an issue where the caller accesses the final 4 bytes which
would be invalid.

Co-authored-by: Kun Qin <kuqin@microsoft.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-07-05 13:08:56 +00:00
Jiaxin Wu bef0d333dc UefiCpuPkg/PiSmmCpuDxeSmm: Fix system hang when SmmProfile enable
MMIO ranges within the mProtectionMemRange array may exceed 4G
and should be configured as 'Present & NX'. However, the initial
attribute for these MMIO addresses in the page table is
'non-present'. Other attributes should not be set or updated for
a non-present range if the present bit mask is zero, as this could
result in an error during the InitPaging for the page table update
process.

This patch is to resolve the error to make sure MMIO page table
can be configured correctly.

Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
2024-07-05 08:18:31 +00:00
Xiaoyao Li 9389b9a208 MdePkg/Tdx.h: Fix the order of NumVcpus and MaxVcpus
For TDCALL leaf TDG.VP.INFO, the bit 31:0 in R8 returns NUM_VCPUS and
bit 63:32 in R8 returns MAX_VCPUS. Current struct
TDCALL_INFO_RETURN_DATA defines them in wrong order.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
2024-07-04 23:05:22 +00:00
Dun Tan ed9a64af1b SecurityPkg/Tcg2Config: avoid potential build error
Cast pointer type to VOID* to avoid potential build error.
If the two PCD are FixAtBuild, PcdGetPtr will return a const
type pointer. Since the second parameter of BuildGuidDataHob
is VOID*, build error may happen with following log:
C4090: 'function': different 'const' qualifiers

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-04 21:33:44 +00:00
Alexey Kardashevskiy 2809966189 OvmfPkg: Enable AMD SEV-ES DebugVirtualization
Write the feature bit into PcdConfidentialComputingGuestAttr
and enable DebugVirtualization in PEI, SEC, DXE.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Min Xu <min.m.xu@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
---
Changes:
v5:
* "rb" from Tom

v4:
* s/DebugSwap/DebugVirtualization/g
2024-07-04 20:39:26 +00:00
Alexey Kardashevskiy 63a7152471 UefiCpuPkg: Add AMD SEV-ES features support
CONFIDENTIAL_COMPUTING_GUEST_ATTR is not a simple SEV level anymore
and includes a feature mask since the previous commit.

Fix AmdMemEncryptionAttrCheck to check the level and feature
correctly and add DebugVirtualization support.

Since the actual feature flag is not set yet, this should cause
no behavioural change.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
---
Changes:
v5:
* "rb" from Tom
2024-07-04 20:39:26 +00:00
Alexey Kardashevskiy 9f06feb5d2 OvmfPkg: Add AMD SEV-ES DebugVirtualization feature support
The SEV-ES DebugVirtualization feature enables type B swapping of
debug registers on #VMEXIT and makes #DB and DR7 intercepts
unnecessary and unwanted.

When DebugVirtualization is enabled, this stops booting if
interaction from the HV.

Add new API to PEI, SEC, DXE.

This does not change the existing behaviour yet.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Min Xu <min.m.xu@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
---
Changes:
v5:
* "rb" from Tom

v4:
* s/DebugSwap/DebugVirtualization/
2024-07-04 20:39:26 +00:00
Alexey Kardashevskiy 3f28aa2fb0 MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr
PcdConfidentialComputingGuestAttr so far only contained an SEV mode bit
but there are more other features which do not translate to levels
such as DebugVirtualization or SecureTsc.

Add the feature mask and the DebugVirtualization feature bit to the PCD.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
---
Changes:
v4:
* s/CCAttrFeatureAmdSevDebugSwap/CCAttrFeatureAmdSevEsDebugVirtualization/

v2:
* expanded features mask
* added type mask
2024-07-04 20:39:26 +00:00
Alexey Kardashevskiy bc3a1ec2a2 MdePkg/Register/Amd: Define all bits from MSR_SEV_STATUS_REGISTER
For now we need DebugSwap but others are likely to be needed too.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
Changes:
v5:
* "rb" from Tom

v4:
* added more from April/2024 APM
2024-07-04 20:39:26 +00:00
Chun-Yi Lee 6852f6984b EmbeddedPkg/VirtualRealTimeClockLib: Support SOURCE_DATE_EPOCH
RISC-V ovmf used VirtualRealTimeClockLib but the default epoch is a
compilation time. It causes that the RISC-V ovmf binary image is NOT
reproducible.

This patch added the support of SOURCE_DATE_EPOCH by printenv command.
If SOURCE_DATE_EPOCH be found then we use it as BUILD_EPOCH. Otherwise
we run date command for setting BUILD_EPOCH.

For distributions want a reproducible RISC-V ovmf image, they should
export SOURCE_DATE_EPOCH environment variable before building ovmf.

References: https://reproducible-builds.org/docs/source-date-epoch/
Cc: Pete Batard <pete@akeo.ie>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
2024-07-04 19:05:45 +00:00
Michael Kubacki 8430c69dc1 MdePkg/Nvme.h: Add missing NVMe capability descriptions
Most of the definitions in this file are currently well documented.

This adds documentation for a few missing fields in the NVMe
Controller Capabilities structure.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-07-04 18:11:09 +00:00
Tobin Feldman-Fitzthum cdffb638c8 AmdSev: enable kernel hashes without initrd
If kernel hashes are enabled but no initrd is provided,
QEMU will still create an entry in the hash table, but it
will be the hash of an empty buffer.

Remove the explicit check for the length of the blob.
This logic will be handled by the later hash comparison,
which will still fail when the blob is not present
but is expected, but will pass when the blob is not present
and the hash table contains a hash of an empty buffer.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@linux.ibm.com>
2024-07-04 16:09:56 +00:00
Mike Maslenkin 4e36bed812 MdeModulePkg/NvmExpressDxe: use format "0x%lx" for UINT64 values.
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-07-04 14:56:42 +00:00
Mike Maslenkin 4f73eef838 MdeModulePkg/NvmExpressDxe: fix format used for Eui64 conversion
Eui64 is a 64 bit value, so the "L" or "l" is required for
format specifier, otherwise only lower 32 bit will be converted.

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2024-07-04 14:56:42 +00:00
Joey Vagedes 6b9307192b BaseTools: InfBuildData: Fix Private value retrieval
Update retrieval of private guids, protocols, or ppis from a package's
declaration file to use the original path of the module's INF file
rather than the current path. When building the same module multiple
times in the same INF (by override the define's FILE_GUID), a temporary
instance of the module is generated outside the package, causing the
retrieval of private values to fail as the check to access private
values is done by verifying the module to build, is inside the package.

Signed-off-by: Joey Vagedes <Joey.Vagedes@gmail.com>

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
2024-07-04 11:55:25 +00:00
Joey Vagedes 592725d229 DscCompleteCheck: Allow git ignore syntax
Allows ignore lines in the CI YAML file to use git ignore syntax.

This is especially useful for ignore files recursively in directories
like those that may exist in an external dependency folder.

Co-authored-by: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
2024-07-04 07:40:58 +00:00
Britton Chesley ed07a2bb11 MdeModulePkg/UsbBusDxe: USB issue fix when the port reset
BZ #4456

Fixed a bug which led to an ASSERT due to the USB device
context being maintained after a port reset, but the
underlying XHCI context was uninitialized. Specifically,
Xhc->UsbDevContext is freed after a reset and only
re-allocates the default [0] enpoint transfer ring.
In order to avoid a memory leak, device enumeration is
performed after freeing the necessary buffers. This
allocates the Xhc->UsbDevContext for all endpoints of
the USB device.

Signed-off-by: Britton Chesley <Brit.Chesley@amd.com>
2024-07-03 12:23:26 +00:00
Joey Vagedes 4f174696fd .pytool: CompilerPlugin: Pass through build vars
Pass build variables (those passed to build.py through -D) to the DSC
parser to provide a more accurate parsing of the DSC file.

Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
2024-07-03 02:41:13 +00:00
Dionna Glaze 6b256cef01 OvmfPkg: Create SP800155 HOBs from QemuFwCfgFile
Signed firmware measurements are allowed to be passed along to in the
TCG and CC event logs according to the TCG PC Client Platform Firware
Profile. The event logs include events that Tcg2Dxe reads from
appropriately GUIDed HOBs, so allow opt/org.tianocode/sp800155evt/%d to
pass along events that the VMM sees fit to provide. One event per
number, starting from 0, increasing by 1 until there are no more
contiguous files.

The VMM may provide reference measurements through UEFI variables that
it references from the SP800-155 event3 structure given the appropriate
RIM locator type, or via URL, etc.

Each event read from fw_cfg, is written one-by-one to
a EFI_HOB_GUID_TYPE HOB created for the event. The name they target
gTcg800155PlatformIdEventHobGuid for the later Dxe driver to use to
extend the event log.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2024-07-02 16:10:29 +00:00
Dionna Glaze ff1c4fa168 MdePkg: UefiTcgPlatform.h updates
The TCG_Sp800_155_PlatformId_Event2 and 3 structures both list the
platform model string twice, which is incorrect according to the
TCG PC Client Platform Firmware Profile.

Also add constant definitions for the locator types added in the
December 2023 revision.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2024-07-02 16:10:29 +00:00
Leif Lindholm b2216427ca EmbeddedPkg/.ci.yaml: add temporary workaround ECC exception
A new contributor has a name not describable by the character set
developed for 1960s US teleprinters, causing the CI to object and
blocking their code from being merged due to the copyright statement.

While we do want to keep the code clean from characters other
contributors cannot trivially reproduce, this should not extend to
requiring intentionally misstating legal claims.

Until we figure out the long-term fix, add an exception for the surname
triggering the failure.

Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
2024-07-02 13:08:04 +00:00
Dun Tan e939ecf6c1 SecurityPkg: Consume gEdkiiTcg2AcpiCommunicateBufferHobGuid
Consume gEdkiiTcg2AcpiCommunicateBufferHobGuid in Tcg2Acpi
driver. Tcg2Acpi will use the buffer stored in the HOB to
exchange information with Tcg2StandaloneMm by the
MM_COMMUNICATION_PROTOCOL.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan 9a76c7945b SecurityPkg: Build gEdkiiTcg2AcpiCommunicateBufferHobGuid
Install a callback of gEfiPeiMemoryDiscoveredPpiGuid to
build the gEdkiiTcg2AcpiCommunicateBufferHobGuid in the
Tcg2ConfigPei PEIM.
The HOB contains a buffer reserved by MmUnblockMemoryLib.
The buffer will be used in Tcg2Acpi driver to retrive
information from standalone mm environment.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan cb6ba975ae SecurityPkg: Add new gEdkiiTcg2AcpiCommunicateBufferHobGuid
Add a new GUID HOB gEdkiiTcg2AcpiCommunicateBufferHobGuid.
This Tcg2 Acpi Communicate Buffer HOB is used to store the
address of a buffer reserved for Tcg2Acpi driver. The buffer
will be used to retrive information from Standalone mm
environment.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan add3ca4e00 SecurityPkg:Consume gEdkiiTcgPhysicalPresenceInterfaceVerHobGuid
Consume gEdkiiTcgPhysicalPresenceInterfaceVerHobGuid in
StandaloneMmTcg2PhysicalPresenceLib. This is to avoid
using the dynamic PcdTcgPhysicalPresenceInterfaceVer in
StandaloneMm module.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan 97ede07beb SecurityPkg/Tcg2StandaloneMm:Consume gEdkiiTpmInstanceHobGuid
Consume gEdkiiTpmInstanceHobGuid in Tcg2StandaloneMm
driver. It's to avoid using dynamic PcdTpmInstanceGuid
in StandaloneMm driver.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan cb38d27f1d SecurityPkg/Tcg2ConfigPei: Build two new HOBs
Build following two new HOBs:
  gEdkiiTcgPhysicalPresenceInterfaceVerHobGuid
  gEdkiiTpmInstanceHobGuid
The two HOBs will be used by Tcg2StandaloneMm driver
to avoid using the related dynamic PCDs.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan f9950cceec SecurityPkg:Add new HOB for PhysicalPresenceInterfaceVersion
Add a new gEdkiiTcgPhysicalPresenceInterfaceVerHobGuid.
This new Guid HOB contains a a string of the Version of
Physical Presence interface which is the same as
PcdTcgPhysicalPresenceInterfaceVer. The HOB is used for
StandaloneMm driver which needs to consume the dynamic
PcdTcgPhysicalPresenceInterfaceVer.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Dun Tan 5ab96f5437 SecurityPkg: Add a new gEdkiiTpmInstanceHobGuid
This new Guid HOB contains a TPM instance Guid which
is the same as PcdTpmInstanceGuid. The HOB is used for
StandaloneMm driver which needs to consume the dynamic
PcdTpmInstanceGuid.

Signed-off-by: Dun Tan <dun.tan@intel.com>
2024-07-02 03:31:31 +00:00
Jeshua Smith 8bf27965db DynamicTablesPkg: AmlLib remove unnecessary cast
Now that CONST input strings to the AmlLib APIs
are properly marked as CONST we don't need to cast
them to non-CONST before passing them.

Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
2024-07-01 09:40:09 +00:00
Jeshua Smith 469d09d6b2 DynamicTablesPkg: AmlLib CONST cleanup
Several input strings to AmlLib APIs are treated
as CONST but were missing the CONST keyword,
requiring their callers to create unnecessary r/w
copies of r/o input strings. This change properly
marks these input strings as CONST.

Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
Reviewed-by: Jeff Brasen <jbrasen@nvidia.com>
2024-07-01 09:40:09 +00:00
Joey Vagedes 8c09d862bf BaseTools: BinToPcd: Remove xdrlib dependency
The xdrlib dependency was removed in commit
5cadb8ce21 but the actual import of the
module was not removed. This commit removes the import of xdrlib and
sorts the imports.

Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
2024-06-30 23:45:58 +00:00
dependabot[bot] 3b2025969e pip: bump edk2-pytool-library from 0.21.5 to 0.21.8
Bumps [edk2-pytool-library](https://github.com/tianocore/edk2-pytool-library) from 0.21.5 to 0.21.8.
- [Release notes](https://github.com/tianocore/edk2-pytool-library/releases)
- [Commits](https://github.com/tianocore/edk2-pytool-library/compare/v0.21.5...v0.21.8)

---
updated-dependencies:
- dependency-name: edk2-pytool-library
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-28 15:02:32 +00:00
Jiaxin Wu dc3ed379df UefiCpuPkg/Library: Add MM_STANDALONE type for SmmCpuPlatformHookLib
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Hongbin1 Zhang <hongbin1.zhang@intel.com>
Cc: Wei6 Xu <wei6.xu@intel.com>
Cc: Yuanhao Xie <yuanhao.xie@intel.com>
2024-06-28 05:47:13 +00:00