From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web08.673.1662603784849249151 for ; Wed, 07 Sep 2022 19:23:05 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Qyxcy4h8; spf=permerror, err=too many SPF records (domain: intel.com, ip: 134.134.136.100, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662603784; x=1694139784; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=ixO3ZjbdLDOEyjpO3zP1ajbFQxn7hKSksfmZBdrYltk=; b=Qyxcy4h8RRoWoJYp6+QMIG3+KIvtAuH+BUxvXIi+5fCT/4RJOIGmwFxS J9DLRT5EALLzL57DY7nSwIesewxnJRXCpRiKRQp61Vu58+ydiZRCn6ZXL gYP76XlN6Vl8KOpk6KhLklEAsixid7VdvTY/6iRHBRZjocWF6W0NMkRdy C5H8tZ0xRSNzWnCJ58BmGfGXGAHICcRhamGdHegh9M88CCgdPl01vEPPU TPpuqTOtyEtJgV1Euq8j6SviOxY+6IJU91AFYwt7MoCiAd96LuqjixQkq 9ZcCRzZoXdJScYZ8v6WGcoUCbh7v161jINyioCz5FowOp6IJsZsEeoWPY A==; X-IronPort-AV: E=McAfee;i="6500,9779,10463"; a="361008082" X-IronPort-AV: E=Sophos;i="5.93,298,1654585200"; d="scan'208,217";a="361008082" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2022 19:23:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,298,1654585200"; d="scan'208,217";a="614710370" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga002.jf.intel.com with ESMTP; 07 Sep 2022 19:23:04 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) 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 19:23:03 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 19:23:03 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 19:23:03 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (192.55.55.68) 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 19:23:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nE5iE3WIWRgTOzp8aSiim7m2VWcx7RUf+BF8fnoTSj4X/0OCibmEl4NU70D/yhfsIZ8BMTShnqAX7mgZsa2oke3U4ckLczgaHMYDG6mcdtUyCQBMPVUTaQ0yb7n8gIMBG2X2OMMWcu7xlIc7eZAiO+GGtS+dfzW06mTovR2fAHf2j2i/oKS//6XMnQEPjBUF6b631oQE49fRKza78JaD3+q7VtdOlKp4a9ZFCCx1AQbaLjIlAdo+QKBpfttDPZWV3n2cw5t0DA77wSOtqpse1gGJNLMgVeaz8AIrXTfnOcrX5/vf+rxruGBPHpX9tJcIjwtU6HPU2LbWH/BsjrWVbA== 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=4UKrOtGIL9ZQ1dF474ERrUoup5SsWRb+zU34Ot2XHyA=; b=nRmyh9OplWrM/pYQPIYzttQMu5Z7m3Psts4NCqkJY1D+kkeq937CW4qQYq/WpK9zkc9UbGl1Sh2pX0B8f6HfptghhztpIaokQbMyZoNi60RlfLNoemC34VpCZhrntAuipRax6w7VUmZUoJdjQUeZl06KSLhRX+TJaNue2ylhTDmnjgAoipo9/2ZjJ0TILysdQ/NN3FKG99SiB9lYP9yfeJFSFA3QDHXDBrkvkP1by3xMjKBxAjrBrz6BeHlnZIiY7wwKCCBC0KW0bMGIYJ3Jsq+/ZSKngl64MtEnSEWUwS0W4JIC5UJ7CEt76f/AephorkgbLzfYKe3f9YRzELRfPA== 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 MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by MWHPR11MB1822.namprd11.prod.outlook.com (2603:10b6:300:111::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12; Thu, 8 Sep 2022 02:22:55 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::2080:d65f:9c32:7749%6]) with mapi id 15.20.5588.011; Thu, 8 Sep 2022 02:22:55 +0000 From: "Yao, Jiewen" 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 for CloudHv Thread-Topic: [PATCH v2] OvmfPkg: Update I/O port related to ACPI devices for CloudHv Thread-Index: AQHYs7JjJ07IYAhL7Ea6vqAgQtyOYK3SjLmAgAAD43CAABYSgIAAAutwgAF52QCAABApAIAAAFwwgAAArwCAALe6AA== Date: Thu, 8 Sep 2022 02:22:55 +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: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action 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: 00ce9e13-24bd-4137-268c-08da91410a51 x-ms-traffictypediagnostic: MWHPR11MB1822: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: tvDdgMfiajrLfLSyCu6/Jkhnq4ifXia/V9GQ6Qaue/sCvjR26kYB2UxDxvuCGRKOFg6wCjYnGhsTRteBX9kBtukcd2JutVRuwJcX0/oMJeVD8aUW9NOEal4eaLaN4pb1uSOyif2Lt4fG8UHwVJ6nYknhQD14WfA1RT9V5kYF59jdx4CVYGlbbx/lkZVY+KKmhBkkAm1l1w+SGCAPCXezUdhHrE9UmDpBp4whoZ4gy6MVX9Vk5Q/e+G1fZGlO2BzP8AzmSswY/26HXZPxDVS4kKHCJ8BLNlQxXATc9r02IphSiMQqYCxJsmMxVkLYo1mETaN+hq3UGI2qcVtN7luscEz34Kb/PNS2GINzXTX7fNkOEOCPedWmMjBTafVs89kAVSIKg+GV1fFgxUYZuyBUEwMcBVz3R7dD7jQjALpgVta3pBBtRnhosoDrCBwTzDnipLg4xjAkNb52a8XVU4Rfblk5Djc/DSgVOONjCajOi8HYWwICpQmkyCmzEaeYQD2Yv8AqVX2t/PT50O8w8OMAJiBDrlEWTVJ+UNHKvO8J6U276Exo5AZYDTeA97m4RaYkCJVAqZHlnr6lMhAPR2g+ZYEwkhk5ozr1edzcLv4iXJFdbZ57Qr4mwCmL6nI27QiOWaqTMaizM7nw9xhXZiEI0DltIFvZ9LOULZ4NomP0VApAxO/uynF3qgoz7s6DI5/+MbQutqxX8GPVo4jOySuT7HXvGRjsL55GWqO2MPq24m8uOjV/t6CAR0ZIjuOx9dkz+4tch10PO9cC7m/6GAp3Yk3zKNEaokvSHNJVZF1dmSnEgvTQI8Mjn4oAaBdZiA5bbX/4cthMdshSHcfnRLLlhw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(39860400002)(396003)(376002)(136003)(346002)(366004)(55016003)(2906002)(33656002)(6506007)(7696005)(26005)(9686003)(53546011)(15650500001)(86362001)(64756008)(76116006)(4326008)(66446008)(66556008)(66476007)(8676002)(66946007)(52536014)(5660300002)(8936002)(6862004)(6636002)(38070700005)(478600001)(166002)(316002)(966005)(41300700001)(54906003)(82960400001)(122000001)(83380400001)(71200400001)(38100700002)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vmz8xCKpAAgE/uAXnpwh0L4aEqof7LnQvQSjfiW7n+elSI+cS72wrwTf9+aU?= =?us-ascii?Q?WVvRRfDyuyCHOLQ5GrtFmYOWmZhztSageMhfYe/NJpDPPA6aHIO3PcAesqw/?= =?us-ascii?Q?H053V3l7/VWEcdQEio9JeWFN08CLYyd1pyIQxrvO4pT11yljlzs1qmYAKO3L?= =?us-ascii?Q?N+DWcqqra1JE5TBudWjAuxqOvJiVSjCqQgEY27eJoyFeKA2pb0BztXNnCHY5?= =?us-ascii?Q?8UTH2YvBTRy8BeY+f0hmFoQlo5U0QpkPWeLDdyol7OU4N68QSn7SeL//N2r6?= =?us-ascii?Q?B9VYvyKpayACV2Fq6aOa9NRAvRWWVZLVk1ExdSzFQD0yKTSdnKecQ57yrfpe?= =?us-ascii?Q?ZnRVjY42kVenq4fjl76IELvxbcRp7mpTkZciz7VkeUZKu7Y1aBlMRz6QYa3X?= =?us-ascii?Q?+czvtus/o1YQGF3P3dSgC04pUnVI9lLWl6dJGgWIyZAZdTwmlSnauMmTuV2G?= =?us-ascii?Q?EQ+KlF/IisTay9UBrV5IKPAe2UQCgnZ0xBzmoUZcH7ZdPEZNRbUjt2Bkag/K?= =?us-ascii?Q?Btp8zgDJo0DcYvpbHNsZ2PJaL0ar1K6xw77bkTl71lrJnXtdSd9HQVei2vY7?= =?us-ascii?Q?9Z2d8R+bo1TTw52VRmtDnJbIvDArgqFyGDG6w7gg9V2K0YU6mtDPdBSUBAV9?= =?us-ascii?Q?DrsHJ35fkdECmYmdqdQ1v9rL1zlZ+kV/752yE/EvwZpYCxeU+Mu77XZWMLEL?= =?us-ascii?Q?I3LhwSxCLDMh0tnVNjcNl+irHBTxeMRSJXNobRurqX9mTpzE1wo5TqRoQcXm?= =?us-ascii?Q?C+9n9gZM4GwqUpgIPTTm8UPzsjOTxAR7lnj+1J1ggn8t1eAA6WvSVlwBQab7?= =?us-ascii?Q?D2i6pqQGzhl4Rc+YbgmvNR50BlsZ9ti/QBTc2FTGx0rq/7KURoLzYN0tjXR8?= =?us-ascii?Q?rbNHVzWAvuqGnB3BD69+SRxTtLT7nGhosaC/t6PxfJOY6HRwu/TNHRxWOZ9O?= =?us-ascii?Q?8qd5Ob6NCMHhUX0wqRZZC5JHY2bzfFAJ8345n6yR2Crkbh0PfY6RK7X23IGX?= =?us-ascii?Q?Ye48hTs9FdyRFxuUaHU6TdrWGY70xgRlVUqOyrbf2bxK7aE7dNL/wVgk+O/a?= =?us-ascii?Q?cF3U6VCZ3GmlO1Ng4Hacga7iYV1nkEPt6MjzO8EAmA2EU4UBtsxTT6UX9+0V?= =?us-ascii?Q?tgBW2qoFFwJVZWOGLm4mBL4KlJY1W67JpuyrqKHz5DSdNvCub/g7ppyIV1DA?= =?us-ascii?Q?1yTU5LvTz6lirvzFxj6pUzHlqtg/xTAoq0TDktzq78ryK10SpzFk0sggf7OZ?= =?us-ascii?Q?gRiadVIgDUxL8MyFtAYzCiM11RFrymH1uiaJEIXJ4SSmc5Ouy1cljMu3Ja3h?= =?us-ascii?Q?gIT36zKP0VMFZaUMzvVkN5OdciMmBti4bKONEXLU5uiYWLV7tXKo9Qg8IFp0?= =?us-ascii?Q?+QSdXIaVPToTzU9rilXghAyG4AxBGXoMpomlJrH1jYgKE7tkxuk8QmKdr4X0?= =?us-ascii?Q?Bv/oOi5eBj8sXS4TRWo2gb19lTnNv8H3b4yn9aqeRdzzejCT5lPLGDE9NR2/?= =?us-ascii?Q?FFX4B6y006X9i7vfRcf+gVChw36pxdDccXF4Ds2R1LToqDu0yhxKdQRin3Vt?= =?us-ascii?Q?NIy1z+CZB8oJ5vn7GSfeySC1eRZfPrsQYRs6tKyd?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00ce9e13-24bd-4137-268c-08da91410a51 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2022 02:22:55.7713 (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: JKT/ruX/o143Pzqp0pOSy1xAa913sKCBXsDwoy2mSttKJRwD4OLPYeIFGm9LvwdXO+kbkV3JnOJrAVEskxAf2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1822 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_MW4PR11MB587250792A73ACB56D0865178C409MW4PR11MB5872namp_" --_000_MW4PR11MB587250792A73ACB56D0865178C409MW4PR11MB5872namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Merged - https://github.com/tianocore/edk2/pull/3317 From: Boeuf, Sebastien Sent: Wednesday, September 7, 2022 11:25 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 fo= r CloudHv 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 > > > > > --_000_MW4PR11MB587250792A73ACB56D0865178C409MW4PR11MB5872namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Merged - https://github.com/tianocore/edk2/pull/3317

 

From: Boeuf, Sebastien <sebastien.boeuf@in= tel.com>
Sent: Wednesday, September 7, 2022 11:25 PM
To: Yao, Jiewen <jiewen.yao@intel.com>
Cc: kraxel@redhat.com; Justen, Jordan L <jordan.l.justen@intel.co= m>; devel@edk2.groups.io
Subject: Re: [PATCH v2] OvmfPkg: Update I/O port related to ACPI dev= ices for CloudHv

 

Ok soun= ds good.

&n= bsp;

Thanks,=

Sebasti= en


From: Yao, Jiewen <jiewen.yao@intel.com>
Sent: Wednesday, September 7, 2022 5:23 PM
To: Boeuf, Sebastien <sebastien.boeuf@intel.com>
Cc: kraxel@redhat.com <<= a href=3D"mailto:kraxel@redhat.com">kraxel@redhat.com>; Justen, Jord= an L <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 HOB.

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>;
> 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;<= br> > > > 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>;kraxel@redhat.com
> > > <kraxel@redhat.com>;devel@edk2.groups.io <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 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>;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 <sebastien.boeuf@intel.com>
> > > Sent: Friday, August 19, 2022 11:59 AM
> > > To: devel@edk2.group= s.io <devel@edk2.groups= .io>
> > > Cc: Yao, Jiewen <= jiewen.yao@intel.com>; Justen, Jordan L
> > > <jordan.l.ju= sten@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
> > >
> >

--_000_MW4PR11MB587250792A73ACB56D0865178C409MW4PR11MB5872namp_--