From nobody Mon Feb 9 20:55:01 2026 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=redhat.com Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1669026803142509.2476114550177; Mon, 21 Nov 2022 02:33:23 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 6955E20F08; Mon, 21 Nov 2022 10:33:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 404A020CC4 for ; Mon, 21 Nov 2022 10:32:28 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-240-DUjv93i1PS2yAAFJcIP_kw-1; Mon, 21 Nov 2022 05:32:23 -0500 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2CB24800186; Mon, 21 Nov 2022 10:32:23 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD981C15BBC; Mon, 21 Nov 2022 10:32:22 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 0F8A51800999; Mon, 21 Nov 2022 11:32:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669026747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zdx4+74HnxonlbQl4hRvCPm4KbmuHyNVCUmDQKAZ+bg=; b=gDvUNeslIrbBaFn1KF34A9p9xDoj1H74FM67rTWGCYO7VO4T6dSJPNgUdbtb8yluD/Pdfy MpWFiYM0diXWQIp1YYiOlO12wn5O7SDuylqRx4CcaZNfcaqyoJaLNvo15YC6Z8y/ppEcx0 YOn2TQNG73YdJ3kNSSK7L1inV5Q6EkM= X-MC-Unique: DUjv93i1PS2yAAFJcIP_kw-1 From: Gerd Hoffmann To: seabios@seabios.org Date: Mon, 21 Nov 2022 11:32:12 +0100 Message-Id: <20221121103213.1675568-4-kraxel@redhat.com> In-Reply-To: <20221121103213.1675568-1-kraxel@redhat.com> References: <20221121103213.1675568-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Message-ID-Hash: C33XHEOJM4ZA7DPTD2QZYTMSZSE4OU4M X-Message-ID-Hash: C33XHEOJM4ZA7DPTD2QZYTMSZSE4OU4M X-MailFrom: kraxel@redhat.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 CC: qemu-devel@nongnu.org, Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 3/4] move 64bit pci window to end of address space 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: 1669026804120100005 Content-Type: text/plain; charset="utf-8" When the size of the physical address space is known (PhysBits is not zero) move the 64bit pci io window to the end of the address space. Signed-off-by: Gerd Hoffmann --- src/fw/pciinit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index badf13d3233b..ad6def93633b 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -1128,6 +1128,14 @@ static void pci_bios_map_devices(struct pci_bus *bus= ses) r64_mem.base =3D le64_to_cpu(romfile_loadint("etc/reserved-memory-= end", 0)); if (r64_mem.base < 0x100000000LL + RamSizeOver4G) r64_mem.base =3D 0x100000000LL + RamSizeOver4G; + if (PhysBits) { + u64 top =3D 1LL << PhysBits; + u64 size =3D (ALIGN(sum_mem, (1LL<<30)) + + ALIGN(sum_pref, (1LL<<30))); + if (r64_mem.base < top - size) { + r64_mem.base =3D top - size; + } + } r64_mem.base =3D ALIGN(r64_mem.base, align_mem); r64_mem.base =3D ALIGN(r64_mem.base, (1LL<<30)); // 1G hugepage r64_pref.base =3D r64_mem.base + sum_mem; --=20 2.38.1 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org