LoongArchVirt: enable TPM2 support#4
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| !if $(TPM2_ENABLE) == TRUE | ||
| gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress | 0x0 | ||
| gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} | ||
| gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask | 0 |
There was a problem hiding this comment.
Select a real TPM instance instead of gEfiTpmDeviceInstanceNoneGuid
When TPM2_ENABLE is set the DSC still programs PcdTpmInstanceGuid to an all‑zero GUID, which corresponds to gEfiTpmDeviceInstanceNoneGuid. The TPM2 device router rejects any Tpm2DeviceLib whose provider GUID does not match this PCD, so the newly added Tpm2DeviceLibDTpm instance cannot register and every TPM call from Tcg2Pei/Tcg2Dxe will return EFI_UNSUPPORTED. The image therefore advertises TPM2 support but will never bind to an actual TPM device. PcdTpmInstanceGuid should be set to the GUID of the intended device (for QEMU this is typically gEfiTpmDeviceInstanceTpm20DtpmGuid) whenever TPM support is enabled.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task