From nobody Sat Nov 23 12:00:13 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=redhat.com Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1731670852096113.76996438621586; Fri, 15 Nov 2024 03:40:52 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id EBACFE0E60; Fri, 15 Nov 2024 11:40:47 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id EFF57E0EBF for ; Fri, 15 Nov 2024 11:40:16 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-Ol7bsoVINI2pqeZ9YnE2eQ-1; Fri, 15 Nov 2024 06:40:14 -0500 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 96932195608C for ; Fri, 15 Nov 2024 11:40:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 500DC1953880; Fri, 15 Nov 2024 11:40:13 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) id 00B721800DFC; Fri, 15 Nov 2024 12:40:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731670815; 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=pHzc8C7fSROiEZilEQX1wyibm+VR+wr7iZRLgB27Txw=; b=KBnorxwGK5venCmZ3fjFWP57tOiUhYgZP9hHnWZrh+/3ONBojJt766zBKybMFgxmRSj2ja eNhtht1AVcNxergd7cqPj5/ZA4oLtMe5v8PO/hffp7xd7HtGUhWgCls0G6/QteHM8x3vEY f9Q6v6k7Wd2dw/RMXpgwpdLhnQ87k6I= X-MC-Unique: Ol7bsoVINI2pqeZ9YnE2eQ-1 X-Mimecast-MFC-AGG-ID: Ol7bsoVINI2pqeZ9YnE2eQ From: Gerd Hoffmann To: seabios@seabios.org Date: Fri, 15 Nov 2024 12:40:07 +0100 Message-ID: <20241115114010.51342-2-kraxel@redhat.com> In-Reply-To: <20241115114010.51342-1-kraxel@redhat.com> References: <20241115114010.51342-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: O21nMW9KArxht9fjPhXECKlAxPrs8XSCKWL638loOT4_1731670813 X-Mimecast-Originator: redhat.com Message-ID-Hash: VSE5IMGAQIN22C75XBLQQCWLUE4HBYZA X-Message-ID-Hash: VSE5IMGAQIN22C75XBLQQCWLUE4HBYZA 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: Gerd Hoffmann X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [SeaBIOS] [PATCH 1/4] add guest hint variable 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: 1731670852416116600 Content-Type: text/plain; charset="utf-8"; x-default="true" This holds the hint whenever the guest is 32-bit or 64-bit, so seabios can optimize the memory layout (pci bar placement) accordingly. Default is '32' for best backward compatibility. Signed-off-by: Gerd Hoffmann --- src/fw/paravirt.h | 1 + src/fw/paravirt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/fw/paravirt.h b/src/fw/paravirt.h index 62a2cd075d2b..cf28528e0261 100644 --- a/src/fw/paravirt.h +++ b/src/fw/paravirt.h @@ -33,6 +33,7 @@ extern u64 RamSizeOver4G; extern int PlatformRunningOn; extern u8 CPUPhysBits; extern u8 CPULongMode; +extern u8 GuestHint; =20 static inline int runningOnQEMU(void) { return CONFIG_QEMU || ( diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index e5d4eca0cb5a..fbd00f1c072f 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -36,6 +36,8 @@ u64 RamSizeOver4G; u8 CPUPhysBits; // 64bit processor u8 CPULongMode; +// memory layout hint (32bit or 64bit guests). +u8 GuestHint =3D 32; // Type of emulator platform. int PlatformRunningOn VARFSEG; // cfg enabled --=20 2.47.0 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org