From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.3.1662564332657639051 for ; Wed, 07 Sep 2022 08:25:32 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=bqKkB3N9; spf=permerror, err=too many SPF records (domain: intel.com, ip: 134.134.136.31, mailfrom: sebastien.boeuf@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662564332; x=1694100332; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=FSdKE2VXqUCwDcWtIXllm9ZMjxxHOKq/v2GD+qwUM9s=; b=bqKkB3N9DmN0EPrFHH68vhg8ZAB79eIIAmMGtP8dIozXo0i+yGI17/Ny nlEVhk7ZXbxm1Hg54FMWtWkM5j+DRXh7YJ6WsgS/9T6UzZNBNrqaIi4tY 8Gh3lXIb26KRosRRQJtSUuPhq/VTKCA/zQvPwtqxi0Ath9kNNVIkIP4Hy u9MHO1GDSevHQ8IuOAMXu1j2Vb7z/YqmiHfK/cGZ2PqrAKPj6JRsqgGq4 lX5LC5lx34HcngmoCyRfK+6U3Bx8Te9uQrTpDe/12qVzSBbQT7R2XfG6q fMhB+jfydpN4S7tVza2MiZFqDoRbuuIaulaUhc3/7h42Jl4+yBbhuR9uZ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="358619315" X-IronPort-AV: E=Sophos;i="5.93,297,1654585200"; d="scan'208,217";a="358619315" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 08:25:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,297,1654585200"; d="scan'208,217";a="756813707" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga001.fm.intel.com with ESMTP; 07 Sep 2022 08:25:28 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 7 Sep 2022 08:25:28 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 7 Sep 2022 08:25:27 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 7 Sep 2022 08:25:27 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 7 Sep 2022 08:25:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D+IRPh5IjT3X+J3gYhKJipaxBY3ClH21QSAC4j8KBAzBP772ehnwRQOfTwnY4WJxm1PmTztPGrFjwEzBS3h+31LCTG4FqT1kFGvGoGV9da+OoL6iZ5cJUiHP/q00s8U0xoZgWsM8iBNERqvw/OJ13e5YdYA2CLrHGB3PJAv+P7LBOssmF9Fp6EzPx+pDkGjcmlbpUZ+onBkwL6fULU0789FQ89X3EHJbzGsSdztf6l/mCINsY/QnEhn5nP1UstTYoM3U3Q4vJVerTzbVw81ePF5yn8GcCGIMvRcBE1h6990r24iUtJCRJR3mpTgPJuV95F+WBvGenWOBWLIzdixQCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WrxCf4QJxxrngW8IRNxqsDPew4jifjT92lk8nwNN7uo=; b=BRl8bQd1YCH1jqNRsG6u6gcREUmhVScp5v0bvg8cOg+dcFA32NnTakVazGnNWAlqOZE44H1gmybuEenS5ZZCXayPNvL54sRfbVJaqwWi9YUuyqlOJGZBHfSEHBY3I44ImN5jKs+uUqtdw8AUdB9zqbJ+WVOLnSQ6aBmOaGO6ngszAvyTCVJcqHTLjPCM97ymy14OQudLVa7Ft/C5n1eTxiGffwpF73GbveXWH5ZCJ/cLuRT/eT7F8dlPlgZmOCjL8fvuYngPSCikpR5ecCBavbB7Y/HbaRgV5FzsQ4CE5n5o2QQFwrQM1qwMsUSVdbpvlH5MQDhXHe2NoeiVzaZfhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from BY5PR11MB4401.namprd11.prod.outlook.com (2603:10b6:a03:1be::13) by MW3PR11MB4731.namprd11.prod.outlook.com (2603:10b6:303:2f::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11; Wed, 7 Sep 2022 15:25:12 +0000 Received: from BY5PR11MB4401.namprd11.prod.outlook.com ([fe80::112d:cc6b:6802:545b]) by BY5PR11MB4401.namprd11.prod.outlook.com ([fe80::112d:cc6b:6802:545b%7]) with mapi id 15.20.5588.018; Wed, 7 Sep 2022 15:25:12 +0000 From: "Boeuf, Sebastien" To: "Yao, Jiewen" CC: "kraxel@redhat.com" , "Justen, Jordan L" , "devel@edk2.groups.io" Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv Thread-Topic: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv Thread-Index: AQHYs7JjLp5GrBU090uWJK28qKRdWa3SjIOmgAAFtYCAAAs7pIAADdQAgAF4KQCAABAoAIAAAKMAgAAAV3Y= Date: Wed, 7 Sep 2022 15:25:12 +0000 Message-ID: References: <2ec0dccbcf5822404b0cb737818a7c01cb9fbe56.camel@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5b77d985-cc0b-428f-e4e2-08da90e52856 x-ms-traffictypediagnostic: MW3PR11MB4731:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EIsZtd29jSIcfz0kDixMVyFJCOyyu/v6eZzfM0oTDubdQmfWrREjvIv0Xw0SrPVGvwDRTHmuKSRoqRvZPahh/w3pin/wuuPsbMvKnbaq4lld0kkf7UsMigO5z73CIXo0PlBGEqs7mqCn+vPt3BGj2YP31MJZk01mTQz33ZKy9MMrbSEyiWTRDWxruJUFNzBpmkwj96ZtdNfoAdCFcgWPgTtoWhOaBimx9YbryDVHffzGskx62F99JkwKXe3Sn8fbwq5yg7WQqAHGwOWICQ9NiyputjrA3RMZbBvMYIj0N04uBiqCby14NCYonbKcKRlHBOPuKrVal0Yjmj3KnIw4oM0HpO9ReCE+rc+II8Irn3koTRkDuOfy6qQYsY9kfeaAUMAt4ltwo0utTNIgMfcjm6KoA4aq7CYWFTiqkZGHTm617DC8dGEB9vWH4Ip0D5BCggy/TcrsY3+pHDz7P4nS2AvNgOUy+cI+gIVjkn41dgS6T7p3eJvoa2/v98MLq4nytXkAgPf6l3ltRyZZ9LvoDgUwfPd3+kdN4zioR5ZO+ptEPTYQcxXYuKskYl2WbnQ1kGFogNANSBmU6+NzjHpJNFb9kNkCfR7+fnifSDsYHcLGIlmrSDI46hgUEvnfoGUgwo5shOpZeh99PiACLaDujm8SpxrQIWs6z4hCOemjKd2VuSwAR5AuN4UMtieLVTh5c8bqgHjbJVx2N6UTQni6JeNMtlpNCQIkTKmtCAbrbriqz+GD6trui2o5xaRCtgGhRkTvxep+I4tK3jMOHYK1vdNcFOPkWLsX7zOrbfPOUiZwOGb5XO9q6nVPyoOxJYsasBqbljIHnhtfGaVrbB+1Gw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB4401.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(396003)(136003)(376002)(366004)(346002)(39860400002)(5660300002)(316002)(33656002)(19627405001)(83380400001)(4326008)(91956017)(66476007)(66446008)(66946007)(8936002)(52536014)(6636002)(2906002)(8676002)(54906003)(15650500001)(64756008)(6862004)(76116006)(478600001)(71200400001)(41300700001)(9686003)(53546011)(66556008)(186003)(55016003)(86362001)(6506007)(7696005)(82960400001)(122000001)(38070700005)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?a8WhcnA3mqckVx+qV5CwBvPoc2dN1oGgTxjEn7bsKP8LizH+x+hxwzJWfTj+?= =?us-ascii?Q?vZESgGFIPw/NO/+pdIAaIasyuABWgetsWtjCargBMUmfpd3yJlQ81ePbXEdm?= =?us-ascii?Q?qAgGXtK9vlaLL8dv0raQ1n3abW+S7px0zPzHQFsUMeazWscAmo59dekGAcyy?= =?us-ascii?Q?rSVcJTUo3WSQrSrgcEc/vfK20uhDRSwH2FXknl951P6gPXooE+zJBamkG4H8?= =?us-ascii?Q?qaz0wKTcOA3fTs+vKmjIZvPUUpVAvjOhegAgg4pmdeI7bXgAj0wKmTp60KxM?= =?us-ascii?Q?8HWr6DLkI4D4mUmM06XgfbDRb5fU556BysEnqYw4SlGB9XAqM5ZGM4A2P1iK?= =?us-ascii?Q?ogE3tSG+zvbt3dby50+TkOzdmJ7yI54azg2/Gve6DISPjBlu4rg0OlzQlaRM?= =?us-ascii?Q?+oV4gBaPrZJ0XtmSn+VIoeZV0EChfK0tRM8hMZO3xbVQgNCWx9sLF6lMGlEC?= =?us-ascii?Q?M/SwKLZ5Kf4OJrZgP5wmUh0PFjiuWTcs3KujCi0Axbdea2eQHEYpPAHqRTEk?= =?us-ascii?Q?f1P6kS+Julf+D0McRD1TKoOIQSTZlUpBfXPLjjyFKGAmjLp32bkXmK5rTF1T?= =?us-ascii?Q?T8zKR5r/dQlFvLWSEeKEULTuo+ZGrhsYh+dJYLsdaXuwRemyOu4/xBTVNMpa?= =?us-ascii?Q?mmktJm97RoRSygvTfkQtlDDZHgSlbiy7OBPzJ8CpGx3ZGRygvFdQ/tiACE7I?= =?us-ascii?Q?4QpF2MPl/tzu1wLzB1byMDeLlDbq6qF5arHwaYPB4CMKtOtP63SM1qdFbAK/?= =?us-ascii?Q?Ktl4UcTnzE1tj6qTMkO59qOvREmkyOLv2uJsWy8BSNEp2/tnn6wAURY8sj41?= =?us-ascii?Q?BeOU/O/ea3UNY9lhyae8fu6NFPhc1w0+pfnXesUeKTT67UgxbQIMCKZiY/be?= =?us-ascii?Q?m5KGBJmGbrp4rU605ks7SQmlnc5XjjGeo5+oe8whGg7R0NtpyEyh3xeoDJa6?= =?us-ascii?Q?QP32vFPxKOCevcWI9+uzgPw5oBrboF4sqBFJeFKNmEPrPWn3Abf2su3eHVbl?= =?us-ascii?Q?9SFogW5qtk1pUbqr75DG/xJxXybqfBD3NOwQfSN3paFNCdbSJzrB9iPPSAqi?= =?us-ascii?Q?RXpUkONuLLnQGAjL5b5b37O1yr971nX13cSUte4N92oFP4XIxPGOlZFq5qk8?= =?us-ascii?Q?LpkLPtPIh8WuMADEJ34WDX4MI4Hl+673b9sA+pxfU71h+t4nQrKsrXBPQz47?= =?us-ascii?Q?WHTmJ4Xms0ZPWGzOguolvvWjG7WOM1xt6Zd/mweeI/pbZ3s5yoP2juYeH80q?= =?us-ascii?Q?9Lyq9GzPMPmoUilHBx+J/KmN7a8MhQMI8CSqc3GYeX+g0QJMm/8rSx1SWiUZ?= =?us-ascii?Q?owf3mdcPGLQD1yrfFYWZH5yNBURRRJs5h4wU3b8gdQBhb+SR0deKuiF1kuZS?= =?us-ascii?Q?KLuukaLR2OXpBce+GI7Rsn57rV8Eu6xl06aHgoG03LZfMZLMjR0J0D4V6G/y?= =?us-ascii?Q?NRdBWtFY425omUEighOtSDNrRY90K9AuJtjH7bc9YtCQIC+5nAkmM82OLqsZ?= =?us-ascii?Q?aqzdKV0QE2MsNa8giMEOPyC6y/2KHdmNKSLUaDhARh6wxRf+dD5Uv68jz775?= =?us-ascii?Q?Y3eFUKbFv9+D6L3GzmYOtRnCyluOEQMiQCjDYO3VgNcImeGR87/DPPckCVc1?= =?us-ascii?Q?MgopE8SC+pa0NN7lrrZCpEAtcYj8w9LnF8sVo3hvtlKw?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4401.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b77d985-cc0b-428f-e4e2-08da90e52856 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Sep 2022 15:25:12.4571 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 6UXFp7dTJaLTAF3TkE0VZNkqyqqi2ST8T8IBFU4wMSPNiIzdCGkHavXisAb3NN6qFPjYeqageC+qWoYJqJc4fuZiwNB2mcZLS6UZIFowd7A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4731 Return-Path: sebastien.boeuf@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BY5PR11MB44019C42DBA0086856381A98EA419BY5PR11MB4401namp_" --_000_BY5PR11MB44019C42DBA0086856381A98EA419BY5PR11MB4401namp_ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Ok sounds good. Thanks, Sebastien ________________________________ From: Yao, Jiewen Sent: Wednesday, September 7, 2022 5:23 PM To: Boeuf, Sebastien Cc: kraxel@redhat.com ; Justen, Jordan L ; devel@edk2.groups.io Subject: RE: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices fo= r CloudHv I see. The is hard to let a base lib access the HOB. I think we can integrate this patch at first to make it work, with known li= mitation. > -----Original Message----- > From: Boeuf, Sebastien > Sent: Wednesday, September 7, 2022 11:21 PM > To: Yao, Jiewen > Cc: kraxel@redhat.com; Justen, Jordan L ; > devel@edk2.groups.io > Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices > for CloudHv > > I had a quick try and I've realized > OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c didn't have access > to the EFI_HOB_PLATFORM_INFO. Is there an alternative? > > Thanks, > Sebastien > > On Wed, 2022-09-07 at 16:23 +0200, Sebastien Boeuf wrote: > > Hi Jiewen, > > > > After I looked into the UefiPayload example, I have a few questions > > on > > how to implement things in OvmfPkg: > > > > - Do you expect EFI_HOB_PLATFORM_INFO to be extended with two > > additional fields AcpiTimerAddress and AcpiShutdownAddress? Or do you > > think the ACPI_BOARD_INFO should be copied over from the the > > UefiPayload package? > > > > - Is InitializePlatform() from OvmfPkg/PlatformPei/Platform.c the > > correct place where the FADT parsing should happen? I would need the > > platform info HOB to be accessible from > > OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c, > > OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c, > > OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c, > > OvmfPkg/Library/ResetSystemLib/DxeResetShutdown.c, and > > OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c. > > > > Thanks, > > Sebastien > > > > On Tue, 2022-09-06 at 15:57 +0000, Yao, Jiewen wrote: > > > One good example is in UefiPayloadPkg. > > > > > > 1. At entrypoint, the UefiPayload parses the ACPI table and build > > > gUefiAcpiBoardInfoGuid.https://github.com/tianocore/edk2/blob/mas > > > ter/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c#L23 > > > > > > 1. Later, AcpiTimer driver uses the ACPI data in > > > gUefiAcpiBoardInfoGuid.https://github.com/tianocore/edk2/blob/mas > > > ter/UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c#L49 > > > > > > 1. Other driver may also use the ACPI data, such as > > > PciExpressAddress. (from > > > MCFG).https://github.com/tianocore/edk2/blob/master/UefiPayloadPk > > > g/Library/PciSegmentInfoLibAcpiBoardInfo/PciSegmentInfoLibAcpiBoa > > > rdInfo.c#L55 > > > > > > > > > Thank you > > > Yao Jiewen > > > > > > > > > From: Boeuf, Sebastien > > > Sent: Tuesday, September 6, 2022 11:41 PM > > > To: Yao, Jiewen > > > Cc: Justen, Jordan L ; > > > kraxel@redhat.com; > > > devel@edk2.groups.io > > > Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI > > > devices for CloudHv > > > > > > Hi Jiewen, > > > > > > We patched Cloud Hypervisor to support both I/O ports for at least > > > two versions. And of course at some point users will have to rely > > > on > > > latest CloudHv binary (which we always build). > > > > > > One improvement could be to retrieve the I/O ports addresses from > > > the > > > FADT table. Do you know if there's some code already doing that in > > > OVMF? > > > > > > Thanks, > > > Sebastien > > > From: Yao, Jiewen > > > Sent: Tuesday, September 6, 2022 4:27 PM > > > To: Boeuf, Sebastien > > > Cc: Justen, Jordan L ;kraxel@redhat.com > > > ;devel@edk2.groups.io > > > Subject: RE: [PATCH v2] OvmfPkg: Update I/O port related to ACPI > > > devices for CloudHv > > > > > > This seems a big incompatible change. > > > > > > I feel this is weird to hardcode the configuration here. > > > > > > How the OVMF binary knows it runs on a new CloudHv or old CloudHv? > > > > > > Can we have a mechanism to detect the data at runtime? E.g. read > > > some > > > PCI register ? > > > > > > > > > > > > > > > From: Boeuf, Sebastien > > > Sent: Tuesday, September 6, 2022 10:08 PM > > > To: Yao, Jiewen > > > Cc: Justen, Jordan L ;kraxel@redhat.com; > > > devel@edk2.groups.io > > > Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI > > > devices for CloudHv > > > > > > Hi Jiewen, > > > > > > Do you think this could be merged? > > > > > > Thanks, > > > Sebastien > > > From: Boeuf, Sebastien > > > Sent: Friday, August 19, 2022 11:59 AM > > > To: devel@edk2.groups.io > > > Cc: Yao, Jiewen ; Justen, Jordan L > > > ;kraxel@redhat.com ; > > > Boeuf, Sebastien > > > Subject: [PATCH v2] OvmfPkg: Update I/O port related to ACPI > > > devices > > > for CloudHv > > > > > > From: Sebastien Boeuf > > > > > > Both ACPI shutdown and ACPI PM timer devices has been moved to > > > different > > > port addresses in the latest version of Cloud Hypervisor. These > > > changes > > > need to be reflected on the OVMF firmware. > > > > > > Acked-by: Gerd Hoffmann > > > Signed-off-by: Sebastien Boeuf > > > --- > > > OvmfPkg/Include/IndustryStandard/CloudHv.h | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/OvmfPkg/Include/IndustryStandard/CloudHv.h > > > b/OvmfPkg/Include/IndustryStandard/CloudHv.h > > > index d31ecc9eec..527c236f48 100644 > > > --- a/OvmfPkg/Include/IndustryStandard/CloudHv.h > > > +++ b/OvmfPkg/Include/IndustryStandard/CloudHv.h > > > @@ -16,12 +16,12 @@ > > > // > > > > > > // ACPI timer address > > > > > > // > > > > > > -#define CLOUDHV_ACPI_TIMER_IO_ADDRESS 0xb008 > > > > > > +#define CLOUDHV_ACPI_TIMER_IO_ADDRESS 0x0608 > > > > > > > > > > > > // > > > > > > // ACPI shutdown device address > > > > > > // > > > > > > -#define CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS 0x03c0 > > > > > > +#define CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS 0x0600 > > > > > > > > > > > > // > > > > > > // 32-bit MMIO memory hole base address > > > > > --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, = 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 5 208 026.16 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. --_000_BY5PR11MB44019C42DBA0086856381A98EA419BY5PR11MB4401namp_ Content-Type: text/html; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
Ok sounds good.

Thanks,
Sebastien

From: Yao, Jiewen <jiewe= n.yao@intel.com>
Sent: Wednesday, September 7, 2022 5:23 PM
To: Boeuf, Sebastien <sebastien.boeuf@intel.com>
Cc: kraxel@redhat.com <kraxel@redhat.com>; Justen, Jordan L &l= t;jordan.l.justen@intel.com>; devel@edk2.groups.io <devel@edk2.groups= .io>
Subject: RE: [PATCH v2] OvmfPkg: Update I/O port related to ACPI dev= ices for CloudHv
 
I see. The is hard to let a base lib access the HO= B.

I think we can integrate this patch at first to make it work, with known li= mitation.


> -----Original Message-----
> From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> Sent: Wednesday, September 7, 2022 11:21 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>
> Cc: kraxel@redhat.com; Justen, Jordan L <jordan.l.justen@intel.com&= gt;;
> devel@edk2.groups.io
> Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devic= es
> for CloudHv
>
> I had a quick try and I've realized
> OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c didn't have access<= br> > to the EFI_HOB_PLATFORM_INFO. Is there an alternative?
>
> Thanks,
> Sebastien
>
> On Wed, 2022-09-07 at 16:23 +0200, Sebastien Boeuf wrote:
> > Hi Jiewen,
> >
> > After I looked into the UefiPayload example, I have a few questio= ns
> > on
> > how to implement things in OvmfPkg:
> >
> > - Do you expect EFI_HOB_PLATFORM_INFO to be extended with two
> > additional fields AcpiTimerAddress and AcpiShutdownAddress? Or do= you
> > think the ACPI_BOARD_INFO should be copied over from the the
> > UefiPayload package?
> >
> > - Is InitializePlatform() from OvmfPkg/PlatformPei/Platform.c the=
> > correct place where the FADT parsing should happen? I would need = the
> > platform info HOB to be accessible from
> > OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c,
> > OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c,
> > OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c,
> > OvmfPkg/Library/ResetSystemLib/DxeResetShutdown.c, and
> > OvmfPkg/Library/ResetSystemLib/BaseResetShutdown.c.
> >
> > Thanks,
> > Sebastien
> >
> > On Tue, 2022-09-06 at 15:57 +0000, Yao, Jiewen wrote:
> > > One good example is in UefiPayloadPkg.
> > >
> > > 1. At entrypoint, the UefiPayload parses the ACPI table and = build
> > > gUefiAcpiBoardInfoGuid.https://github.com/tianocore/edk2/blo= b/mas
> > > ter/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c#L23
> > >
> > > 1. Later, AcpiTimer driver uses the ACPI data in
> > > gUefiAcpiBoardInfoGuid.https://github.com/tianocore/edk2/blo= b/mas
> > > ter/UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.c#L49 > > >
> > > 1. Other driver may also use the ACPI data, such as
> > > PciExpressAddress. (from
> > > MCFG).https://github.com/tianocore/edk2/blob/master/UefiPayl= oadPk
> > > g/Library/PciSegmentInfoLibAcpiBoardInfo/PciSegmentInfoLibAc= piBoa
> > > rdInfo.c#L55
> > >
> > >
> > > Thank you
> > > Yao Jiewen
> > >
> > >
> > > From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > > Sent: Tuesday, September 6, 2022 11:41 PM
> > > To: Yao, Jiewen <jiewen.yao@intel.com>
> > > Cc: Justen, Jordan L <jordan.l.justen@intel.com>;
> > > kraxel@redhat.com;
> > > devel@edk2.groups.io
> > > Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to = ACPI
> > > devices for CloudHv
> > >
> > > Hi Jiewen,
> > >
> > > We patched Cloud Hypervisor to support both I/O ports for at= least
> > > two versions. And of course at some point users will have to= rely
> > > on
> > > latest CloudHv binary (which we always build).
> > >
> > > One improvement could be to retrieve the I/O ports addresses= from
> > > the
> > > FADT table. Do you know if there's some code already doing t= hat in
> > > OVMF?
> > >
> > > Thanks,
> > > Sebastien
> > > From: Yao, Jiewen <jiewen.yao@intel.com>
> > > Sent: Tuesday, September 6, 2022 4:27 PM
> > > To: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > > Cc: Justen, Jordan L <jordan.l.justen@intel.com>;kraxe= l@redhat.com
> > > <kraxel@redhat.com>;devel@edk2.groups.io <deve= l@edk2.groups.io>
> > > Subject: RE: [PATCH v2] OvmfPkg: Update I/O port related to = ACPI
> > > devices for CloudHv
> > >
> > > This seems a big incompatible change.
> > >
> > > I feel this is weird to hardcode the configuration here.
> > >
> > > How the OVMF binary knows it runs on a new CloudHv or old Cl= oudHv?
> > >
> > > Can we have a mechanism to detect the data at runtime? E.g. = read
> > > some
> > > PCI register ?
> > >
> > >
> > >
> > >
> > > From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > > Sent: Tuesday, September 6, 2022 10:08 PM
> > > To: Yao, Jiewen <jiewen.yao@intel.com>
> > > Cc: Justen, Jordan L <jordan.l.justen@intel.com>;kraxe= l@redhat.com;
> > > devel@edk2.groups.io
> > > Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to = ACPI
> > > devices for CloudHv
> > >
> > > Hi Jiewen,
> > >
> > > Do you think this could be merged?
> > >
> > > Thanks,
> > > Sebastien
> > > From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > > Sent: Friday, August 19, 2022 11:59 AM
> > > To: devel@edk2.groups.io <devel@edk2.groups.io> > > > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Justen, Jordan= L
> > > <jordan.l.justen@intel.com>;kraxel@redhat.com <= ;kraxel@redhat.com>;
> > > Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > > Subject: [PATCH v2] OvmfPkg: Update I/O port related to ACPI=
> > > devices
> > > for CloudHv
> > >
> > > From: Sebastien Boeuf <sebastien.boeuf@intel.com>
> > >
> > > Both ACPI shutdown and ACPI PM timer devices has been moved = to
> > > different
> > > port addresses in the latest version of Cloud Hypervisor. Th= ese
> > > changes
> > > need to be reflected on the OVMF firmware.
> > >
> > > Acked-by: Gerd Hoffmann <kraxel@redhat.com>
> > > Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com= >
> > > ---
> > >  OvmfPkg/Include/IndustryStandard/CloudHv.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/OvmfPkg/Include/IndustryStandard/CloudHv.h
> > > b/OvmfPkg/Include/IndustryStandard/CloudHv.h
> > > index d31ecc9eec..527c236f48 100644
> > > --- a/OvmfPkg/Include/IndustryStandard/CloudHv.h
> > > +++ b/OvmfPkg/Include/IndustryStandard/CloudHv.h
> > > @@ -16,12 +16,12 @@
> > >  //
> > >
> > >  // ACPI timer address
> > >
> > >  //
> > >
> > > -#define CLOUDHV_ACPI_TIMER_IO_ADDRESS  0xb008
> > >
> > > +#define CLOUDHV_ACPI_TIMER_IO_ADDRESS  0x0608
> > >
> > >
> > >
> > >  //
> > >
> > >  // ACPI shutdown device address
> > >
> > >  //
> > >
> > > -#define CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS  0x03c0
> > >
> > > +#define CLOUDHV_ACPI_SHUTDOWN_IO_ADDRESS  0x0600
> > >
> > >
> > >
> > >  //
> > >
> > >  // 32-bit MMIO memory hole base address
> > >
> >

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 5 208 026.16 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

--_000_BY5PR11MB44019C42DBA0086856381A98EA419BY5PR11MB4401namp_--