]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg: Clean up GHCB field offsets and save area
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 6 Nov 2020 17:53:03 +0000 (11:53 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 10 Nov 2020 19:07:55 +0000 (19:07 +0000)
commit990ab937c20cd2674e3e2697729f4530dfbabb92
tree2bfc5a0cb7bf28ca9e5fb5c65cc43f1e646d2507
parent8c610e6075f2a200400970698a810a57ad49220e
MdePkg: Clean up GHCB field offsets and save area

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

Use OFFSET_OF () and sizeof () to calculate the GHCB register field
offsets instead of hardcoding the values in the GHCB_REGISTER enum.
Define only fields that are used per the GHCB specification, which will
result in removing some fields and adding others.

Also, remove the DR7 field from the GHCB_SAVE_AREA structure since it is
not used/defined in the GHCB specification and then rename the reserved
fields as appropriate.

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: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <5e9245c7600b9b2d55dd7586b8df28b91b75b72b.1604685192.git.thomas.lendacky@amd.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdePkg/Include/Register/Amd/Ghcb.h