]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/BaseLib: Add support for the XGETBV instruction
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 12 Aug 2020 20:21:35 +0000 (15:21 -0500)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 16 Aug 2020 16:45:42 +0000 (16:45 +0000)
commit9b3ca509abd4e45439bbdfe2c2fa8780c950320a
tree87c6b6e7e4f3b47624a2ff87a5e3990e6de5a46e
parentb098f5e9e90537524929f7917f28bb9472b5eb59
MdePkg/BaseLib: Add support for the XGETBV instruction

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198

Under SEV-ES, a CPUID instruction requires the current value of the XCR0
register. In order to retrieve that value, the XGETBV instruction needs
to be executed.

Provide the necessary support to execute the XGETBV instruction.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
MdePkg/Include/Library/BaseLib.h
MdePkg/Library/BaseLib/BaseLib.inf
MdePkg/Library/BaseLib/Ia32/XGetBv.nasm [new file with mode: 0644]
MdePkg/Library/BaseLib/X64/XGetBv.nasm [new file with mode: 0644]