From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.5444.1685503782041103503 for ; Tue, 30 May 2023 20:29:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=QdC3OH7q; spf=pass (domain: intel.com, ip: 192.55.52.88, 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=1685503782; x=1717039782; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=RI/LW8FUnsDmQWW3t8kvDsPJDM5dBQ9cPfII4HdJxgY=; b=QdC3OH7q+LnldSUxqo1mZn19EHQ+9+B5XQ0swPucia8mU6sFcGFDRNYH ZqZ5lgqY/r0x/xEdKgmrrIfAIT4t7WQTnoPFVGCN9HWl9F+aa6n7R1qHu fxreIWqYukVg6wRh1MH8obYkF6rS5LqRY8Q2PVZPEweEEzaSuQPc5fzHh 4JbeUxGnrXaFxNtSEKuypriq/M77LHquat4qWu+d3CO6ef8ztPBr9N3Zp oRWsYcOHxRWuO9dYnzFxj/cmWMTutovI8TR17NjZbF9KCN/YjV51yWO62 Yxgm4q55i0GTUx8/AowdIvtxCgjaalh6Zkp0SoulzEkuRL4mt/OWUL9ED A==; X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="383381745" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="383381745" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2023 20:29:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10726"; a="819103446" X-IronPort-AV: E=Sophos;i="6.00,205,1681196400"; d="scan'208";a="819103446" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga002.fm.intel.com with ESMTP; 30 May 2023 20:29:41 -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.2507.23; Tue, 30 May 2023 20:29:41 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.2507.23; Tue, 30 May 2023 20:29:40 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 30 May 2023 20:29:40 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) 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.2507.23; Tue, 30 May 2023 20:29:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GhG+Cw/BVlW9d/LCXAiPVA8d3HqyanFJHtOS3b6GgKzlTRt5mL1LTkwr8Hm7iHjShif/yXdQfgZ44wQAXKCNamT7cE146R4361AxfHfEjHNTCwkJJSIisVCv88YO9XlAFvfZoSuIur8EsLZph4+++U5ao+ye+17CNkjMulwn8WUNIgMIC7CYcq+baNUrspX2pyzTjZ6QL5P0Y3DjGKybwYV3yOcknsfyqUvb9RYX1k8sRfeTbiNEnL6fqR8klr7RdqgJY0Trep/L2XtmmFiOXz6vwohbjFOIJI8e4RC0KIjAKueq69/DGfB28dQCGbDyKUkh3hKaX0e8xbsuZ7k7OA== 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=3oe7l14k/cNsWco1tbTSjT+Iov9dLRK9OGw6/OYx6+k=; b=OlXjys+QSRhO3/bdB71gS3Q23/YOO2TsLweJspfnCXKW1qV3FG+BGX5BxcUDzAUjgO3wkOUNdn3TH/G3e+cGTf5+T3zGOnqZ7yAoItMEGHo1q+wr8hDpwDgjQ/7/UnMyPzGc+RwOi321KoO7r/ylvuKF+tGmWFZFAh3efg5uhH5zm5LNP8xpK7Yj0YSFm6WqiG895fElnYxrpU82nC0D/GUxQkr7ZwWK6fGEalIN7wlB01xSSAfhIWmwEfJLbKLciS6cbIYIsdR0/Cc3eNgxKdf6Nn+xYyF6Ixh4Nle2ISK7pd0CZpcVCve1x3qebH5pjA0lncWhfPDnQyG6TFxhFw== 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 CY5PR11MB6317.namprd11.prod.outlook.com (2603:10b6:930:3f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.24; Wed, 31 May 2023 03:29:33 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::ebdd:c7e9:13b2:437b]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::ebdd:c7e9:13b2:437b%7]) with mapi id 15.20.6433.022; Wed, 31 May 2023 03:29:33 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Hong-Chih.Hsueh@amd.com" CC: "jiangang.he@amd.com" , "abner.chang@amd.com" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM Thread-Index: AQHZjaEROuhuDY7qr02+W0SYB4rkMK9zxJ5Q Date: Wed, 31 May 2023 03:29:33 +0000 Message-ID: References: <28f72c221f0c7f84e6d992b434565107cdb718b4.1684858126.git.Hong-Chih.Hsueh@amd.com> In-Reply-To: <28f72c221f0c7f84e6d992b434565107cdb718b4.1684858126.git.Hong-Chih.Hsueh@amd.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: 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_|CY5PR11MB6317:EE_ x-ms-office365-filtering-correlation-id: 761db38c-32d2-4839-b87c-08db61874058 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hjmOrYkeE/wgWzTw29OH/BT1iDHQCBCkV+S2VjejoZgz9TdtJyUbifswGFRYk4GTK43QfJFU5rB3/0bPcbLtf7xv4AamdslmY5FAQWxXKZM00ZykZUOWNckAIvjDkcJhCJHRHG61X+6b/zFSPVf67IN8xkYbs+5PJRNp1j/vc3xv8iPnBQZgmN+wcA4Z761ggsdGAFre7iJm57wB8XkEmeEQs35Oup1mEc+HNSODHllHsGnJaOWzS4M4vUKpKUtVhnzNoa3PdwE6vEUsqUNyfusVWrJq9vIFmTYyWTcCPq7GbGg5Wmrbb7txQZgQFDxU3TvYc+2Zdv4H/4EpcUlPKlhOZt6v4lM59xK4L8dAHiD+hRPCQ8fdM+EasiFnVjf3ungVyZb1+sASgRi9j20o51B7/OMBooF9NBOO8MpB6Z7rDcjHMufjMHTNE989Uen0M7buOxrG+yLa+yFKB49mti8DP8aiS5P21j5EwlHKgjQ0912+pHHkqZt7fxU4McuV4nw60LrYzJqsvyHMqcAe+FSl4bx7XuKW+NiiuoObY4A1en2rxsonL4h2UuMk7OFIIkXaDY4Ac9uXB9s3ut7ZHz7WVTXg7Tkz+ItxKC8O3TidfXClK2qFAgTSLRKU/0QkxNFWyAzfF/mj6Sak904sgA== 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:(13230028)(346002)(366004)(39860400002)(376002)(396003)(136003)(451199021)(5660300002)(52536014)(66899021)(33656002)(8936002)(8676002)(966005)(110136005)(54906003)(478600001)(55016003)(7696005)(71200400001)(38100700002)(316002)(41300700001)(66946007)(66556008)(76116006)(66446008)(66476007)(122000001)(64756008)(4326008)(82960400001)(186003)(83380400001)(86362001)(38070700005)(2906002)(6506007)(9686003)(53546011);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YuhjINL0nC11KcfHjXHDIikIDNYrFFonJxSr7LCgRaeycqEkR7wlMpdmVcMx?= =?us-ascii?Q?buljSBPfDRwhzbsUC2khRjLmk86lpLDkjM8UT6TtjHM9pwrP5tu03YJ69XSK?= =?us-ascii?Q?TmvmcmUbdWuCXDHF5oOyVOvJ+dRUeLJ2K5MXXOCPetpHev/twSFQrETavGlB?= =?us-ascii?Q?kQb7Z4lFJEcDQJCe5oGPp22ZBDQtG/vR63PsMlO280ep9tWNnIBwiiboW14B?= =?us-ascii?Q?/6ZQEDiBpDDV64hqp1chR0fpuPXiIKofEI81t8XrHqYH3fX/YDV31WOvBZxT?= =?us-ascii?Q?rCG3w9n4uoSRSwsmYLI1OgVFpOVrNkA7erNWLoWm+QeTJP97oWXMtT6m/tag?= =?us-ascii?Q?/vD8lt7fGFwsMYAobY01wXetZcnwuQPRoMHnaa8Tdn+PLnH97Gn6sJ3imQiV?= =?us-ascii?Q?hwb81Aa99Xkdpn2K/fjdz+IN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=?us-ascii?Q?In9f5F57zVdtQBfY4dR1MnSHLRhghqfrWM7u9Qu6AqmYhB110C5VxtvnMzou?= =?us-ascii?Q?irtNcbML2AOLwJXO5ZNK9XV9U53aRN2soom/3Cli+hRTDOH6VnDqV3KCiy4g?= =?us-ascii?Q?FObU1OEKaGSb28xLwC7RGcq4hVNmLy5i1GNnfM8ijLzWdpTB8gOYtuqLnIGO?= =?us-ascii?Q?p7aG2UHCpq2HZh3gQVAQ12pbknfu0azUSyQKp0V4gOQPrcpoxzksnKA4tw?= =?us-ascii?Q?=3D=3D?= 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: 761db38c-32d2-4839-b87c-08db61874058 X-MS-Exchange-CrossTenant-originalarrivaltime: 31 May 2023 03:29:33.0571 (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: KNfCne6OhNWnb+uxiz8w0R9DyE1QGyKho6aTbMQWfRpXSkhHPIgC0ut/BBvSiyXC7gsxrqmFK4kiCRHhhOKkZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6317 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 Thanks, the code changes look good to me. May I know what tests have been performed for the patch? Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Neo > Hsueh via groups.io > Sent: Wednesday, May 24, 2023 1:07 AM > To: devel@edk2.groups.io > Cc: jiangang.he@amd.com; abner.chang@amd.com; Neo Hsueh Chih.Hsueh@amd.com> > Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in > AhciPei PEIM >=20 > If there is no port multiplier, PortMultiplierPort should be converted > to 0 to follow AHCI spec. > The same logic already applied in AtaAtapiPassThruDxe driver. >=20 > Signed-off-by: Neo Hsueh > --- > MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c > b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c > index cd55272c96..7bd04661d0 100644 > --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c > +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c > @@ -3,6 +3,7 @@ > mode at PEI phase. >=20 > Copyright (c) 2019, Intel Corporation. All rights reserved.
> + Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. >=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -92,6 +93,15 @@ AhciPassThruExecute ( > { > EFI_STATUS Status; >=20 > + if (PortMultiplierPort =3D=3D 0xFFFF) { > + // > + // If there is no port multiplier, PortMultiplierPort will be 0xFFFF > + // according to UEFI spec. Here, we convert its value to 0 to follow > + // AHCI spec. > + // > + PortMultiplierPort =3D 0; > + } > + > switch (Packet->Protocol) { > case EFI_ATA_PASS_THRU_PROTOCOL_ATA_NON_DATA: > Status =3D AhciNonDataTransfer ( > -- > 2.40.0.windows.1 >=20 >=20 >=20 >=20 >=20