OvmfPkg/QemuFwCfgLib: rewrite fw_cfg probe

Move the code to a new QemuFwCfgProbe() function.  Use direct Io*() calls
instead of indirect QemuFwCfg*() calls to make sure we don't get
recursive calls.  Also simplify CC guest detection.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Gerd Hoffmann
2022-12-02 14:10:08 +01:00
committed by mergify[bot]
parent e59747bd82
commit 81bbc1452c
2 changed files with 41 additions and 61 deletions

View File

@@ -41,7 +41,6 @@
DebugLib
IoLib
MemoryAllocationLib
MemEncryptSevLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase