From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vito-vars.onthenet.com.au (vito-vars.onthenet.com.au [203.13.68.24]) by mx.groups.io with SMTP id smtpd.web08.43384.1606170417215334213 for ; Mon, 23 Nov 2020 14:26:57 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: iredmail.onthenet.com.au, ip: 203.13.68.24, mailfrom: srs0=99am=e5=freebsd.org=grehan@iredmail.onthenet.com.au) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by vito-vars.onthenet.com.au (Postfix) with ESMTPS id A0B8720B5CC8 for ; Tue, 24 Nov 2020 08:26:55 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id 88C1A209E422 for ; Tue, 24 Nov 2020 08:26:55 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id 7C340209C01E for ; Tue, 24 Nov 2020 08:26:55 +1000 (AEST) Received: from iredmail.onthenet.com.au ([127.0.0.1]) by iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id PdbIWVU1LZ-M for ; Tue, 24 Nov 2020 08:26:55 +1000 (AEST) Received: from MacBook-Air-4.local (unknown [120.29.38.90]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 44B04209C019; Tue, 24 Nov 2020 08:26:55 +1000 (AEST) Subject: Re: [PATCH 1/1] OvmfPkg/Bhyve: Add support for the AMD host bridge To: Rebecca Cran , devel@edk2.groups.io Cc: Jordan Justen , Laszlo Ersek , Ard Biesheuvel References: <20201123050502.96793-1-rebecca@bsdio.com> From: "Peter Grehan" Message-ID: <4ab79040-2ff4-dd91-0545-4c5504df85bf@freebsd.org> Date: Tue, 24 Nov 2020 08:26:54 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201123050502.96793-1-rebecca@bsdio.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=RcsL92lv c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=jv95JoYWqjuhviHrDs94QA==:17 a=IkcTkHD0fZMA:10 a=nNwsprhYR40A:10 a=6I5d2MoRAAAA:8 a=ri_5JkV0AAAA:8 a=xvS9hQnNH94lMtuIMSsA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=4Qv8XOUJw1QQJyBSU6iG:22 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=LtAJNkVc c=1 sm=1 tr=0 a=mJOSnoNX3k71adV6TmU0eQ==:117 a=jv95JoYWqjuhviHrDs94QA==:17 a=IkcTkHD0fZMA:10 a=nNwsprhYR40A:10 a=6I5d2MoRAAAA:8 a=ri_5JkV0AAAA:8 a=xvS9hQnNH94lMtuIMSsA:9 a=QEXdDO2ut3YA:10 a=IjZwj45LgO3ly-622nXo:22 a=4Qv8XOUJw1QQJyBSU6iG:22 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Reviewed-by: Peter Grehan > On bhyve, either an Intel or AMD host bridge can be specified, with the > default being Intel. > Both are identical, except the AMD one uses a PCI vendor ID of AMD. > > Signed-off-by: Rebecca Cran > --- > OvmfPkg/Bhyve/PlatformPei/Platform.c | 3 ++- > OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c | 6 ++++-- > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformPei/Platform.c > index 11658d478c3b..9f1900626d6b 100644 > --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c > +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c > @@ -349,7 +349,8 @@ MiscInitialization ( > // Determine platform type and save Host Bridge DID to PCD > // > switch (mHostBridgeDevId) { > - case 0x1275: // BHYVE > + case 0x7432: // BHYVE (AMD hostbridge) > + case 0x1275: // BHYVE (Intel hostbridge) > case INTEL_82441_DEVICE_ID: > PmCmd = POWER_MGMT_REGISTER_PIIX4 (PCI_COMMAND_OFFSET); > Pmba = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); > diff --git a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c > index 3b94630ac732..eaade4adeae2 100644 > --- a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c > +++ b/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c > @@ -1066,7 +1066,8 @@ SetPciIntLine ( > // and should match SeaBIOS src/fw/pciinit.c *_pci_slot_get_irq() > // > switch (mHostBridgeDevId) { > - case 0x1275: // BHYVE > + case 0x7432: // BHYVE (AMD hostbridge) > + case 0x1275: // BHYVE (Intel hostbridge) > case INTEL_82441_DEVICE_ID: > Idx -= 1; > break; > @@ -1143,7 +1144,8 @@ PciAcpiInitialization ( > // > mHostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId); > switch (mHostBridgeDevId) { > - case 0x1275: // BHYVE > + case 0x7432: // BHYVE (AMD hostbridge) > + case 0x1275: // BHYVE (Intel hostbridge) > case INTEL_82441_DEVICE_ID: > Pmba = POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); > // >