From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web12.6199.1663215537285025965 for ; Wed, 14 Sep 2022 21:18:57 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=FUn39LkT; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663215537; x=1694751537; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Gjfdi3ik6+6JaKwrQXwyLKvD84t7Pm1s/aGvqswHGv0=; b=FUn39LkTLi1wP+HYqXhQh1lCkLI//9CIV3Xvt4LrK0s3TxBYs3+OZExa MC39CsCRhC5FErAWiZCsmnM21Bu0R/ViZIB1Ki4YABsVvTyfiRpF25kGu iolaNVayCfJru0zDbI4SFZ3kdUkItVQ3DtTzmQXEDT/RS4vBcquCndv0M 343sekHja8uCAjEFrRjfdcr8bz6eLy7EXwZoYdgnFunDK/P6OA1H78qzZ 7cM0QiTIlKuXIc1/PRCuQxdE3CDo0tPL5OFmSKaxctnSo3Vj82ouD9sLg PlxhXNsnbyXDY63du0kO962JScWpbhhi9BIaBw50F9Qs6qn8WGO5WGODj w==; X-IronPort-AV: E=McAfee;i="6500,9779,10470"; a="278335309" X-IronPort-AV: E=Sophos;i="5.93,316,1654585200"; d="scan'208";a="278335309" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 21:18:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,316,1654585200"; d="scan'208";a="945779515" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga005.fm.intel.com with ESMTP; 14 Sep 2022 21:18:56 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) 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, 14 Sep 2022 21:18:56 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) 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; Wed, 14 Sep 2022 21:18:55 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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, 14 Sep 2022 21:18:55 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) 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, 14 Sep 2022 21:18:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VJdeFW/n0xYaIes4YWupemw4xt4My+/X2QzjnhiR9hKgqMjkRXpuhhU8lmuThUFVKkdFRxsGVaELl8Shfx4ZYS0d3r8siARrC33je6+9o1atPjtboEUR87V+70M17RJeff/MY88l7j9m45dr4VKBf226LKfOrFvWsNIKlRmJO0CowiGf43VJF0GNhOUH0E9wRlg3NgIpPR4Hs9kQ5Hc1p8t/sby1JR9pDoLlqHB1RRYsWkcw6kxTZIwbFlsbGGLu+HeN3AlqGj6nBIqIXP0Q8g7/W8bsYnUGCKpUR3sPscZAdwaO1PMHxvSXugb4BGuWHKIdDFJ5TbE7YSrdCL/sEA== 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=m/6RzJkO+TX3B1aE1WqYj51ZqseSGfgJEZpK4f+DXxk=; b=cxU9+2GiwQiDL7ARkkmyIWefpfyZDXGrp5NsGVUUuf5CnXRUvYXi8+McF1SVlsHk6GHl8nkmfcLZgNhBuiKcWISxSjzJ7tYCI0/Ctr0pN+qxySYlMFNtozcgD2CWR0UmcT5dvLkHbteD+Gv/n2OXbEXa7c97I51gQS2/QovzqJdUpOoab5nPZV5+3i3gZhAdq7SzczdCWMfkn+oOTGteufiwBzCmD+/xpdBCzBdoEuM0s1ja1nYCAp4vLSeDC8LhglRlg/l3GNd6tXH0s+ffMujzzKHBbNlMbfcgpe6yRlW9w8/Fae1Oy2JMB4++H60DOiPUKkw2OC7zy/6KYCH7Bg== 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 DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by CH0PR11MB5394.namprd11.prod.outlook.com (2603:10b6:610:b9::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.14; Thu, 15 Sep 2022 04:18:54 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::1167:1c79:220a:eece]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::1167:1c79:220a:eece%4]) with mapi id 15.20.5632.015; Thu, 15 Sep 2022 04:18:54 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "Czajkowski, Maciej" CC: "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg/AhciPei: Fix MMIO base assignment Thread-Topic: [edk2-devel] [PATCH v1] MdeModulePkg/AhciPei: Fix MMIO base assignment Thread-Index: AQHYxHeH5Z7MhPEFx0CZx+t4X+3LW63cy8QggAMfuIA= Date: Thu, 15 Sep 2022 04:18:54 +0000 Message-ID: References: <20220909181055.1237-1-maciej.czajkowski@intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM6PR11MB4025:EE_|CH0PR11MB5394:EE_ x-ms-office365-filtering-correlation-id: f9bcd88e-d01f-467e-863d-08da96d166db x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4SdnJ4d7sDDeeBb/NaNhjc3BtJ4cZ9GMhZ1RPHQ78vws2X7KiK04U423dVjw2gIVFtPHzDV+Cgh3R0FcrXUY0cvWbUObL0Cu/9Ewo61Dzfqs/mWoWtLvxR1rKqfEqitgSJKthB//rzmMyou5c5OGrWlQFqpAFgXOm6Z40dFBsVFLWJiIjYR1PDNzGFtAQg6bBJaZEixT39kzhGuygoAEafHcxcNgyDK0vsNcqkS2F9ANZFvPeG/k5a8J5d25MDLxDxbGVT1gYv02PkoK/2yFMimNBDbrdaxYG4kDRgA8vxBZyxrUohbOPJvKyjCMoar5VdFiFc4LAj3JVdwV2d5F95Px7xP6CH6FH5Ous6c3XX+JxztP5PgveJYjip6HCrFxdk5p0oTMiHjjZkRsQ2SABSkcVtLKaSvwzAZnus63a++r58fdNv6AhuZbyK8pJBE6mWmazzXm/iJIQU6TFsPH/L1FacGajCAxJwD+Z5wRcJUUN1M2ghY9isVTQWiZP8KV1BdTFdKPbIKOrhJ8MHhI8SPSUkXhTGpnfYg4yaheoLmimg99AT3YejoKNAishQVfqQDDRHjgW+4O7yBgfFyS2CT6wo8LrY5OSQHgrJj2j+Wqe7ypyf3ShOfZZhhyu9mhJ/mJOv+JzsrEWENpa8Owh1d24Vzw/plULgv6W+aU2/NsMr7DqJAwW5MjODuTH2b4tzgbb3O6PM1rtq93EEM3zXVs77+3pwsNX3cOKTMdyR8WqjeSfG/GBFELcRUA5dntzyW6Ia6Gw0qPkMKIfEgHD3wC9rfkvfemrR+GhzBuE4GgR1UYYyQlHzJx1YKePqFH9rgSnnMnxp2LqXEjLTOVZg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(136003)(346002)(376002)(396003)(366004)(451199015)(122000001)(33656002)(82960400001)(86362001)(38100700002)(38070700005)(53546011)(7696005)(2906002)(6506007)(478600001)(107886003)(966005)(41300700001)(9686003)(26005)(83380400001)(71200400001)(186003)(66946007)(5660300002)(64756008)(4326008)(76116006)(8676002)(55016003)(316002)(8936002)(66476007)(66556008)(52536014)(6636002)(66446008)(110136005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?970YObdLGx5fjciN1FKZg6a8mB0+3ya+V9yofsaJOOY+VqsEKb1b4TVVLwQg?= =?us-ascii?Q?y0y8sfaYV+/zTpCsLvXUu7bt42CPhDccz3A4ffWKfDNHCFcxiGiNdWWvEP17?= =?us-ascii?Q?qN8+ggOlePEaBjvWIN6e3Vg27BcplVnNdaB4ASHCiuUFAvcp29xoUfzMSkWl?= =?us-ascii?Q?6bd5dbuC9pR0e0weCUlz53Ee3m4M3EM3vqCQLJjGYU0g9Mu0h9QaBot6BgFZ?= =?us-ascii?Q?wS+Jl4swJfXlCXdCGIQsf0s2GQe+JmPaDsU/8wPkh+cNV0mGgEQiDYhZuA1+?= =?us-ascii?Q?D13tBvnSup0MmUhzPFbzwOThw/d6HxguCH1tQWabgxxJjlgHesP2/bUB++5M?= =?us-ascii?Q?fM8L3kUlUFDkovFrTvH+CimhNug45ARyXpS4MU2r+bf45M/4ogVhs/ubg77W?= =?us-ascii?Q?kBolTeVveI6mXVSybQiErV9/hPLxi+3eXgawDw/vokKcOwkliVstcOAahv3p?= =?us-ascii?Q?Er2oFBFNyrUT4kKfJVfJOcwu7wjWFazpYDpj/yb9+S5Ex6LxlDZI6xHEeDDs?= =?us-ascii?Q?H/ZmFKUbz9o/opzAEqJRwvURbRPYNf90xKEJY9M+3URZWyD8a0gCivKYxE8Q?= =?us-ascii?Q?wgsTfliMkzKpSTskcso5PnYOi15zbz3lGClGzaAL+HmfmbY5A28lxpL/MwPU?= =?us-ascii?Q?7fdGjDPw9mSFwD+P6kOiKMiwwBQy1jq6MC9wFhralkaZo48J//KJAARuhFKJ?= =?us-ascii?Q?yJfCMHI4qDqnpDU4Tq6qFzml9hWleeRs+mL7jf2fLjxUK84fxdcgVTTjrBxA?= =?us-ascii?Q?YVfNKZYT/mbKBnwpQFgRdLgqBd9a4Cq0Jx/LbRCZtI6uScv7enrlaojStHXc?= =?us-ascii?Q?/e28XNPwJuVYb5Vn6IZLqH2siCKq1mL4DURxrlzIzCNf32GbGWFDfvVgWVwf?= =?us-ascii?Q?v2PXierki78InbluWT3wYPEjfeljIzMgWrMH0WXYee7/zXXK2h9L/Qj02LL8?= =?us-ascii?Q?ueBeCGU6zjWfKrV+YKC6OhJPXbq3CcscEzTzFkkzvvoQrvoqGYUCjIBI/LxT?= =?us-ascii?Q?Uv/BfTz8HM1wWd7+jUB9cE2JuMV00Oib8ckgpSlR5nGPZaR7LgV5cQzeTSJF?= =?us-ascii?Q?k0Ftw2nNxonjfXUTnObqGU3X371IXkUdPwGdK1AS5TSsUrdRlCGv5z2GW61y?= =?us-ascii?Q?YZsFPa5X+qns5QfwZseXr08cZPuW7UVykx0xws9CFefhv0uIbngEEBD63VXr?= =?us-ascii?Q?ybKWHP+gaK/yRrgHuMj9Lu8RfU65wkD55T3nPmwxbYcpaDnFBw12yEWKYcgf?= =?us-ascii?Q?o97Iyx4voRCSVM+JiS+p8ggpi9cwvi8/spNenKqvCelNZs24DdP++WReqxeX?= =?us-ascii?Q?Li1oIHyGDq7H7TaeaOinw3MzohfUlaVQh1ulAG3aBwkLJwF7bq6oqogmVtTg?= =?us-ascii?Q?xp7y/nVnNCo3Dex8Z1X33RTFOztMev60lSIFruAo3H8YyuGSmXDW1/t2dPFk?= =?us-ascii?Q?gDlFiCTPjQQ6pexSRgiVfC4Z1Yq4Q6f1SP7Enr+lGa25c2ozq56m4Wh9d+vD?= =?us-ascii?Q?ItcAb7mRBwW/MzfTQO1BVsGH25Obk2ahNXyE96UQjeCkW3yDq/QY8dA3Yayt?= =?us-ascii?Q?90DYWz1xsbOIYWWJSlFBl4p4cpeZ+josJ+WaVC0y?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f9bcd88e-d01f-467e-863d-08da96d166db X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2022 04:18:54.3871 (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: k/SRHlRZv3XlFvhoPcpplUoTBp6HIl7njI9s98FTBKcy8SMZYEMC8suWeozO+teDheeg/Hl63DhrK6U0bix50Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5394 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed via: PR - https://github.com/tianocore/edk2/pull/3338 Commit - https://github.com/tianocore/edk2/commit/1dccbd1a382aa57719e4e0432= b3bd6a03a888507 Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, Hao > A > Sent: Tuesday, September 13, 2022 12:36 PM > To: Czajkowski, Maciej ; > devel@edk2.groups.io > Cc: Ni, Ray > Subject: Re: [edk2-devel] [PATCH v1] MdeModulePkg/AhciPei: Fix MMIO > base assignment >=20 > Reviewed-by: Hao A Wu >=20 > Best Regards, > Hao Wu >=20 > > -----Original Message----- > > From: Czajkowski, Maciej > > Sent: Saturday, September 10, 2022 2:11 AM > > To: devel@edk2.groups.io > > Cc: Wu, Hao A ; Ni, Ray > > Subject: [PATCH v1] MdeModulePkg/AhciPei: Fix MMIO base assignment > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4041 > > > > There is a mistake in getting MMIO base using PciDevicePpi that can > > lead to the data corruption. > > > > Cc: Hao A Wu > > Cc: Ray Ni > > Signed-off-by: Maciej Czajkowski > > --- > > MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c > > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c > > index 98dd732a4023..47367f43f73a 100644 > > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c > > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c > > @@ -405,7 +405,7 @@ AtaAhciInitPrivateDataFromPciDevice ( { > > > > EFI_STATUS Status; > > > > PCI_TYPE00 PciData; > > > > - UINTN MmioBase; > > > > + UINT32 MmioBase; > > > > EFI_DEVICE_PATH_PROTOCOL *DevicePath; > > > > UINTN DevicePathLength; > > > > UINT64 EnabledPciAttributes; > > > > @@ -454,12 +454,13 @@ AtaAhciInitPrivateDataFromPciDevice ( > > &PciDevice->PciIo, > > > > EfiPciIoWidthUint32, > > > > 0x24, > > > > - sizeof (UINTN), > > > > + 1, > > > > &MmioBase > > > > ); > > > > if (EFI_ERROR (Status)) { > > > > return EFI_UNSUPPORTED; > > > > } > > > > + MmioBase &=3D 0xFFFFFFF0; > > > > > > > > DevicePathLength =3D GetDevicePathSize (PciDevice->DevicePath); > > > > DevicePath =3D PciDevice->DevicePath; > > > > -- > > 2.27.0.windows.1 >=20 >=20 >=20 >=20 >=20