From nobody Fri Nov 14 23:31:42 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1759692448; cv=none; d=zohomail.com; s=zohoarc; b=YVi1RhJ3k6LzW5MzTQHKxAGYI4bCdZqgThwDJnNZn6UHVsAx1YBAlosXIexTFFfQbVrJUjiawDV5MhlNl21cjOp+wc8HaC7BJiqjUWLpWhkf+n46bFqDZxqAevrMo1dsfQ/5//ZIJ5KdDTHjkFx2k0Drmre9nVubwbc6ZdmeXv4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759692448; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ml2pFyRHG+5Bce2r6KPnxhJb7q8qJwL1Tv/Mz3Zw5Ls=; b=IpGz6LaZZO/4/MFgPkzpxfLbHu1v6g8UHaSjoTNvkz7VNHMVeO3YWaF+coZC+rvG5st678dgR0WBkF0kyhXVEENEaX+KqRr0MrAY3dXfSgPl9so+IuewK/hYilMpozfiJKTsUTDDIv81NJur/AkvMknUw4VgZ+dR2DcsFN5jJUM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1759692448000329.11839918583667; Sun, 5 Oct 2025 12:27:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v5UFH-00022P-O8; Sun, 05 Oct 2025 15:18:11 -0400 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 1v5UEp-0000Lc-VE for qemu-devel@nongnu.org; Sun, 05 Oct 2025 15:17:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v5UEo-0006YA-12 for qemu-devel@nongnu.org; Sun, 05 Oct 2025 15:17:43 -0400 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-HKJN_48YO4WlCkbFmeOOqA-1; Sun, 05 Oct 2025 15:17:40 -0400 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3efa77de998so2422407f8f.0 for ; Sun, 05 Oct 2025 12:17:40 -0700 (PDT) Received: from redhat.com ([2a0d:6fc0:1518:6900:b69a:73e1:9698:9cd3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4255d8a6c49sm17544030f8f.3.2025.10.05.12.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Oct 2025 12:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759691861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ml2pFyRHG+5Bce2r6KPnxhJb7q8qJwL1Tv/Mz3Zw5Ls=; b=T9HPp4m5UV8eG7PSON/9yYUwZEadOjNhrMhWKwiAeF809pUMXKeHPkiC27yaQYWS9phGgS dpVDDg7an3UxvvL735bx69rCs2Rx4jBKXrqMX3Yae4eNg9FXqi38hzADo/wmBhO/LUW4pF xcEwfavaoPH6Lp1tDIeaoix1KPi7vu8= X-MC-Unique: HKJN_48YO4WlCkbFmeOOqA-1 X-Mimecast-MFC-AGG-ID: HKJN_48YO4WlCkbFmeOOqA_1759691859 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759691859; x=1760296659; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ml2pFyRHG+5Bce2r6KPnxhJb7q8qJwL1Tv/Mz3Zw5Ls=; b=rTquNMCF8HFHp/wkHetit+ZgIQywc34cWGd83e/DA7kLHF8DbJkqF2l46BF8ZIwAhw vFnFZOy+4TYU2oh4Vrzw7UvTrwiows5a/DhJDWOcwuM8wzLNY2u5WI60UwlSmSDzKf4V wOb+AgnkrzQs+QqrOAQ16FDI/Xj8x8rxH4gaCZwamP0KaeLyaUCzZur6Fi1SHf39lfco Pafz8ONUFkTeNhBeRqjZqelVB62X/Zc5wLNeH5CWzmRfwJPhdPOdMZ2CJo8gHcQTfNMR spjPbzSjeqMuA8RycAGTYU7uSoS70nLyD+8AZhN3kPO60xlFpbgQ+mmYYhQ7K1eHtnLA k3ag== X-Gm-Message-State: AOJu0YwxGvxLolAhDTLMlt+4sFNG/v2ZCXOvFpMXzG9UPpCCucRlmc1i WAMvfanyhb4GOfG1dulnpOtrvamzmZMh/cgyGDaEG+Llr66cQMEbwjsmyoVxgLQ0aceGnqe/NXj 6orlfk7PL0Ss8fSAo1xpmWmWYkAnVUff24uk+LKInYNGhADZ/7P+zXypkB5sQdci8BqDExWMreV SKMsfHGEWz8UFdw4ooQ1FYbLxWAZjNTdRv2A== X-Gm-Gg: ASbGncuRegTth6YnBUC7GJ3yp6UN0bA4rl49Cr5n5X4NPm244rmKxojZz3jvbNdPgcn 9E7jLji59riHp4mZtkplhtqLzB/702DHrdrHAnRCQ+CDttpdH65jqofyIRqaAlQ00BCd5MNvZdN r5HCBNB4BuLxmHZInqkkssaPWItSc3u1AxTDlPHJh3T86TsuBmrZf4u14IbQcCY8EjG4nflEYjk uxmbxJ+xNtwvklsjtiuSV421LjgvcUATrodmkfNuaTqHoqMIHwkiwqlimO1Qo6Igt1uBEFlunP7 GncAxplOpIV1kMn2DsTLX9xCxWmxxiC+Grl/QD0= X-Received: by 2002:a05:600c:628b:b0:46e:4883:27d with SMTP id 5b1f17b1804b1-46e71147470mr70617265e9.30.1759691858955; Sun, 05 Oct 2025 12:17:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEocTYVD3Zo4TaQuwGW2gr/V5ZX8yY3DnPRKTTtMy4X0M78zGcVL/zOtaT54s2UT+a6t9zig== X-Received: by 2002:a05:600c:628b:b0:46e:4883:27d with SMTP id 5b1f17b1804b1-46e71147470mr70617115e9.30.1759691858416; Sun, 05 Oct 2025 12:17:38 -0700 (PDT) Date: Sun, 5 Oct 2025 15:17:36 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , Daniel P =?utf-8?B?LiBCZXJyYW5nw6k=?= , Marcel Apfelbaum Subject: [PULL 42/75] x86: ich9: fix default value of 'No Reboot' bit in GCS Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.43, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1759692454175116600 From: Igor Mammedov [2] initialized 'No Reboot' bit to 1 by default. And due to quirk it happen= ed to work with linux iTCO_wdt driver (which clears it on module load). However spec [1] states: " R/W. This bit is set when the =E2=80=9CNo Reboot=E2=80=9D strap (SPKR pin on ICH9) is sampled high on PWROK. " So it should be set only when '-global ICH9-LPC.noreboot=3Dtrue' and clear= ed when it's false (which should be default). Fix it to behave according to spec and set 'No Reboot' bit only when '-global ICH9-LPC.noreboot=3Dtrue'. 1) Intel I/O Controller Hub 9 (ICH9) Family Datasheet (rev: 004) 2) Fixes: 920557971b6 (ich9: add TCO interface emulation) Signed-off-by: Igor Mammedov Tested-by: Daniel P. Berrang=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michael S. Tsirkin Message-ID: <20250922132600.562193-1-imammedo@redhat.com> Signed-off-by: Michael S. Tsirkin --- include/hw/southbridge/ich9.h | 2 +- hw/isa/lpc_ich9.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h index 1e231e89c9..2c35dd0484 100644 --- a/include/hw/southbridge/ich9.h +++ b/include/hw/southbridge/ich9.h @@ -95,7 +95,7 @@ struct ICH9LPCState { #define ICH9_CC_OIC 0x31FF #define ICH9_CC_OIC_AEN 0x1 #define ICH9_CC_GCS 0x3410 -#define ICH9_CC_GCS_DEFAULT 0x00000020 +#define ICH9_CC_GCS_DEFAULT 0x00000000 #define ICH9_CC_GCS_NO_REBOOT (1 << 5) =20 /* D28:F[0-5] */ diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 304dffac32..c9cb8f7779 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -132,6 +132,11 @@ static void ich9_cc_init(ICH9LPCState *lpc) static void ich9_cc_reset(ICH9LPCState *lpc) { uint8_t *c =3D lpc->chip_config; + uint32_t gcs =3D ICH9_CC_GCS_DEFAULT; + + if (lpc->pin_strap.spkr_hi) { + gcs |=3D ICH9_CC_GCS_NO_REBOOT; + } =20 memset(lpc->chip_config, 0, sizeof(lpc->chip_config)); =20 @@ -142,7 +147,7 @@ static void ich9_cc_reset(ICH9LPCState *lpc) pci_set_long(c + ICH9_CC_D27IR, ICH9_CC_DIR_DEFAULT); pci_set_long(c + ICH9_CC_D26IR, ICH9_CC_DIR_DEFAULT); pci_set_long(c + ICH9_CC_D25IR, ICH9_CC_DIR_DEFAULT); - pci_set_long(c + ICH9_CC_GCS, ICH9_CC_GCS_DEFAULT); + pci_set_long(c + ICH9_CC_GCS, gcs); =20 ich9_cc_update(lpc); } --=20 MST