Commit Graph

33674 Commits

Author SHA1 Message Date
Chris Fernald 17e67d26d9 MdeModulePkg DxeMain: Add late initialization for Debug Agent.
Add a late initialize in DxeMain for the debug agent. This is required
for the debug agent to be able to setup events to handle image loads,
exit boot services, and other important callbacks.

Define a reinitialize debug agent.

Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
2024-12-16 20:49:45 +00:00
Tormod Volden e99d532fd7 ShellPkg/UefiShellLib: Accept "0 " as valid numeric string
InternalShellIsHexOrDecimalNumber() would fail to interpret e.g. "0 " or
"00 " as valid numeric strings. After skipping the "0" digits as
leading zeroes, it would check if the next character is a valid hex or
decimal digit, which would then fail on the terminating character.

Therefore return success if "leading" zeroes have been consumed and
there are no more characters.

InternalShellStrHexToUint64() would fail to interpret e.g. "0 " or "00 "
as valid numeric strings. After skipping the "0" digits as leading
zeroes, it would find itself surprised by the following space.

Restrict the "bad space" check to the case where it had just consumed
the "x" or "X" marker. Otherwise the space is fine (depending on
StopAtSpace either end of number or interspersed space) since there
were only zeroes so far.

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

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden d63d5884d7 ShellPkg/UefiShellLib: Only write value if successful conversion
The ShellConvertStringToUint64() function documentation says:
"Upon a successful return the value of the conversion."

So do not write any value if the conversion failed.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden f34a945a80 ShellPkg/UefiShellLib: Simplify check for empty string
StrSize() uses StrLen() which counts until the terminating NULL
character.

For checking for an empty string it is more efficient to directly check
for the NULL terminator instead of calling StrSize().

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden e11a912aa3 ShellPkg/UefiShellLib: Correct check for empty string
StrSize() will never return zero since it counts the terminating NULL
character.

An empty string will have the storage size of the terminator.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Tormod Volden ef3a1ef397 ShellPkg/UefiShellLib: Prevent out-of-bounds access
If InternalShellStrHexToUint64() is passed a string that starts with 'X'
or 'x' it would try to read the byte before the start of the string
buffer.

Instead check if leading zeroes have been consumed.

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
2024-12-16 18:34:43 +00:00
Christopher Zurcher 7936ffa1e6 MdePkg/Ufs.h: Update to UFS 4.0
Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
2024-12-16 15:39:35 +08:00
Christopher Zurcher 59cfc13139 MdeModulePkg/Bus/Ufs: Use IndustryStandard headers
Remove duplicate private header files and reference UFS spec definitions
from the IndustryStandard folder.

Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
2024-12-16 15:39:35 +08:00
Christopher Zurcher 29ebe5ee5a MdePkg/IndustryStandard: Add UFS definitions
These files are direct ports from the (identical) files:
MdeModulePkg\Bus\Ufs\UfsBlockIoPei\UfsHci.h
MdeModulePkg\Bus\Ufs\UfsPassThruDxe\UfsPassThruHci.h

