From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 8720BD8108F for ; Mon, 20 Nov 2023 07:25:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=jc1Py7XevtGDjYyp+aH+5anc1751KC/06Zs7RBJMSKg=; c=relaxed/simple; d=groups.io; h=ARC-Message-Signature:ARC-Authentication-Results:ARC-Seal:From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1700465107; v=1; b=qIMHesTnX7TWSIR7izr0zjHlKTQZxq+apTIqOGIkHs5JNb3WLMZzfZlgThHhuJxtU2HfQtBX AIazSzAqKXxwF2NOTCh/ihn0YFmG+5wYV4opDawW7un33uN7sg7UmTyppBKqbJD8v7+094dMSof NbATVGN56mJgopDxfMp375pI= X-Received: by 127.0.0.2 with SMTP id eej5YY7687511x9QddbY4pll; Sun, 19 Nov 2023 23:25:07 -0800 X-Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by mx.groups.io with SMTP id smtpd.web10.45475.1700465106027841327 for ; Sun, 19 Nov 2023 23:25:06 -0800 X-Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4SYfD103m9z4RlH; Mon, 20 Nov 2023 07:25:05 +0000 (UTC) (envelope-from corvink@FreeBSD.org) X-Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SYfD06J9pz4lkq; Mon, 20 Nov 2023 07:25:04 +0000 (UTC) (envelope-from corvink@FreeBSD.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1700465104; 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; bh=LOpJTofkbbZ5+nkOrTrxe2JDAg1oM/p2Fw8eXjW91lY=; b=IZGuN4EFuJvBFZQ9WBC8QlzehPaJWe+iQlndbAiaC1mstDPn7prNgV8i6+hTk5gR8u2z8f jHsJvvgB/Lm3dbLSijZHG8puct75RvK6EkVMrVqQk5HOX2UG2hVFDZpmBefy1KzJe4BnUB xRD4F9yWV+OsfiptYT09r9tq+Rih0u36jy9XRvEqVlceXzYu7q5xYcWbcKAzEwMszKD3OI aP3CAH2QbTTbezpg03cdvx5Zom37oUlkFApJ4Z4fAcjcij59Xe26DF7DS/ECDVznuI37oJ sKQDaxdpYuOXKTjV6/UjeQeKELCIJDVdpRLwWV9B/6Z90edfGsTKTyO/yxgxZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1700465104; a=rsa-sha256; cv=none; b=oxYiS0zr8q57xGA/wYRGUFRN/p7SKHFQDL/gHToQq87oDPG7Hkvy4QSnalouSVbNNt443m tEYDFiv6HeVK3nHgamQuo//fnj8YpAxrOM2E1zC1Kp7cvI+IM83ibPwfHxhHs/zzJoLpv/ tEBjZLQiYxy5XkH8eW9ILxtEcTHY+xCG2gfzIKu1XFTXEUZLnYEkxSFxKvvS+VKnX6cixP bCAO+yD8tcOxVvO7mV3lC8k5E7XRsGEzOXdhiMvbh/xngVO40zH2403Mwn2FjaJCuV2fq6 h2Dyo0K7bHBQORLOIihnKNruB4F+RueLuHCrUgQufwlnBlZqohglj1xJ0gqzLA== X-Received: from corvink-nb.beckhoff.com (unknown [195.226.174.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SYfCz2KKJzBrT; Mon, 20 Nov 2023 07:25:03 +0000 (UTC) (envelope-from corvink@FreeBSD.org) From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: devel@edk2.groups.io Cc: Laszlo Ersek , Rebecca Cran , Ard Biesheuvel , Gerd Hoffmann , Liming Gao , Jiewen Yao Subject: [edk2-devel] [PATCH v2 1/1] OvmfPkg/Bhyve: use a proper PCI IO range Date: Mon, 20 Nov 2023 08:24:53 +0100 Message-ID: <20231120072453.10433-1-corvink@FreeBSD.org> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,corvink@FreeBSD.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: rI0Nikyzu66g2sXmaEz0c8Aax7686176AA= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=qIMHesTn; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:freebsd.org:reject}") Bhyve uses an io port range of [ 0x2000, 0x10000 ] [1]. At the moment, EDKII is using a subset of this range [ 0xC000, 0x10000 ] [2]. Even though the EDKII range doesn't exceed the bhyve range, it's causing issues on some guests like OpenBSD [3]. We don't know why it's causing issues yet. However, using the same IO port range in EDKII fixes the issue and is a good idea anyway. [1] https://github.com/freebsd/freebsd-src/blob/82ea0132c8b17a7a6067c8a36c6= 434e587ede6de/usr.sbin/bhyve/pci_emul.c#L133-L134 [2] https://github.com/tianocore/edk2/blob/fb044b7fe893a4545995bfe2701fd38e= 593355d9/OvmfPkg/Bhyve/PlatformPei/Platform.c#L156-L157 [3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274389 Signed-off-by: Corvin K=C3=B6hne Reviewed-by: Laszlo Ersek Reviewed-by: Rebecca Cran Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Liming Gao Cc: Jiewen Yao --- OvmfPkg/Bhyve/PlatformPei/Platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformP= ei/Platform.c index f6d9a9038e12..bd1b22a9476e 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c @@ -153,8 +153,8 @@ MemMapInitialization ( UINT64 PciIoSize; RETURN_STATUS PcdStatus; =20 - PciIoBase =3D 0xC000; - PciIoSize =3D 0x4000; + PciIoBase =3D 0x2000; + PciIoSize =3D 0xE000; =20 // // Create Memory Type Information HOB --=20 2.42.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111461): https://edk2.groups.io/g/devel/message/111461 Mute This Topic: https://groups.io/mt/102703362/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-