From nobody Thu Dec 26 18:26:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1730593444809936.0248436067815; Sat, 2 Nov 2024 17:24:04 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 2F25AECD29; Sun, 3 Nov 2024 00:24:00 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 4D7A5ECD17 for ; Sun, 3 Nov 2024 00:23:45 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) for ; Sat, 02 Nov 2024 17:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730593424; x=1731198224; darn=seabios.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=hMO+SC1u9GEkycRFzafDlpstBRcmFG+MdWR8PjS144Q=; b=jn2X5+HdUs7NiGjtWHqt0IzQIW6T/YRmvZj6rv8AKNl1zl+UR5ZSHdFa/GIrn5G42G 2KfZDp6+LnkpFABH8gZzYzVkR0nk7MCoLCVQ8i6RcOfrZ1nsc1xdi74SyKtFxx8KQwIU mUttM7FMVkpQQWjI8b5/nwDdz8ACANuc56ufZvuY5kFi8qp3G6HzM+xL9ZC3Y/fj0bGb tGBW3s+jZr0VdCnUpFbitLhZ0M46i55mO2SC2b/4g5qvd9+uI3WpVmyPE9ZPr3L4he1d tHnCbW1T8flJTiN4YZuiTFFQyf/udO3Ie4nrb4VG7SgvwsFL9tl4Z0kNBVTBk/kFiloh iKrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730593424; x=1731198224; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hMO+SC1u9GEkycRFzafDlpstBRcmFG+MdWR8PjS144Q=; b=MkVytQmlV/iZ0/FrqE9725Gxh3gpxwvCAO2mCD0DZ4f6YV7fr5Cv6H6AU9j3Pqec8a xmVsVzWHxqGiGkAoYcKE/qbgbIgDfLvpKx9ox9bO0lfTWFm1z+YRnIrwbWyMvkE1Ejen mm8Y0sgEKwEsJBjhFrSP0gHoJYYN7p6MXJpcVQcLvHExb0LaOwtdqz2STpLK4ZbrGc8I gpX5YyJgplYpkloKtdnsAAo8G3/UmgtfnwR7tbczrta5PYsBSLdlOEFwd6lDj60uH9yU jb39oDweq3kjAE9m7K5pFLGgop73PuXQPwOF/ushcPNKvCuDqHjkCszfp/JHMatK/xTS 6u7Q== X-Gm-Message-State: AOJu0YwUkM5gySj75wlCBa4ZaNhoMA9tXDF/o66FAow+5C/PL5Mz4c2U dneMyDBQzvHBwxwoxwKJg3qtvOChTEmQjWeFDi/TWcpXe6V4VDrWto2mcciSuBynGmxZZxIczOx bzEgbRT98O3AJtZeZFHZSZ7tw3FGCLP1KrHQ= X-Google-Smtp-Source: AGHT+IEPbrDX1r3P4myyXbiRgkh82kdDNGyfVPR5vdsc7m1bEynwEkfX3pO142W+yHEoWh4wgiyY4nVlAspSuF6gnFQ= X-Received: by 2002:a17:907:7207:b0:a99:e619:260e with SMTP id a640c23a62f3a-a9e655aa3d5mr664595866b.28.1730593424401; Sat, 02 Nov 2024 17:23:44 -0700 (PDT) MIME-Version: 1.0 From: Omar Berrow Date: Sat, 2 Nov 2024 20:23:33 -0400 Message-ID: To: seabios@seabios.org Message-ID-Hash: QGCN4WTW2CPNB3UREN6534L5KKXH7HZ3 X-Message-ID-Hash: QGCN4WTW2CPNB3UREN6534L5KKXH7HZ3 X-MailFrom: omarkberrow@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; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH] resume: reset mmconfig to zero List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: / X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1730593448511116600 Content-Type: text/plain; charset="utf-8" I apologize for the previous thing sent on the mailing list. On wake it would attempt to use the ECAM space to restore access to ECAM, which wouldn't work because ECAM is disabled after reset. Signed-off-by: Omar Berrow --- src/hw/pci.c | 2 +- src/resume.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/hw/pci.c b/src/hw/pci.c index 8eda84b2..dfe4d92a 100644 --- a/src/hw/pci.c +++ b/src/hw/pci.c @@ -14,7 +14,7 @@ #define PORT_PCI_CMD 0x0cf8 #define PORT_PCI_DATA 0x0cfc -static u32 mmconfig; +volatile u32 mmconfig; static void *mmconfig_addr(u16 bdf, u32 addr) { diff --git a/src/resume.c b/src/resume.c index fb0b8a89..10b873c3 100644 --- a/src/resume.c +++ b/src/resume.c @@ -96,6 +96,15 @@ s3_resume(void) return; } + make_bios_writable(); + // reset mmconfig to make sure that we don't use PCIe to + // resume PCIe + dprintf(1, "resetting mmconfig\n"); + extern volatile u32 mmconfig; + mmconfig =3D 0; + dprintf(1, "mmconfig: 0x%x\n", mmconfig); +// make_bios_readonly(); + pic_setup(); smm_setup(); smp_resume(); --=20 2.45.2 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org