Signed-off-by: Christopher Zurcher <christopher.zurcher@microsoft.com>
2024-12-16 15:39:35 +08:00
Laszlo Ersek 89b527df17 CryptoPkg: revert BUFSIZ macro definition from commit 456dd8b99f
OpenSSL ticket <https://github.com/openssl/openssl/issues/8904> has been
fixed in OpenSSL commit 2e9d61ecd81a ("crypto/evp/evp_key.c: #define
BUFSIZ if <stdio.h> doesn't #define it", 2019-05-27).

We should simplify "CryptoPkg/Library/Include/CrtLibSupport.h" and back
out the change made to that file by edk2 commit 456dd8b99f ("CryptoPkg:
Upgrade OpenSSL to 1.1.1b", 2019-06-03).

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1897
Signed-off-by: Laszlo Ersek <laszlo.ersek@posteo.net>
2024-12-16 02:22:36 +00:00
Oleg Ilyasov 1a440d9638 Retrieve the USB class specific data from the configuration descriptor
If USB device reports class specific descriptors, it is currently the job of
device driver to parse the configuration to find the class specific data.
The new library functions parse the configuration descriptor and return class
specific interface and class specific endpoint descriptors.
Also, these new functions allow to retrieve the data from non-default alternate
settings without performing a switch to this setting. Switching to the
alternate setting currently implies the execution of UsbSetInterface function
that performs USB control trnasfer.
In some cases this switch is not desirable so the new functions
UsbGetInterfaceDescriptorSetting and UsbGetEndpointDescriptorSetting come
in handy.

Signed-off-by: Oleg Ilyasov <olegi@ami.com>
2024-12-13 23:56:10 +00:00
Michael Kubacki c7354e9c84 OvmfPkg: Add minimum Python version for CI badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Michael Kubacki 4274bcf146 EmulatorPkg: Add minimum Python version for CI badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Michael Kubacki ff003faabe ReadMe.rst: Add minimum Python version badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Ceping Sun c1eb477e06 OvmfPkg/TdxDxe: Clear GPR Mask for RBX
Refer to intel-tdx-module-api spec section 5.5.21, GPR mask
(TDVMCALL_EXPOSE_REGS_MASK) is a bitmap that controls which
part of the guest TD GPR and XMM state is passed as-is to
the VMM and back.
- A bit value of 0 indicates that the corresponding register
   is saved by the Intel TDX module and not passed as-is to
   Host VMM.
- A bit value of 1 indicates that the corresponding register
   is passed as-is to the host VMM.

Currently, RBX is used as the mailbox address in ApRunLoop.nasm,
the corresponding bit value of RBX in MASK(Bit 3) is set as 1 which
means the value is passed to Host VMM as-is and it can be changed by
Host VMM.

So the bitmask shall be set as 0 to avoid this situation.

Reference:
[TDX-API]: intel-tdx-module-abi-spec
https://cdrdv2.intel.com/v1/dl/getContent/733579

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>
2024-12-13 13:29:27 +00:00
Chao Li 3022bab164 OvmfPkg: Remove macro MAX_LOONGARCH_EXCEPTION
Since the UEFI 2.11 has been released, the macro
MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in
LoongArchVirt/Sec/LoongArch64/Start.S

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 9537f8ce67 UefiCpuPkg: Remove macro MAX_LOONGARCH_EXCEPTION
Since the UEFI 2.11 has been released, the macro
MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in
LoongArch folder header file.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Dun Tan <dun.tan@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 3c8e10c8b3 MdePkg: Synchronize UEFI2.11 LoongArch64 DebugSupportLib definition
Synchronize the changes about LoongArch64 in section 18.2.5 of UEFI2.11.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 03783393e1 MdePkg: Allows loading X64 and ARM64 OPROM images on LoongArch64
Enable foreign images loading on LoongArch64 if the
EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is present.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-Authored-by: Dongyan Qian <qiandongyan@loongson.cn>
2024-12-12 04:57:03 +00:00
Kun Qin 25ce25ecce ArmPkg: DefaultExceptionHandlerLib: Update function input bitwidth
The current DescribeExceptionSyndrome is taking ESR as 32bit value.
However, ESR should be a 64 bit value. This change updates the function
to intake a 64bit value.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin e8b7d7a238 ArmPkg: ArmExceptionLib: Fixing exception vector and type casting
The current VectorBase is taking value from a 64bit PCD into a UINTN
value, which could have truncated value for 32bit system.

In addition, the comparison between UINTN and INTN could lead to
undesired comparison outcome or compiler complaints.

This change updates all of them to be UINT64 based operation.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin b689c387e2 ArmPkg: ArmLib: Update function to match header file
Update function implementation to match interface definition. The return
should be bound to 0xffff0000, which is guaranteed to be a UINT32.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 6539b693d1 MdePkg: ArmLib: Return UINT32 for ArmCacheWritebackGranule
ArmCacheWritebackGranule should not return value higher than MAX_UINT32.

This change will allow the usage without architecture depenedent return
size.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 9d0f3dd35d ArmPkg: ArmArchTimerLib: Update operations to be 64 bit wide
The existing operation in ArmArchTimerLib is operating on UINT32 or
UINT64 based on the target system. This casting game originates from the
fact that timer frequency is UINTN type.

This change will simply promote all operations to UINT64 based, which
will remove the casting and conditional #if in the code for better
portability and readability.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 77d32b1796 ArmPkg: TimerDxe: Use 64bit operation for timer ticks
The current implementation operates on 64bit value with implicit value
truncation.

This change updates the involved frequencies to use 64 bit based
operations.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 957fcbe7a3 ArmPkg: ArmGic: Cast CpuTarget to UINT32 for legacy GIC
The current code path supporting `PcdArmGicV3WithV2Legacy` will read 32
bit CPU target and try to program ARM_GIC_ICDIPTR. However, all these
operations are 32bit wide.

This change casts the CpuTarget variable to be UINT32 before calling
MMIO read.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Abdul Lateef Attar 95972f966e DynamicTablesPkg: Correct parser for X64 architecture objects
- Add array size to CmArchCommonSpmiInterfaceInfoParser
   to correctly parse the SPMI interface object.
- Use the size of enum values instead of fixed sizes.
- Apply #pragma pack to the X64 object structure
   to ensure the total size of the structure matches
   the parser's combined individual field sizes without padding.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2024-12-11 13:17:04 +00:00
TsunFeng cf8241facc MdePkg: Add Google Mock Library for SafeIntLib
Signed-off-by: TsunFeng <v-tshuang@microsoft.com>
2024-12-11 07:30:17 +00:00
Raymond Yang 232003ce5a MdePkg: Update StatusCodeDataTypeId.h
Refine comments for EFI_STATUS_CODE_SPECIFIC_DATA_GUID .
Add the structs defined in this file for EFI_STATUS_CODE_SPECIFIC_DATA_GUID to comment.

Signed-off-by: Raymond Yang <yangrongwei@hotmail.com>
2024-12-11 09:54:54 +08:00
Yang Gang e02c7848af MdeModulePkg SmbiosMeasurementDxe: Release TableAddress after use
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:51:45 +08:00
Yang Gang 58c7517228 MdeModulePkg DriverHealthManagerDxe: Display HealthStatus as TextTwo
When PcdBrowserGrayOutTextStatement is TRUE, TextOpCode will be GrayOut.
HealthStatus cannot be displayed in help area, use TextTwo to display it.

Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:02:08 +08:00
William Leara f8f29a4a6a BaseTools: fix spelling error
No functional change.

Signed-off-by: William Leara <william.leara@dell.com>
2024-12-11 09:01:03 +08:00
Dionna Glaze 74ac8cc0e8 BaseTools: Typo fixes
Some in error messages, some in local variable names.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2024-12-11 09:00:21 +08:00
Dhaval aca75d3c08 BaseTools: Update alignment for entry seg for Clang
It does 3 things:
1. Use separate linker file for clang vs GCC for RISCV64.
2. Use common page size instead of max page to ensure -z option align values are properly applied.
3. Enforce alignment for .entry segment as per -z option.

When we want to have -z option aligned images, clang while
alignes .text and .data segments correctly, .entry segment
is by default not aligned unless explicitly specified.
This patch makes it explicit to clang that entry seg
should also be aligned to requirements. Somehow GCC does not require such explicit
entry. Hence detachiong both ld files.

Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
2024-12-11 08:43:53 +08:00
Phil Noh 1bb10a479f MdeModulePkg/BrotliCustomDecompressLib: Make the library buildable
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4877

Brotli decompression library is supported in EDK2 core. Currently it is
not buildable when linking it to DxeIpl driver. The result is also checked
on edk2 master branch. It could be related to updating Brotli submodule
(v1.0.9) on the previous commit (1193aa2). The update makes the library
buildable. It was verified for the functional status.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2024-12-11 08:38:27 +08:00
Oliver Smith-Denny 1c5c951ec3 Update CI to VS2022
This PR updates the CI pipelines to use VS2022 instead of VS2019
as that is the latest supported VS toolchain on edk2.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-10 23:42:09 +00:00
Oliver Smith-Denny bcbb709959 BaseTools: Add VS2022 XIPFLAGS
BaseTools has a limitation that modules in FVs that are force rebased
must have the same file and section alignment. This is intended for
XIP modules.

VS2019 and previous VS toolchains did not set 4k section alignment,
but VS2022 does, in order for memory protections to be applied to
images. This causes issues when building SEC and PEI modules on
VS2022 as the file alignment is 0x20 but the section alignment
is 0x1000, so BaseTools will fail to generate the FV. One option
is to set the file alignment to 0x1000 for all of these files, but
that is a large waste of space and is not feasible on some platforms
that have limited flash space. The other option is to selectively
set 0x20 as the section alignment for SEC and PEI modules, which is
the approach GCC ARM/AARCH64 took.

This is only an issue for building 64-bit PEI on x86 currently, as
other architectures are not supported by VS2022 in edk2 yet. For IA32,
the section alignment is set to 0x20 and so it matches the file
alignment, however x64 PEI uses the X64 DLINK flags which have 0x1000
set. For other architectures that don't have the PEI/DXE architecture
split, this is also an issue.

This commit is required to use VS2022 as the default CI in edk2, as
OvmfPkgX64.dsc will fail to build. Any platform with 64-bit PEI also
requires this.

This commit also updates CryptoPkg.dsc and SecurityPkg.dsc as they
are setting custom section alignments.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-10 23:42:09 +00:00
Oliver Smith-Denny f1e014a5ca BaseTools: Add /WHOLEARCHIVE for VS2022 Builds
VS2022's DLINK2_FLAGS (containing only /WHOLEARCHIVE) was commented
out during upstreaming, due to some downstream platform issues
when /WHOLEARCHIVE was set. This does not prove an issue for edk2
and is what is used for earlier versions of VS, so is added here
for VS2022.

If platforms see issues, bugs should be filed on edk2 (or fixed in
the platform if applicable).

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-10 23:42:09 +00:00
Michael Kubacki 4c7c90254f Maintainers.txt: Add VS Code PR Dashboard maintainer
Adds Michael Kubacki as a maintainer of this newly added file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-10 16:01:51 +00:00
Michael Kubacki 2941f4b57f PullRequests.github-issues: Add PR notebook
Adds a VS Code GitHub issue notebook that can be used with the VS
Code GitHub Issue Notebook Extension to view PR queries on
Tianocore repositories.

VS Code extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-github-issue-notebooks

This is intended to provide a single real-time dashboard that
reflects PR status from all Tianocore repositories so users can
track their PRs and quickly find PRs that need their attention.

To use this, install the VS Code extension and open the file.
This can be done in a Web browser at vscode.dev or locally in
VS Code.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-10 16:01:51 +00:00
Ceping Sun d55d4e22f4 OvmfPkg: Update PlatformPei.inf with TdxHelperLib
Since TdxHelperLib was defined in LibraryClasses for OvmfPkgX64.dsc,
the extra definitions is removed.

And for other dsc, add the Null-TdxHelperLib to remove the extra
definitions.

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 1f55e175f4 OvmfPkg: Update OvmfPkgX64.dsc to support TdTcg2Pei
Add TdTcg2Pei in OvmfPkgX64.dsc in early PEI phase to
support CC measurement.

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 9f9657e7da OvmfPkg: Update OvmfTpmLibs.dsc.inc to add PeiTpmMeasurementLib.inf
Because PeiTpmMeasurementLib supports both TCG measurement and CC
measurement, it shall be controled by TPM2_ENABLE and
CC_MEASUREMENT_EANBLE.

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 7689c0d9fa OvmfPkg/TdTcg2Pei: Add TdTcg2Pei to install gEdkiiCcPpi
TdTcg2Pei is added to install the gEdkiiCcPpi for a TD-Guest.

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun bdf3c917e3 OvmfPkg/TdTcg2Dxe: Update with TdxHelperLib
Since TdxHelperLib has the API(TdxHelperMapPcrToMrIndex)
to map PCR to MR index, the duplicate codes are removed.

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun b6b1fdb073 OvmfPkg/TdxHelperLib: Refactor for new APIs
Add below APIs to support the implementation for CC measurement.
- TdxHelperMapPcrToMrIndex
- TdxHelperHashAndExtendToRtmr
- TdxHelperBuildTdxMeasurementGuidHob

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun cc0ec8ebae OvmfPkgX64: Add BaseCryptLib definition in PEIM
Since the TdxHelperLib is used for measurement
in PEI phase, it required TDVF to add the library.

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: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun b2df9a89ba SecurityPkg/PeiTpmMeasurementLib: Support CC Measurement
PeiTpmMeasurementLib is updated to support both TCG measurement and
CC Measurement. gEfiPeiMasterBootModePpiGuid is removed from [Depex]
because it is not needed for the library.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 3b07a2fb52 SecurityPkg/Ppi: Add gEdkiiCcPpi for CC Measurement in PEI phase
gEdkiiCcPpi is designed to support CC measurement in PEI phase.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
John Chung 481c43308b MdePkg: Add new PCDs for IPMI Serial
This change adds new PCDs for IPMI Serial.

Specification reference:
https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html

Signed-off-by: John Chung <john.chung@arm.com>
2024-12-09 19:57:53 +00:00