public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Boeuf, Sebastien" <sebastien.boeuf@intel.com>
To: devel@edk2.groups.io
Cc: jiewen.yao@intel.com, jordan.l.justen@intel.com,
	kraxel@redhat.com, sebastien.boeuf@intel.com
Subject: [PATCH 4/4] OvmfPkg: Don't access A20 gate register on Cloud Hypervisor
Date: Tue, 10 May 2022 14:50:46 +0200	[thread overview]
Message-ID: <4e4441639e49bfbca5bf9f36cf26f3933eadf8f0.1652186234.git.sebastien.boeuf@intel.com> (raw)
In-Reply-To: <cover.1652186234.git.sebastien.boeuf@intel.com>

From: Sebastien Boeuf <sebastien.boeuf@intel.com>

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>
---
 OvmfPkg/Library/PlatformInitLib/Platform.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c b/OvmfPkg/Library/PlatformInitLib/Platform.c
index cb1a893aef..f2b07dc937 100644
--- a/OvmfPkg/Library/PlatformInitLib/Platform.c
+++ b/OvmfPkg/Library/PlatformInitLib/Platform.c
@@ -314,7 +314,9 @@ PlatformMiscInitialization (
   //
   // Disable A20 Mask
   //
-  IoOr8 (0x92, BIT1);
+  if (PlatformInfoHob->HostBridgeDevId != CLOUDHV_DEVICE_ID) {
+    IoOr8 (0x92, BIT1);
+  }
 
   //
   // Build the CPU HOB with guest RAM size dependent address width and 16-bits
-- 
2.32.0

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 5 208 026.16 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


  parent reply	other threads:[~2022-05-10 12:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 12:50 [PATCH 0/4] OvmfPkg: CloudHv: Reduce PIO and MMIO accesses Boeuf, Sebastien
2022-05-10 12:50 ` [PATCH 1/4] OvmfPkg: CloudHv: Fix FW_BASE_ADDRESS Boeuf, Sebastien
2022-05-10 12:50 ` [PATCH 2/4] OvmfPkg: Check for QemuFwCfg availability before accessing it Boeuf, Sebastien
2022-05-10 12:50 ` [PATCH 3/4] OvmfPkg: CloudHv: Rely on QemuFwCfgLibNull implementation Boeuf, Sebastien
2022-05-10 12:50 ` Boeuf, Sebastien [this message]
2022-05-23 13:25 ` [PATCH 0/4] OvmfPkg: CloudHv: Reduce PIO and MMIO accesses Boeuf, Sebastien
2022-06-02  8:57 ` Yao, Jiewen
2022-06-02  9:04   ` Boeuf, Sebastien
2022-06-02  9:29     ` Boeuf, Sebastien
2022-06-02  9:52       ` Yao, Jiewen
2022-06-03 10:52       ` Yao, Jiewen
2022-06-03 11:04         ` Boeuf, Sebastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e4441639e49bfbca5bf9f36cf26f3933eadf8f0.1652186234.git.sebastien.boeuf@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox