From nobody Sat May 10 10:16:58 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1505724475126272.2637192100552; Mon, 18 Sep 2017 01:47:55 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coreboot.org) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1dtriM-0000Rz-9Y; Mon, 18 Sep 2017 10:47:38 +0200 Received: from mx1.redhat.com ([209.132.183.28]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1dtriD-0000QV-PA for seabios@seabios.org; Mon, 18 Sep 2017 10:47:36 +0200 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CACC356F8 for ; Mon, 18 Sep 2017 08:47:27 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC4DE5D6A9; Mon, 18 Sep 2017 08:47:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2BCD03F113; Mon, 18 Sep 2017 10:47:24 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1CACC356F8 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: seabios@seabios.org Date: Mon, 18 Sep 2017 10:47:22 +0200 Message-Id: <20170918084724.1133-5-kraxel@redhat.com> In-Reply-To: <20170918084724.1133-1-kraxel@redhat.com> References: <20170918084724.1133-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 18 Sep 2017 08:47:27 +0000 (UTC) X-Spam-Score: -6.5 (------) Subject: [SeaBIOS] [PATCH v3 4/6] paravirt: serial console configuration. X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Read QEMU_CFG_NOGRAPHIC, if set add etc/sercon-port file to enable the serial console. Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index 5b23d786be..9674ab8ba8 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -14,6 +14,7 @@ #include "hw/pci.h" // pci_config_readw #include "hw/pcidevice.h" // pci_probe_devices #include "hw/pci_regs.h" // PCI_DEVICE_ID +#include "hw/serialio.h" // PORT_SERIAL1 #include "hw/rtc.h" // CMOS_* #include "malloc.h" // malloc_tmp #include "output.h" // dprintf @@ -210,6 +211,7 @@ qemu_platform_setup(void) #define QEMU_CFG_SIGNATURE 0x00 #define QEMU_CFG_ID 0x01 #define QEMU_CFG_UUID 0x02 +#define QEMU_CFG_NOGRAPHIC 0x04 #define QEMU_CFG_NUMA 0x0d #define QEMU_CFG_BOOT_MENU 0x0e #define QEMU_CFG_NB_CPUS 0x05 @@ -511,6 +513,12 @@ qemu_cfg_legacy(void) qemu_romfile_add("etc/irq0-override", QEMU_CFG_IRQ0_OVERRIDE, 0, 1); qemu_romfile_add("etc/max-cpus", QEMU_CFG_MAX_CPUS, 0, 2); =20 + // serial console + u16 nogfx =3D 0; + qemu_cfg_read_entry(&nogfx, QEMU_CFG_NOGRAPHIC, sizeof(nogfx)); + if (nogfx) + const_romfile_add_int("etc/sercon-port", PORT_SERIAL1); + // NUMA data u64 numacount; qemu_cfg_read_entry(&numacount, QEMU_CFG_NUMA, sizeof(numacount)); --=20 2.9.3 _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios