From nobody Thu Apr 25 04:02:09 2024 Delivered-To: importer@patchew.org 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+105204+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1684864867183493.81386402855776; Tue, 23 May 2023 11:01:07 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id oMhBYY1788612xLLKhJz4BTu; Tue, 23 May 2023 11:01:06 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.61]) by mx.groups.io with SMTP id smtpd.web11.3159.1684861673985710455 for ; Tue, 23 May 2023 10:07:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mrcx2cSUZxABUrn4OIqgm+ncxvCT3Lu6ujekNabggdY38UWgEFjw8hO8rblYgzTLanpy8bJDsyfGlKIrYbVT9sxLQBZq/xDcKla0rG2sBGJhQ7il0aQWQsa7seVFc3q74zsD+DPhrgG4t02WV1N4xeIyXuzR+hYQIUl3gs0M9o1y3arUjxnBcV3uX9fz6Xdxnr9oKWdZeOq7gUaI6huO9tRIVcSIDSinCGvhIpSHxuQz8/2VqxIFRhmg2Jy05Ugw4PaUaqVZMnwmaSfygsJHw8lKF8B6oZD0LjT1u9SAzHlXaifX11It+Zt68aPEkqwxv4WmhHlJjAytq5k8xkAu5w== 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=UQs7tbnEexWVTxB+24ZGxFJTdfgBlaAMWKEWFDHAwgM=; b=kTjt7b/xSaa/tZBBkow41n+beRoGLbPdKbcaHV/CQ5mJUjKUomUmmDNx77i8Al3vHN/FnHD2V9YBa8gLcNaLGN6EmZCTFiZd0Pk/DVKQxegu/maE+HeqvjaamQ2a1SodQELwjZRkklEVuWigHhaueig+KKmTmLrgyAb5dV/dy7I9knS0YxOlPUEoo4f6mTWu+p+lSxrJ9i3ooOsSzS+42xY7LIxG5YADaTrE6qICxD3lsSwUvPGtEt9MENAg4S35iOt5T1R0+8G1MivW055GpY8dN4nOGgygZaj6mqFGZfHhI6amOQTB3hWdAbHeVpoVJRvxfh6Rb/pBFrdKJWXL7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none X-Received: from CY5PR18CA0014.namprd18.prod.outlook.com (2603:10b6:930:5::13) by SJ0PR12MB6967.namprd12.prod.outlook.com (2603:10b6:a03:44b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.17; Tue, 23 May 2023 17:07:52 +0000 X-Received: from CY4PEPF0000C96B.namprd02.prod.outlook.com (2603:10b6:930:5:cafe::ed) by CY5PR18CA0014.outlook.office365.com (2603:10b6:930:5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.14 via Frontend Transport; Tue, 23 May 2023 17:07:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; 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+105204+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C X-Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000C96B.mail.protection.outlook.com (10.167.241.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6433.7 via Frontend Transport; Tue, 23 May 2023 17:07:51 +0000 X-Received: from localhost.localdomain (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 23 May 2023 12:07:48 -0500 From: "Neo Hsueh via groups.io" To: CC: , , Neo Hsueh Subject: [edk2-devel] [PATCH] MdeModulePkg: Fix port multiplier port in AhciPei PEIM Date: Tue, 23 May 2023 12:07:15 -0500 Message-ID: <28f72c221f0c7f84e6d992b434565107cdb718b4.1684858126.git.Hong-Chih.Hsueh@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C96B:EE_|SJ0PR12MB6967:EE_ X-MS-Office365-Filtering-Correlation-Id: 3aff8ba3-0914-4a7d-010a-08db5bb03e04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: vKjcZPOyjwyHEMtfooyb18V1ec6uLeNgKx024KNQPQjr+MsSH7QRkWGpiMZKc9EI28sK84UkNeyiFXF/qNNIpviivGiiJ5ShskD6EPfLVBK5aURccumDr4wN6SKrScJYxFB5/TqjTZ1KDJtksAmc0QTwr6i6IOL0Clbys61RQY7Rv6BYmOXY63NPdtJfdgFY9Ihwo/dBeRsAoV3F3jCcdvG74trpCyaLD2AQuGYUCRaOiQk5Jax0Ro7+gNERB33XsNpauH8WvFnd58ftvzi+zVOmYo4V9m6m3Xv9xl/lE7JtZq1oPMjOLqsvrnv9tEirUJbKYFyJ7rEbMdInAkS8Q8pRKVnTjzNPyuaBn3rPkw/XkVcsJSlHLhMkmaQcLG7xs3ILZIjQELZXcEknpARK7HvDXFIZCdNNr6FEZexzhZf3sToVI6pUliYpZ1MEL8hzM55FRT9sgLsHC8M1sUsBw7CSZgLBqZ7jSVe8FwZbUXsyeOCft3ZfflTCXSi/MrYtkP6UE+sZA7Xs4isXx24hHlxqhp31Qhf2mFd7LPLOvsDx77QvPkdGNxwxGISs4dXj0K3BlB4j7w7L4L/RFJlUrvBf3GB7dBbH2i8lZi65aNIVsE26LU9qDVpvLMeNNi3BXGVwIRP07d4h9oi+oC4lr/ueAxJtayrEsoS8WO6zjHT4a7++9XxK8NX2C4IbiQ19kuV0MfZtegEB0+uOLPfquVXbLbZm/HSAMFKVsZ/bpNnGG0w+GM7QJuiUH9V6L6UMQZkN0lS3fpxt9U9ddfhscQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 17:07:51.4785 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3aff8ba3-0914-4a7d-010a-08db5bb03e04 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C96B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6967 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,Hong-Chih.Hsueh@amd.com X-Gm-Message-State: DgWbrVHqMRH0MaDVAGJDzxBWx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1684864866; bh=YYaxOCLSMSz4o1LML4GZRaTB9ILjw4b1sobkV8Ek40w=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=kdGFVIhoQca/A4YIJmmBn6IxeTpAkiBrWzMiDXwZTO9lMeEBphvgHqtyBtxC+280XcF gnf1L+GpplaIjPlSGEHKFul40l9YpIdyIiJ9Am0aKZW52Yz/sf9s78uzHPFckuIsA+Fbf +q1B/IbTMurdy4bE63z/9kPFyPuwdgWgtng= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1684864868883100001 Content-Type: text/plain; charset="utf-8" If there is no port multiplier, PortMultiplierPort should be converted to 0 to follow AHCI spec. The same logic already applied in AtaAtapiPassThruDxe driver. Signed-off-by: Neo Hsueh Reviewed-by: Hao A Wu > Reviewed-by: Hao A Wu --- MdeModulePkg/Bus/Ata/AhciPei/AhciPeiPassThru.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 ( --=20 2.40.0.windows.1 -=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 (#105204): https://edk2.groups.io/g/devel/message/105204 Mute This Topic: https://groups.io/mt/99093106/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-