]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Don't access A20 gate register on Cloud Hypervisor
authorSebastien Boeuf <sebastien.boeuf@intel.com>
Tue, 10 May 2022 12:50:46 +0000 (20:50 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 3 Jun 2022 10:51:26 +0000 (10:51 +0000)
Since Cloud Hypervisor doesn't emulate an A20 gate register on I/O port
0x92, it's better to avoid accessing it when the platform is identified
as Cloud Hypervisor.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
OvmfPkg/Library/PlatformInitLib/Platform.c

index ee802fd684e150c504de01bbcfe10baab2787d97..c3d34e43af5ab66121190ec6387b7b0470d4800d 100644 (file)
@@ -314,7 +314,9 @@ PlatformMiscInitialization (
   //\r
   // Disable A20 Mask\r
   //\r
-  IoOr8 (0x92, BIT1);\r
+  if (PlatformInfoHob->HostBridgeDevId != CLOUDHV_DEVICE_ID) {\r
+    IoOr8 (0x92, BIT1);\r
+  }\r
 \r
   //\r
   // Build the CPU HOB with guest RAM size dependent address width and 16-bits\r