Blob Blame History Raw
From cf399db8cc44c54c620852f5a4f81357614f0cb2 Mon Sep 17 00:00:00 2001
From: Jeremy Linton <jeremy.linton@arm.com>
Date: Fri, 11 Sep 2020 11:30:41 -0500
Subject: [PATCH 1/2] aarch64: for linux tty if acpi

If we are going to use ACPI with linux+edk2 we
need to force the console because aarch64 defaults
to serial (ttyAMA0) if a spcr is present.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 oz/Guest.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/oz/Guest.py b/oz/Guest.py
index 92bdc71..a648e9a 100644
--- a/oz/Guest.py
+++ b/oz/Guest.py
@@ -467,8 +467,14 @@ class Guest(object):
         oz.ozutil.lxml_subelement(domain, "vcpu", str(self.install_cpus))
         # features
         features = oz.ozutil.lxml_subelement(domain, "features")
-        if self.tdl.arch in ["aarch64", "x86_64"]:
+        if self.tdl.arch in ["x86_64"]:
+            oz.ozutil.lxml_subelement(features, "acpi")
+        if self.tdl.arch in ["aarch64"]:
             oz.ozutil.lxml_subelement(features, "acpi")
+            # current edk2+linux on aarch64 puts a SPCR in place when serial is active
+            # this then becomes the default tty unlike on x86 where it will continue to
+            # use the uefi framebuffer/graphics console. Force linux to use both.
+            cmdline = str(cmdline) + " console=ttyAMA0 console=tty0"
         if self.tdl.arch in ["x86_64"]:
             oz.ozutil.lxml_subelement(features, "apic")
             oz.ozutil.lxml_subelement(features, "pae")
-- 
2.26.2