From patchwork Tue Nov 12 13:58:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13872287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31F4FD42B84 for ; Tue, 12 Nov 2024 14:00:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tArQo-0006Ux-BN; Tue, 12 Nov 2024 08:59:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tArQm-0006SK-TG for qemu-devel@nongnu.org; Tue, 12 Nov 2024 08:59:44 -0500 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tArQl-00042K-8x for qemu-devel@nongnu.org; Tue, 12 Nov 2024 08:59:44 -0500 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-83ab21c26f1so219907939f.2 for ; Tue, 12 Nov 2024 05:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1731419975; x=1732024775; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wQ0or+92eQIwyIqeAnu22dTpZHJuaX9S3qy+ardMUUs=; b=ey2yb/y+GRnp6ZtgU9cPNe1H/xQESU6jXqUc4spVvCpttY5+ums82TXJiZhqip3Ffu xiOsTjXV71wTsTh0Nt1eqYa/F/IZuoRskkRCl5m8mkvue88XAcjNmEb8s4hh+oVbddZe KwGKGkqja/l++V8y9KNgfE0Zz508tBBywJTg0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731419975; x=1732024775; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wQ0or+92eQIwyIqeAnu22dTpZHJuaX9S3qy+ardMUUs=; b=wAx3sFDvVbyZdn2MLd1RqplufaByh+luJbYTG9Tz4A13a/x2SlViDziraCkxSggTYC OjCNTvW9MXyWig/i60pOx6/RwfqDoQtuGv/pgLiqgN7sCMQr3nlFgfiORubylsgyAqUs nEM8jGrgYVNSIHfzO/bSnpCxSHNhJRC+pkuqFmbujnNxd0DsC+S1ONrbJbAKr0wDIULS iXGKxjweSP/gKEJcIzHDpxEUA+72R6tFWrgkOl0o8JvpVAh6SvFIq/UJYu9ysz8NI5ma 5U4aP+4UKh0ehKUhQzulAMFxtq5+sAC8UDp4yX4WT2qagHpqSTARqc0nEXsnt6aSVUFz Vuhw== X-Forwarded-Encrypted: i=1; AJvYcCVMlICEcoLVg0leBw1bRHo3ojyCVIsEZE2Ak2LGOrmsrX1r8TzbvQ60IkJztXKqk5Wio9Wfs5Cq9QV0@nongnu.org X-Gm-Message-State: AOJu0YysNT/8EZ+qlZLqZAfv2B8/6+XALdJI5zM2pWpIoNbwbiMWUHC+ ioEigUQp1NrCDeY2Euj82zo81Z3J8tcQZDHDjqAKLQh1fQ9jyEmfPdQ95JARoQ== X-Google-Smtp-Source: AGHT+IFRbhsH3AjC0WgNlkAxNkftaUSmp70QM44N6E+zcwo2sbWOYoqBNr0YBpkJee5o8ETWAtybWQ== X-Received: by 2002:a05:6602:3c5:b0:83b:2da6:239a with SMTP id ca18e2360f4ac-83e432ae355mr281331239f.15.1731419974877; Tue, 12 Nov 2024 05:59:34 -0800 (PST) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-83e132c01besm189203039f.30.2024.11.12.05.59.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 05:59:33 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Tom Rini , qemu-devel@nongnu.org Subject: [PATCH 03/18] RFC: x86: qemu: Switch to bochs display Date: Tue, 12 Nov 2024 06:58:56 -0700 Message-Id: <20241112135911.630586-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241112135911.630586-1-sjg@chromium.org> References: <20241112135911.630586-1-sjg@chromium.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=sjg@chromium.org; helo=mail-io1-xd2b.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.122, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The vesa display is widely used on hardware, but it is a bit of a pain with QEMU. It requires executing option ROMs, which either doesn't work with kvm, or is difficult to do in a kvm/QEMU-friendly way. THe bochs display is probably better anyway, so switch to that. It works fine with kvm as it doesn't need an option ROM. Unfortunately this causes the Ubuntu 22.04 installer to stop booting, which needs further investigation Signed-off-by: Simon Glass Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/31 --- configs/qemu-x86_64_defconfig | 5 ++--- configs/qemu-x86_defconfig | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index 218c3535d15..1670c122002 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -81,9 +81,8 @@ CONFIG_SYS_NS16550_PORT_MAPPED=y CONFIG_SPI=y CONFIG_USB_KEYBOARD=y CONFIG_CONSOLE_TRUETYPE=y -CONFIG_FRAMEBUFFER_SET_VESA_MODE=y -CONFIG_FRAMEBUFFER_VESA_MODE_USER=y -CONFIG_FRAMEBUFFER_VESA_MODE=0x144 +CONFIG_VIDEO_BOCHS=y +# CONFIG_VIDEO_VESA is not set CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_SPL_VIDEO=y # CONFIG_SPL_USE_TINY_PRINTF is not set diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 947d15cd727..40c2f1cd362 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -58,9 +58,8 @@ CONFIG_SYS_NS16550_PORT_MAPPED=y CONFIG_SPI=y CONFIG_USB_KEYBOARD=y CONFIG_CONSOLE_TRUETYPE=y -CONFIG_FRAMEBUFFER_SET_VESA_MODE=y -CONFIG_FRAMEBUFFER_VESA_MODE_USER=y -CONFIG_FRAMEBUFFER_VESA_MODE=0x144 +CONFIG_VIDEO_BOCHS=y +# CONFIG_VIDEO_VESA is not set CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_GENERATE_ACPI_TABLE=y # CONFIG_GZIP is not set From patchwork Tue Nov 12 13:58:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13872288 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20733D42B84 for ; Tue, 12 Nov 2024 14:00:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tArQn-0006SM-1U; Tue, 12 Nov 2024 08:59:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tArQl-0006NF-89 for qemu-devel@nongnu.org; Tue, 12 Nov 2024 08:59:43 -0500 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tArQj-000426-OO for qemu-devel@nongnu.org; Tue, 12 Nov 2024 08:59:42 -0500 Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-83abf71f244so201798839f.1 for ; Tue, 12 Nov 2024 05:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1731419977; x=1732024777; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=meZSkW/KpZC3yrnqAzdQzJHpxuq2GB8ec6FamATdohQ=; b=SfMTuCFEKhGPwStkjR7MEeMtddQ5mA6Z4th8lpPLMDcK8yjaCtnBUEBR23y5refJ93 oksA7DhecmKsNOO9/QeUklUIARFVpZ1KUhKqBJM9BDcTPu0qp/QffmPX8L7LfpSyDQNf Z/3aMFNU0ssj8P/qyN36xdnFZv1fVl84eHzM0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731419977; x=1732024777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=meZSkW/KpZC3yrnqAzdQzJHpxuq2GB8ec6FamATdohQ=; b=DiG7nuo4iF3/Zv7J/VrxNpYwBmsQRCWGC/LyL546I962xBlFWkVcREcnlkZdaGhsuA yi7x7N4KPYJu7i+nafxLXXceWVfUMSmFGthU+6o4LSpRsrAUhhAxKSzfvpE54SgzW89L LXjqvcvASXJFTJUdz6Djq7OJUPIKqEvrxK9TMS1Tv9+M8+nLYQnheN7CttimjQcxlqqE shKiB9Jmcjo839IEtQuoFY9uNwUApTTdVVmUuglSA9d7AUydJgE28n4pA0ysY+BSL809 2k678+1DwBOUVZdYDuzRBM3LH+I4UZ4G986dCvadnzuRXSXffGqNfLjMkBCsfLBaVXa4 uskQ== X-Forwarded-Encrypted: i=1; AJvYcCXxI8hJhBj08ezLiLjVlVn74M6UnDIvpEms8Y9mbruaTTQdG5AlShs0OSwycse3IkXL0g7r9xCExRnl@nongnu.org X-Gm-Message-State: AOJu0YyXCoE3o/s4FC8LCYaKDuiTsdH2FPUAK6R0Ab52K0WPUY9k+e8/ PU5F1mfXKlhWm+PN6INgYy/Sc8w1QDy13r8QYUb6a5S2UvGJRgJTtUlaIzAAJw== X-Google-Smtp-Source: AGHT+IGGnulNLd2O+ik74tJVc8S+m3d8DlVrueGb4U5VbLkVCda7IZb8VLCIneqkZOwTyIGB0IAFtw== X-Received: by 2002:a05:6602:29c7:b0:803:5e55:ecb2 with SMTP id ca18e2360f4ac-83e03068fe6mr2057497739f.0.1731419977025; Tue, 12 Nov 2024 05:59:37 -0800 (PST) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-83e132c01besm189203039f.30.2024.11.12.05.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 05:59:35 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Tom Rini , qemu-devel@nongnu.org Subject: [PATCH 04/18] x86: qemu: Enable dhrystone Date: Tue, 12 Nov 2024 06:58:57 -0700 Message-Id: <20241112135911.630586-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241112135911.630586-1-sjg@chromium.org> References: <20241112135911.630586-1-sjg@chromium.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d2a; envelope-from=sjg@chromium.org; helo=mail-io1-xd2a.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.122, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Provide the 'dhry' command, which helps to check that kvm is being used properly with QEMU. Signed-off-by: Simon Glass --- configs/qemu-x86_64_defconfig | 1 + configs/qemu-x86_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/qemu-x86_64_defconfig b/configs/qemu-x86_64_defconfig index 1670c122002..151c5f3e0e7 100644 --- a/configs/qemu-x86_64_defconfig +++ b/configs/qemu-x86_64_defconfig @@ -87,4 +87,5 @@ CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_SPL_VIDEO=y # CONFIG_SPL_USE_TINY_PRINTF is not set CONFIG_GENERATE_ACPI_TABLE=y +CONFIG_CMD_DHRYSTONE=y # CONFIG_GZIP is not set diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig index 40c2f1cd362..5c5cacd734c 100644 --- a/configs/qemu-x86_defconfig +++ b/configs/qemu-x86_defconfig @@ -62,4 +62,5 @@ CONFIG_VIDEO_BOCHS=y # CONFIG_VIDEO_VESA is not set CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_GENERATE_ACPI_TABLE=y +CONFIG_CMD_DHRYSTONE=y # CONFIG_GZIP is not set From patchwork Tue Nov 12 13:58:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 13872286 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 274E7D42B82 for ; Tue, 12 Nov 2024 14:00:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tArQn-0006Tl-E1; Tue, 12 Nov 2024 08:59:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tArQl-0006QL-Er for qemu-devel@nongnu.org; Tue, 12 Nov 2024 08:59:43 -0500 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tArQj-000428-Uu for qemu-devel@nongnu.org; Tue, 12 Nov 2024 08:59:43 -0500 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-83ac817aac3so238455239f.0 for ; Tue, 12 Nov 2024 05:59:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1731419979; x=1732024779; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lDwtn31JD9K6ZyMSG8kCn2YHfnKQHNMeVz6FRkH60SM=; b=jH1028tK31hb1oFR+u6dhciFq7HVl0Rai5rn9yHHLS9rTgAf75YVT8xbo1Jd91rKCK egjUQht1JIv/VPz2JPEXPUshU6Ks99SHZbjXc/9wY6YDVZJdYB97cOwWR4g//uFJptFb htSJqXWWYyGDWnNDxc+pS+cPs8FQWhpmaKI8A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731419979; x=1732024779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lDwtn31JD9K6ZyMSG8kCn2YHfnKQHNMeVz6FRkH60SM=; b=EeDKc3+owezYJdS70VsBEuApUldbUzcfdtbm47ElE7b/VYqzofIRUbmIJkDqrg7mLN g2AocEsRFSobMwSgK42bRoMZQ3UnSD9pjui9Hhhy/u5BS0akOfYohziI5lfGqps567+b NX0UPL2VLVX4Fe2SfP5K35xeMYVSXbWiGe4CVS1s0FJ39pHEmIvKawfJd01l7lsq6VoD JqpATBOFCxklhPEMah4I50uW9K422WsrcUMMS/uUv79dJSIvRtcujNBq5ATDaJI7exEG BecaEy/kG7S1suc/rRgm8KgyFBo/yhOYcQ9Th7c40giUea3sB7ifPgTxrgEqvq6UpZl0 RL3Q== X-Forwarded-Encrypted: i=1; AJvYcCXZqvzHNtLC6aGgTV0a3JY6+cZJDRcAdwc09kczlKMLgTxK5xAS333TdBeY+3Z9mcGNqTRFSTrvZb8U@nongnu.org X-Gm-Message-State: AOJu0YzCN2VnghKLs709dic+85AbOCe2hIlvh86RT5A2odKzaAVhuijD 8onC1ev1+S+ObQUQFCcocZIH4VI7JhCjWY3uWIqPm96pMpgqJA86IdYJpP2caw== X-Google-Smtp-Source: AGHT+IHCm7eCSaDZCtHC1EYpq1641uaGdlJn8zdXwhVBLvYQOceurJxAYpd3DhKkaqYjKCawWE7csA== X-Received: by 2002:a05:6602:15c5:b0:82d:16fa:52dd with SMTP id ca18e2360f4ac-83e431d3082mr321524639f.7.1731419978709; Tue, 12 Nov 2024 05:59:38 -0800 (PST) Received: from chromium.org (c-107-2-138-191.hsd1.co.comcast.net. [107.2.138.191]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-83e132c01besm189203039f.30.2024.11.12.05.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2024 05:59:37 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Andy Shevchenko , Tom Rini , qemu-devel@nongnu.org Subject: [PATCH 05/18] x86: qemu: Avoid accessing BSS too early Date: Tue, 12 Nov 2024 06:58:58 -0700 Message-Id: <20241112135911.630586-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241112135911.630586-1-sjg@chromium.org> References: <20241112135911.630586-1-sjg@chromium.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d33; envelope-from=sjg@chromium.org; helo=mail-io1-xd33.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.122, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org BSS is placed in DRAM which is actually available early with QEMU. But it is cleared by the init sequence, so values stored there are lost. Move the system-type flag into a function, instead. Signed-off-by: Simon Glass --- arch/x86/cpu/qemu/qemu.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 563f63e2bc8..e846ccd44aa 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -15,14 +15,21 @@ #include #include -static bool i440fx; - #if CONFIG_IS_ENABLED(QFW_PIO) U_BOOT_DRVINFO(x86_qfw_pio) = { .name = "qfw_pio", }; #endif +static bool is_i440fx(void) +{ + u16 device; + + pci_read_config16(PCI_BDF(0, 0, 0), PCI_DEVICE_ID, &device); + + return device == PCI_DEVICE_ID_INTEL_82441; +} + static void enable_pm_piix(void) { u8 en; @@ -50,16 +57,17 @@ static void enable_pm_ich9(void) void qemu_chipset_init(void) { - u16 device, xbcs; + bool i440fx; + u16 xbcs; int pam, i; + i440fx = is_i440fx(); + /* * i440FX and Q35 chipset have different PAM register offset, but with * the same bitfield layout. Here we determine the offset based on its * PCI device ID. */ - pci_read_config16(PCI_BDF(0, 0, 0), PCI_DEVICE_ID, &device); - i440fx = (device == PCI_DEVICE_ID_INTEL_82441); pam = i440fx ? I440FX_PAM : Q35_PAM; /* @@ -123,7 +131,7 @@ int mp_determine_pci_dstirq(int bus, int dev, int func, int pirq) { u8 irq; - if (i440fx) { + if (is_i440fx()) { /* * Not like most x86 platforms, the PIRQ[A-D] on PIIX3 are not * connected to I/O APIC INTPIN#16-19. Instead they are routed