8ba392687b
OvmfPkg: Update code to be more C11 compliant by using __func__
...
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.
Since it's more standard, replace __FUNCTION__ with __func__ throughout
OvmfPkg.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Ard Biesheuvel <ardb@kernel.org >
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com >
2023-04-10 14:19:57 +00:00
5c7a611353
OvmfPkg/BaseMemEncryptTdxLib: Refactor error handle of SetOrClearSharedBit
...
The previous implementation of SetOrClearSharedBit doesn't handle the
error correctly. In this patch SetOrClearSharedBit is changed to return
error code so that the caller can handle it.
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Michael Roth <michael.roth@amd.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
Signed-off-by: Min Xu <min.m.xu@intel.com >
2023-01-18 05:11:07 +00:00
720c25ab41
OvmfPkg: Call gEdkiiMemoryAcceptProtocolGuid to accept pages
...
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3937
After EdkiiMemoryAcceptProtocol is implemented in TdxDxe driver, we can
call it to accept pages in DXE phase.
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Signed-off-by: Min Xu <min.m.xu@intel.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2022-11-01 10:08:10 +00:00
5aa8018639
OvmfPkg/BaseMemEncryptTdxLib: Add TDX helper library
...
RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429
Add Intel Tdx helper library. The library provides the routines to:
- set or clear Shared bit for a given memory region.
- query whether TDX is enabled.
Please be noted, there a lot of duplicated codes for Page Table
operations. These codes should be moved to a common library
(PageTablesLib) so that it is more friendly for review and maintain.
There is a new feature requirement
https://bugzilla.tianocore.org/show_bug.cgi?id=847 which is to
implement the library. After the lib is introduced, BaseMemEncryptTdxLib
will be refactored.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Brijesh Singh <brijesh.singh@amd.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Gerd Hoffmann <kraxel@redhat.com >
Acked-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
Signed-off-by: Min Xu <min.m.xu@intel.com >
2022-04-02 08:15:12 +00:00