From nobody Fri May 3 10:46:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67843+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67843+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1606179468; cv=none; d=zohomail.com; s=zohoarc; b=IVwAe+BN7Md12QKOo+FJ1JMlNttCRNkv0h1FjmtWirVHjoUT7nELrCReOPXSY/920TT7hQUzkpoO9X72x+WfCsQ2fh/Pb6EnQn1hSxCAfH2BWA9b7rOM82o5e+kSFZxq6KlJ/w6qj0LdcXoWrn8KeDUk9zvIRrD2XnQps+QnzYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606179468; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=JTssBpZrsJXLJW7u2T1a+i3/OdNsv3XdcQQtMEdb4wQ=; b=Z985wumL1Zjbkp7Eikq/3V8tkjjPy8FOmE8UkAvWBS04BGfkBcIrTxmZW9WEC4VqIGUdSlnQYxqRBe/qvYIkyBAU8+tKHAuDErRYceIjt7D7wI08SYjIU0T1rWRPEG4DZDlYpgxoSYvbLXkZHm7tbpUH0AAYA/lZAhXMgFd8i5o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67843+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1606179468285677.4806288749799; Mon, 23 Nov 2020 16:57:48 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id PzfGYY1788612x8BfTV7Y7VN; Mon, 23 Nov 2020 16:57:47 -0800 X-Received: from out03.mta.xmission.com (out03.mta.xmission.com [166.70.13.233]) by mx.groups.io with SMTP id smtpd.web09.45728.1606179461833153906 for ; Mon, 23 Nov 2020 16:57:41 -0800 X-Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1khMeK-00BEUg-AG; Mon, 23 Nov 2020 17:57:40 -0700 X-Received: from mta4.zcs.xmission.com ([166.70.13.68]) by in02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1khMeJ-003zEz-Dq; Mon, 23 Nov 2020 17:57:39 -0700 X-Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id 4AE7350066D; Mon, 23 Nov 2020 17:57:39 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta4.zcs.xmission.com X-Received: from mta4.zcs.xmission.com ([127.0.0.1]) by localhost (mta4.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZiIwK7N6KJg8; Mon, 23 Nov 2020 17:57:39 -0700 (MST) X-Received: from smic.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id 0B840500668; Mon, 23 Nov 2020 17:57:39 -0700 (MST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Peter Grehan Date: Mon, 23 Nov 2020 17:57:31 -0700 Message-Id: <20201124005733.18107-2-rebecca@bsdio.com> In-Reply-To: <20201124005733.18107-1-rebecca@bsdio.com> References: <20201124005733.18107-1-rebecca@bsdio.com> MIME-Version: 1.0 X-XM-SPF: eid=1khMeJ-003zEz-Dq;;;mid=<20201124005733.18107-2-rebecca@bsdio.com>;;;hst=in02.mta.xmission.com;;;ip=166.70.13.68;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.68 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa03.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Virus: No X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa03 1397; IP=ok Body=1 Fuz1=1] X-Spam-DCC: XMission; sa03 1397; IP=ok Body=1 Fuz1=1 X-Spam-Combo: ;devel@edk2.groups.io X-Spam-Relay-Country: X-Spam-Timing: total 456 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 3.8 (0.8%), b_tie_ro: 2.7 (0.6%), parse: 0.71 (0.2%), extract_message_metadata: 12 (2.6%), get_uri_detail_list: 1.02 (0.2%), tests_pri_-1000: 12 (2.5%), tests_pri_-950: 1.02 (0.2%), tests_pri_-900: 0.81 (0.2%), tests_pri_-90: 54 (11.8%), check_bayes: 53 (11.5%), b_tokenize: 5 (1.2%), b_tok_get_all: 6 (1.3%), b_comp_prob: 1.26 (0.3%), b_tok_touch_all: 37 (8.2%), b_finish: 0.74 (0.2%), tests_pri_0: 200 (43.9%), check_dkim_signature: 0.41 (0.1%), check_dkim_adsp: 37 (8.1%), poll_dns_idle: 194 (42.6%), tests_pri_10: 2.2 (0.5%), tests_pri_500: 168 (36.8%), rewrite_mail: 0.00 (0.0%) Subject: [edk2-devel] [PATCH v2 1/3] OvmfPkg/Bhyve: Add VariablePolicy engine to Bhyve X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: Bulk List-Unsubscribe: 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,rebecca@bsdio.com X-Gm-Message-State: 2XBfXiTQtZbzc7t1pBS483Pkx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606179467; bh=qJXn8Jinj9+uhnk6OIf32h2GQ4pwonmOtTVeTF9bdps=; h=Cc:Date:From:Reply-To:Subject:To; b=C6YBRArXg05iKnZQsIuLt/26EeIhuIBgGZnzJCV3VpwE0Cs7var4dRfvJ1ZwesplKNP Br4pnqNyQT2MoX7NNa5RkXzacBNBPRvUGwO2oWV8FP3dKeIAYcHQboP5V4SRnMQuml2JL D2o3GlcdTO6/xiN3Hv4R5RrYDLhwpG9Kiww= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D2522 Signed-off-by: Rebecca Cran Acked-by: Peter Grehan Reviewed-by: Laszlo Ersek --- OvmfPkg/Bhyve/BhyveX64.dsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve/BhyveX64.dsc index 0d7b03ced6ea..c9813097ca32 100644 --- a/OvmfPkg/Bhyve/BhyveX64.dsc +++ b/OvmfPkg/Bhyve/BhyveX64.dsc @@ -197,7 +197,8 @@ [LibraryClasses] AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLib= Null.inf !endif VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf - + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ib.inf + VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/Var= iablePolicyHelperLib.inf =20 # # Network libraries @@ -322,6 +323,7 @@ [LibraryClasses.common.DXE_RUNTIME_DRIVER] UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf PciLib|OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePolicyL= ibRuntimeDxe.inf =20 [LibraryClasses.common.UEFI_DRIVER] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf --=20 2.29.2 -=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 (#67843): https://edk2.groups.io/g/devel/message/67843 Mute This Topic: https://groups.io/mt/78468097/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 10:46:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67845+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67845+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1606179463; cv=none; d=zohomail.com; s=zohoarc; b=XA/O0IBzdEoJKABSDDSJUfcToAKNALzLUrCYDlA8G7ncwf96ZVBVXyg9fD2IIht/uLN9VIl7WrSHrzl7AXAPTONRG3UUUnoFGzEwiCBKIWnopWclyaa5WuDMYOMnWIEVkcWobluqGsyIlnMi6v5vLdeR0hDTgq3Qd8Oq/F8yZCQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606179463; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=it6qnfL1KMqWAKtHywDD4E6dLSX4lFctHVlyovbVuz8=; b=i4SjyTa+Qw5FUW8xy3jG2Jc81RKNey+RleRGSohwORK+uk155D90Rb5r/fUdffUbnppCWuMuW6Zaiw1lDNx6D5t1byG2UjWbA1p4TIW11EkvFU+kgkjg4a2d8kQN5YkA2ffa2UosX4H8TLBqfvg5AWRYbtOz+RBT4e2O9M0fnvM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67845+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1606179463505239.72386448542966; Mon, 23 Nov 2020 16:57:43 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 1Wp0YY1788612xH54VYsfPzI; Mon, 23 Nov 2020 16:57:43 -0800 X-Received: from out01.mta.xmission.com (out01.mta.xmission.com [166.70.13.231]) by mx.groups.io with SMTP id smtpd.web10.45350.1606179462657018025 for ; Mon, 23 Nov 2020 16:57:42 -0800 X-Received: from in01.mta.xmission.com ([166.70.13.51]) by out01.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1khMeL-00BcWk-Qs; Mon, 23 Nov 2020 17:57:41 -0700 X-Received: from mta4.zcs.xmission.com ([166.70.13.68]) by in01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.87) (envelope-from ) id 1khMeL-0008Qu-2l; Mon, 23 Nov 2020 17:57:41 -0700 X-Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id EB2EE500667; Mon, 23 Nov 2020 17:57:40 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta4.zcs.xmission.com X-Received: from mta4.zcs.xmission.com ([127.0.0.1]) by localhost (mta4.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M6g3NFah2-uh; Mon, 23 Nov 2020 17:57:40 -0700 (MST) X-Received: from smic.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id A8899500668; Mon, 23 Nov 2020 17:57:40 -0700 (MST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Peter Grehan Date: Mon, 23 Nov 2020 17:57:32 -0700 Message-Id: <20201124005733.18107-3-rebecca@bsdio.com> In-Reply-To: <20201124005733.18107-1-rebecca@bsdio.com> References: <20201124005733.18107-1-rebecca@bsdio.com> MIME-Version: 1.0 X-XM-SPF: eid=1khMeL-0008Qu-2l;;;mid=<20201124005733.18107-3-rebecca@bsdio.com>;;;hst=in01.mta.xmission.com;;;ip=166.70.13.68;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.68 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa06.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,XMSubLong autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] X-Spam-DCC: XMission; sa06 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;devel@edk2.groups.io X-Spam-Relay-Country: X-Spam-Timing: total 363 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 11 (3.1%), b_tie_ro: 10 (2.6%), parse: 1.03 (0.3%), extract_message_metadata: 13 (3.7%), get_uri_detail_list: 1.48 (0.4%), tests_pri_-1000: 15 (4.1%), tests_pri_-950: 1.27 (0.4%), tests_pri_-900: 1.01 (0.3%), tests_pri_-90: 111 (30.7%), check_bayes: 108 (29.8%), b_tokenize: 8 (2.1%), b_tok_get_all: 6 (1.8%), b_comp_prob: 1.91 (0.5%), b_tok_touch_all: 88 (24.3%), b_finish: 0.85 (0.2%), tests_pri_0: 197 (54.3%), check_dkim_signature: 0.55 (0.2%), check_dkim_adsp: 2.3 (0.6%), poll_dns_idle: 0.69 (0.2%), tests_pri_10: 2.1 (0.6%), tests_pri_500: 7 (1.9%), rewrite_mail: 0.00 (0.0%) Subject: [edk2-devel] [PATCH v2 2/3] OvmfPkg/Bhyve: Add support for the AMD host bridge X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Precedence: Bulk List-Unsubscribe: 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,rebecca@bsdio.com X-Gm-Message-State: mL2lTZsNpgOjE1p469k56RSFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606179463; bh=7pSl6kk35nUpjHSMxP6N4b9gcIxbDH+m/cWd9PGqTg0=; h=Cc:Date:From:Reply-To:Subject:To; b=Cp/PUUJ+jwp3jjy95gMylRByfFcAb4O83xq4jTjvnAhaBd7n8f2X6hvLKVQ2RRC+MOj 0etIhAWaKg3uiWujbNxLukFWar8V9eutzsGPxfDpgdbWcChlYQ9KWfImpquuhcdej+Uz7 Q/BJfi+Cs3Yz4XJ5yE/75cG6e0fuGLR/zZQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Peter Grehan Acked-by: Laszlo Ersek --- 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/PlatformP= ei/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 =3D POWER_MGMT_REGISTER_PIIX4 (PCI_COMMAND_OFFSET); Pmba =3D POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); diff --git a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c b/Ov= mfPkg/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 -=3D 1; break; @@ -1143,7 +1144,8 @@ PciAcpiInitialization ( // mHostBridgeDevId =3D PcdGet16 (PcdOvmfHostBridgePciDevId); switch (mHostBridgeDevId) { - case 0x1275: // BHYVE + case 0x7432: // BHYVE (AMD hostbridge) + case 0x1275: // BHYVE (Intel hostbridge) case INTEL_82441_DEVICE_ID: Pmba =3D POWER_MGMT_REGISTER_PIIX4 (PIIX4_PMBA); // --=20 2.29.2 -=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 (#67845): https://edk2.groups.io/g/devel/message/67845 Mute This Topic: https://groups.io/mt/78468099/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Fri May 3 10:46:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+67846+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67846+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1606179465; cv=none; d=zohomail.com; s=zohoarc; b=Qd6fXc7g58LLV1xXnmHHapVMGE/zTh4sS6SzWdvrQMcTivZtaz0paNtBtEN7An1hM6B6lBL9g44o9l9EtkQpAyMXK9Uo15WUkwhA8CjaSL5evn8GtqfXtYkI/53cf1CIdAG4vbzb67qriW5++ky/DbaD0C2FfOQsxRfq4NegFgQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606179465; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=mGk2Qhm3PnLUCRVvkHu/W8H7yK8oOaf+RZPduAbp/wY=; b=TUWoYY5zb9iszHowXREmtZvmFm7hF85imGR/2lAs5hcz5K5h8IrH1Vdgcj5MRa9l4lH5GnWaslYESPM4JOcy/QX7bbx09fFeYHoj2Lr9WtER1lUnzLa8eLxQKU25LjfKo+LVO74ByiOFkvNeL43FseUPMOslUAJaMCLfT8XkKqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+67846+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1606179465278608.9301567892011; Mon, 23 Nov 2020 16:57:45 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id SKS3YY1788612x280dtkYA9U; Mon, 23 Nov 2020 16:57:44 -0800 X-Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mx.groups.io with SMTP id smtpd.web10.45352.1606179464523074528 for ; Mon, 23 Nov 2020 16:57:44 -0800 X-Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1khMeN-007APJ-Kg; Mon, 23 Nov 2020 17:57:43 -0700 X-Received: from mta4.zcs.xmission.com ([166.70.13.68]) by in02.mta.xmission.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1khMeM-003zFX-IV; Mon, 23 Nov 2020 17:57:43 -0700 X-Received: from localhost (localhost [127.0.0.1]) by mta4.zcs.xmission.com (Postfix) with ESMTP id 5B571500667; Mon, 23 Nov 2020 17:57:42 -0700 (MST) X-Amavis-Modified: Mail body modified (using disclaimer) - mta4.zcs.xmission.com X-Received: from mta4.zcs.xmission.com ([127.0.0.1]) by localhost (mta4.zcs.xmission.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M6LGED9HVcLx; Mon, 23 Nov 2020 17:57:42 -0700 (MST) X-Received: from smic.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net [174.52.16.57]) by mta4.zcs.xmission.com (Postfix) with ESMTPSA id 95685500668; Mon, 23 Nov 2020 17:57:41 -0700 (MST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Peter Grehan Date: Mon, 23 Nov 2020 17:57:33 -0700 Message-Id: <20201124005733.18107-4-rebecca@bsdio.com> In-Reply-To: <20201124005733.18107-1-rebecca@bsdio.com> References: <20201124005733.18107-1-rebecca@bsdio.com> MIME-Version: 1.0 X-XM-SPF: eid=1khMeM-003zFX-IV;;;mid=<20201124005733.18107-4-rebecca@bsdio.com>;;;hst=in02.mta.xmission.com;;;ip=166.70.13.68;;;frm=rebecca@bsdio.com;;;spf=none X-SA-Exim-Connect-IP: 166.70.13.68 X-SA-Exim-Mail-From: rebecca@bsdio.com X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on sa07.xmission.com X-Spam-Level: * X-Spam-Status: No, score=1.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TooManySym_01,XMSubLong,XM_B_SpammyWords, XM_B_SpammyWords2 autolearn=disabled version=3.4.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; IP=ok Body=1 Fuz1=1] [Fuz2=1] * 0.8 XM_B_SpammyWords2 Two or more commony used spammy words * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.2 XM_B_SpammyWords One or more commonly used spammy words X-Spam-DCC: XMission; sa07 1397; IP=ok Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: *;devel@edk2.groups.io X-Spam-Relay-Country: X-Spam-Timing: total 590 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 11 (1.8%), b_tie_ro: 9 (1.6%), parse: 1.14 (0.2%), extract_message_metadata: 14 (2.4%), get_uri_detail_list: 2.9 (0.5%), tests_pri_-1000: 14 (2.5%), tests_pri_-950: 1.20 (0.2%), tests_pri_-900: 0.98 (0.2%), tests_pri_-90: 77 (13.0%), check_bayes: 75 (12.7%), b_tokenize: 20 (3.4%), b_tok_get_all: 9 (1.6%), b_comp_prob: 4.4 (0.8%), b_tok_touch_all: 37 (6.2%), b_finish: 0.98 (0.2%), tests_pri_0: 459 (77.8%), check_dkim_signature: 0.95 (0.2%), check_dkim_adsp: 3.0 (0.5%), poll_dns_idle: 0.86 (0.1%), tests_pri_10: 2.1 (0.4%), tests_pri_500: 7 (1.1%), rewrite_mail: 0.00 (0.0%) Subject: [edk2-devel] [PATCH v2 3/3] OvmfPkg/Bhyve: Copy Real16ToFlat32.asm and enable cache in CR0 X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: Bulk List-Unsubscribe: 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,rebecca@bsdio.com X-Gm-Message-State: 0GikJZmmJgdsrz3FFIkaK6PLx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1606179464; bh=/LhYQn3KYLlj4vjM7yNy3HrtssEe61rNgp0nVQVVvZw=; h=Cc:Date:From:Reply-To:Subject:To; b=wb1Pg+b8pukfKkyTW4i82i1Mai75UDyle0shgXLglLNDgt09sg9LEcQ+287CkYIfPYP T4ixcyskphMr4mLbKiFhYWPbUQi8RjYipfEUdMBSOwYMXjligRptAbSdEflwrOCEPEIDu S2f/TUOsW/qTT5GK+4i3xZ7g8FaBWw363IA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Copy UefiCpuPkg/ResetVector/Vtf0/Ia16/Real16ToFlat32.asm to OvmfPkg/Bhyve/ResetVector/Ia16, with one change, as has also been made in XenResetVector: - SEC_DEFAULT_CR0: enable cache (bit 30 or CD set to 0) With the CD bit set to 1, this has the downside on AMD systems of actually running with the cache disabled, which slows the entire system to a crawl. There's no need for this bit to be set in virtualized environments. This patch reapplies the change from the freebsd uefi-edk2 repo at https://github.com/freebsd/uefi-edk2/commit/08c00f4e8d9e3e469bdc2ce92d3aa83= 9cae7cf17 Signed-off-by: Rebecca Cran Reviewed-by: Peter Grehan Acked-by: Laszlo Ersek --- .../Bhyve/ResetVector/Ia16/Real16ToFlat32.asm | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 OvmfPkg/Bhyve/ResetVector/Ia16/Real16ToFlat32.asm diff --git a/OvmfPkg/Bhyve/ResetVector/Ia16/Real16ToFlat32.asm b/OvmfPkg/Bh= yve/ResetVector/Ia16/Real16ToFlat32.asm new file mode 100644 index 000000000000..580fe068e7e1 --- /dev/null +++ b/OvmfPkg/Bhyve/ResetVector/Ia16/Real16ToFlat32.asm @@ -0,0 +1,143 @@ +;-------------------------------------------------------------------------= ----- +; @file +; Transition from 16 bit real mode into 32 bit flat protected mode +; +; Copyright (c) 2020, Rebecca Cran . All rights reserve= d.
+; Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.
+; SPDX-License-Identifier: BSD-2-Clause-Patent +; +;-------------------------------------------------------------------------= ----- + +%define SEC_DEFAULT_CR0 0x00000023 +%define SEC_DEFAULT_CR4 0x640 + +BITS 16 + +; +; Modified: EAX, EBX +; +; @param[out] DS Selector allowing flat access to all addresses +; @param[out] ES Selector allowing flat access to all addresses +; @param[out] FS Selector allowing flat access to all addresses +; @param[out] GS Selector allowing flat access to all addresses +; @param[out] SS Selector allowing flat access to all addresses +; +TransitionFromReal16To32BitFlat: + + debugShowPostCode POSTCODE_16BIT_MODE + + cli + + mov bx, 0xf000 + mov ds, bx + + mov bx, ADDR16_OF(gdtr) + +o32 lgdt [cs:bx] + + mov eax, SEC_DEFAULT_CR0 + mov cr0, eax + + jmp LINEAR_CODE_SEL:dword ADDR_OF(jumpTo32BitAndLandHere) +BITS 32 +jumpTo32BitAndLandHere: + + mov eax, SEC_DEFAULT_CR4 + mov cr4, eax + + debugShowPostCode POSTCODE_32BIT_MODE + + mov ax, LINEAR_SEL + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + OneTimeCallRet TransitionFromReal16To32BitFlat + +ALIGN 2 + +gdtr: + dw GDT_END - GDT_BASE - 1 ; GDT limit + dd ADDR_OF(GDT_BASE) + +ALIGN 16 + +; +; Macros for GDT entries +; + +%define PRESENT_FLAG(p) (p << 7) +%define DPL(dpl) (dpl << 5) +%define SYSTEM_FLAG(s) (s << 4) +%define DESC_TYPE(t) (t) + +; Type: data, expand-up, writable, accessed +%define DATA32_TYPE 3 + +; Type: execute, readable, expand-up, accessed +%define CODE32_TYPE 0xb + +; Type: execute, readable, expand-up, accessed +%define CODE64_TYPE 0xb + +%define GRANULARITY_FLAG(g) (g << 7) +%define DEFAULT_SIZE32(d) (d << 6) +%define CODE64_FLAG(l) (l << 5) +%define UPPER_LIMIT(l) (l) + +; +; The Global Descriptor Table (GDT) +; + +GDT_BASE: +; null descriptor +NULL_SEL equ $-GDT_BASE + DW 0 ; limit 15:0 + DW 0 ; base 15:0 + DB 0 ; base 23:16 + DB 0 ; sys flag, dpl, type + DB 0 ; limit 19:16, flags + DB 0 ; base 31:24 + +; linear data segment descriptor +LINEAR_SEL equ $-GDT_BASE + DW 0xffff ; limit 15:0 + DW 0 ; base 15:0 + DB 0 ; base 23:16 + DB PRESENT_FLAG(1)|DPL(0)|SYSTEM_FLAG(1)|DESC_TYPE(DATA32_TYPE) + DB GRANULARITY_FLAG(1)|DEFAULT_SIZE32(1)|CODE64_FLAG(0)|UPPER_LIM= IT(0xf) + DB 0 ; base 31:24 + +; linear code segment descriptor +LINEAR_CODE_SEL equ $-GDT_BASE + DW 0xffff ; limit 15:0 + DW 0 ; base 15:0 + DB 0 ; base 23:16 + DB PRESENT_FLAG(1)|DPL(0)|SYSTEM_FLAG(1)|DESC_TYPE(CODE32_TYPE) + DB GRANULARITY_FLAG(1)|DEFAULT_SIZE32(1)|CODE64_FLAG(0)|UPPER_LIM= IT(0xf) + DB 0 ; base 31:24 + +%ifdef ARCH_X64 +; linear code (64-bit) segment descriptor +LINEAR_CODE64_SEL equ $-GDT_BASE + DW 0xffff ; limit 15:0 + DW 0 ; base 15:0 + DB 0 ; base 23:16 + DB PRESENT_FLAG(1)|DPL(0)|SYSTEM_FLAG(1)|DESC_TYPE(CODE64_TYPE) + DB GRANULARITY_FLAG(1)|DEFAULT_SIZE32(0)|CODE64_FLAG(1)|UPPER_LIM= IT(0xf) + DB 0 ; base 31:24 +%endif + +; linear code segment descriptor +LINEAR_CODE16_SEL equ $-GDT_BASE + DW 0xffff ; limit 15:0 + DW 0 ; base 15:0 + DB 0 ; base 23:16 + DB PRESENT_FLAG(1)|DPL(0)|SYSTEM_FLAG(1)|DESC_TYPE(CODE32_TYPE) + DB GRANULARITY_FLAG(1)|DEFAULT_SIZE32(0)|CODE64_FLAG(0)|UPPER_LIM= IT(0xf) + DB 0 ; base 31:24 + +GDT_END: + --=20 2.29.2 -=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 (#67846): https://edk2.groups.io/g/devel/message/67846 Mute This Topic: https://groups.io/mt/78468100/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-