From nobody Sat Apr 27 01:24:09 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1592361112; cv=none; d=zohomail.com; s=zohoarc; b=aMadTn3uz0ebKBX2N7Gffbd8okAJ0c9WU/97u61bp5vqJP5QbmqLVA/AifGkahApWHN6/ki67HFyaJHKrtrscatIn/LSFC0hKSP9ry62Ee+9G2WaHA4MatRNgFn0fi+Aj/XhIJhah4EgO6AwzZ/dVmKmjrqWZ/DYKqwyCvFn4t4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592361112; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Subject:To; bh=j3jeYVr/Flbyn48z1nkhQgfbPA1+x72Ym6vSh3cHdLE=; b=iHMCkoU5g0wXl3SjbttnCZtK7LC6cDhm49ePkT/n6QlaWsGyx27DIyhcwxRX7ofrYJDL4se/KasUb+1F/ZmKfp4J3A+dhHGZ2XmRpYgR/7qrEnNGDrS9HGIX+D9pU5rW2Ny8JPwpSXs8ShgMIyqZWb7ccsS6+g1MIk0JWTQCdEg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1592361112732880.6388013151197; Tue, 16 Jun 2020 19:31:52 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id E2F4310C1B76; Wed, 17 Jun 2020 02:31:48 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id D44B510C1B73 for ; Wed, 17 Jun 2020 02:31:29 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Tue, 16 Jun 2020 19:31:29 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.gmail.com with ESMTPSA id c191sm15761245qke.114.2020.06.16.19.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 19:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RKpGWMkDARJ0mIakHXs6Dx5dsGsZbTJ0YF+Addqqg8w=; b=sn46yLnPDlzD5O6CuyttCjr6K9jE/NTLlp2Q8ZFeCN2sWkDOzMQMJ4qc8mS9rTF83t ahpP23kYQNDFIiefI1doP/2Sb6asa0a0yjcCnkioBAdw1d6dfHn460h/sYxVeNN3aVjO BtKs5WS3ns+F6wPWGGu65830IJP5hNAgz959xNy737xOYxmjTJZLMY0WBK3RgaidaD+F yWEc1SmajHURn8D/kCcM/SQTU+RZfbGe70OVr25x5sm/cR7TcRwgY+rXbMincgJLtQOT PSpGhlOpm2rQeaOqVf+8kL2xbAjb4M4LTVchfnhBl11RnXAHW+f5tjU5o5rMpLRcgil0 eoNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RKpGWMkDARJ0mIakHXs6Dx5dsGsZbTJ0YF+Addqqg8w=; b=sC9/WVa6L6dOcKYMx2S+zFl1JHW6JzIVRdKdbicfLKejlEQWT6xXwvVMNKN5O+6yDR sluOYqE2liC/4WiEen/t5nBBFXW9/H7MFKu4FATHjQxh/Ghq2OeJIe0zkSFSj9+zEkrx k7vZy5xGP5CBJE0F518bqZtNjBggVAmbO1Q0Ejimf8I7BDmc2WO+zPwO+vqThTnIFdou LjysK1A6SXXjC+n5yup6+vf4BD13moUdpP9vYjUZlnmr/KJZfmBQfeL3mEs4rCFkk6CP yQrEUefMIY5OaonUSx0pZe9Kv4YA+gkdi715gPsTpwDYlwq0QW7YZsoOoenGtr+9z+kx r/7A== X-Gm-Message-State: AOAM533yTkTZjHrJnjzj5ruwI3/TqCd/1Iw1W2u2g1XCiN2HEF9JmBUS qKaNHclxAijfnJpHJuAikpa+X2Tj X-Google-Smtp-Source: ABdhPJzEGqlh8k3t3lzJZvNijN+NZ3WClowzSTgWczpY5z9fhJAsjfP3ID7nNJ40TDXHGL3gL9orsw== X-Received: by 2002:a37:9f09:: with SMTP id i9mr23945097qke.60.1592361088232; Tue, 16 Jun 2020 19:31:28 -0700 (PDT) From: Jason Andryuk To: seabios@seabios.org Date: Tue, 16 Jun 2020 22:31:17 -0400 Message-Id: <20200617023117.80210-1-jandryuk@gmail.com> MIME-Version: 1.0 Message-ID-Hash: YL42DETYKEGRAKAHGCE2MLB4RD4G3F5R X-Message-ID-Hash: YL42DETYKEGRAKAHGCE2MLB4RD4G3F5R X-MailFrom: jandryuk@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Jason Andryuk X-Mailman-Version: 3.3.1 Precedence: list Subject: [SeaBIOS] [PATCH] Preserve Xen DebugOutputPort List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ++++ X-Spam-Level: **** Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" xen_preinit() runs early and changes DebugOutputPort. qemu_preinit() runs soon after. inb on DebugOutputPort doesn't work on Xen, so the check will always fail and DebugOutputPort will be cleared to 0 disabling output. Quick exit the function when running on Xen to preserve the modified DebugOutputPort. Signed-off-by: Jason Andryuk --- src/hw/serialio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hw/serialio.c b/src/hw/serialio.c index 3163344..c6297bc 100644 --- a/src/hw/serialio.c +++ b/src/hw/serialio.c @@ -106,6 +106,10 @@ u16 DebugOutputPort VARFSEG =3D 0x402; void qemu_debug_preinit(void) { + /* Xen already overrode DebugOutputPort in xen_preinit(). */ + if (runningOnXen()) + return; + /* Check if the QEMU debug output port is active */ if (CONFIG_DEBUG_IO && inb(GET_GLOBAL(DebugOutputPort)) !=3D QEMU_DEBUGCON_READBACK) --=20 2.25.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org