From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.56]) by mx.groups.io with SMTP id smtpd.web08.39519.1628874178804469098 for ; Fri, 13 Aug 2021 10:02:59 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YsxSmYCb; spf=pass (domain: arm.com, ip: 40.107.20.56, mailfrom: christopher.jones@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Smr3gB/CyvnH3neGTdHk8bGytI7Y1tTJb/gqpo5gO8I=; b=YsxSmYCbZxcShnt55B6rjVSqMsvriBZs4y+lKYP/4uEeOWDbMOWD+kLTaKVxqeL2k2XSohQzSIlcZMvfbocLN3ra62IEFnj6KsTvdnsgwImPL2hdegfEKnAmtiyS5bgh/Fcq5Smt/0r7lHyn5r4ONXwVdzWTCcZBBra0M7CoQtc= Received: from DB6PR1001CA0031.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::17) by AM9PR08MB7198.eurprd08.prod.outlook.com (2603:10a6:20b:3df::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.15; Fri, 13 Aug 2021 17:02:56 +0000 Received: from DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::34) by DB6PR1001CA0031.outlook.office365.com (2603:10a6:4:55::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14 via Frontend Transport; Fri, 13 Aug 2021 17:02:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT003.mail.protection.outlook.com (10.152.20.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Fri, 13 Aug 2021 17:02:56 +0000 Received: ("Tessian outbound 8b41f5fb4e9e:v103"); Fri, 13 Aug 2021 17:02:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4b15e7fadb5e10db X-CR-MTA-TID: 64aa7808 Received: from e777c132dd0d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 62683BAF-AD82-4331-85E5-0020A0EA21B8.1; Fri, 13 Aug 2021 17:02:49 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e777c132dd0d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 13 Aug 2021 17:02:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V8vzdF7aGd4RXXjTlReqe/qFl2f5bmrVCq7RPfM7aFPUelzHLMn7XmXJ6sKu2LE31mOo5tBUpwk1Q+X5rrgxWps0ScyaryoRc20VqTkr4rKMHeEWJQy1morEeJKgjXcTdSb1sQIwKvmWHsrLoL4vAXeL8CdLDs+84JoxXUbUnh90nex9gliAqiAy0zaSl9iOlj5Uz7XikcybkGMGdap4A9RWCT5mzWsG2cp596pcubxK//jyXfnzJwugHcTgGa5NLtqvzbsvHBVFUtPC052sVur8qe3+jYjHsY1eJ7AmIN0f2LgFFAqMObFqXBVGcg8rf2KBaUgGQOWyfPqDVgWVFw== 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-SenderADCheck; bh=Smr3gB/CyvnH3neGTdHk8bGytI7Y1tTJb/gqpo5gO8I=; b=UWOk+xezb422eV3P7vKtE+uftQiLns119sygkb+DjqeEhkmJ+EtpPWtfhUsgB3gpE+BujLWUY4nQTCcpzT4GOWPD/WzCtGHMNgW8OHDkYJVc22/HSwCIeqqcQeYB3fKqvjnIpHoyTO6xuPGwSfGmzVL1dG0Z3srVIYdwUbRbEhGzP1Tsb7L0MSbc9euVOiXD2LrkXJDy+Lty39tODTyxPt5U+I8QHSo97eKvlo188s3TCl+IxmKCozQAEFKayP5upQfP4uXIy5tb46cR9wlTjg2vitqeNGgAfxl8arOaa4MwUyWiOAPgYQD02VGWfXfkie4MQDAghtiaGA4xXFB/1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Smr3gB/CyvnH3neGTdHk8bGytI7Y1tTJb/gqpo5gO8I=; b=YsxSmYCbZxcShnt55B6rjVSqMsvriBZs4y+lKYP/4uEeOWDbMOWD+kLTaKVxqeL2k2XSohQzSIlcZMvfbocLN3ra62IEFnj6KsTvdnsgwImPL2hdegfEKnAmtiyS5bgh/Fcq5Smt/0r7lHyn5r4ONXwVdzWTCcZBBra0M7CoQtc= Received: from DB6PR1001CA0037.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:55::23) by DB9PR08MB7024.eurprd08.prod.outlook.com (2603:10a6:10:2cc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.15; Fri, 13 Aug 2021 17:02:48 +0000 Received: from DB5EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:55:cafe::58) by DB6PR1001CA0037.outlook.office365.com (2603:10a6:4:55::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.16 via Frontend Transport; Fri, 13 Aug 2021 17:02:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT035.mail.protection.outlook.com (10.152.20.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4415.14 via Frontend Transport; Fri, 13 Aug 2021 17:02:48 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Fri, 13 Aug 2021 17:02:46 +0000 Received: from e125153.arm.com (10.57.68.146) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2308.14 via Frontend Transport; Fri, 13 Aug 2021 17:02:46 +0000 From: "Chris Jones" To: CC: , , , , , , Subject: [PATCH v1 2/2] ShellPkg: Add Type 5 PCC Subspace Structure parser Date: Fri, 13 Aug 2021 18:02:45 +0100 Message-ID: <20210813170245.4318-3-christopher.jones@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210813170245.4318-1-christopher.jones@arm.com> References: <20210813170245.4318-1-christopher.jones@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 87605391-74b2-45ed-5793-08d95e7c3248 X-MS-TrafficTypeDiagnostic: DB9PR08MB7024:|AM9PR08MB7198: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: cnbKu7bns2GAYPg3cxH0IvK6NOZkPWJ+5a6IRueHdEAswDD6Qe1EnODW0bnEf32Hr6NjrIB0ePToplTlunh1FAdUGcgi1DNOrvH6NstgVXRyQkRa95C2NZF07qOtqlL37XGxlydwbvb0H9XUCaAWlDTsYjqILrTIUlnJlH/+w8uoCosV0pO4S3UN8++ZhqXNf6D/p12VUjP7nVCHCqczgnN85eMgv2R0ZWDYQTcJCB8Y0LXJAgl2io8y1iGiS/MBkgRbTzN7tR52Pz/zuCkxioJ1HxEZRN+1BAfnWd2aApIkWoUJZPonN8sAFsiam3hynQ1ui+KVqKgKbBN3xP9Kkf27VBLKXwHBS4UjO5qcOUmpzUwTRJlv2w7EbX9zQ2tBa9ogp3Ql62QpAc5Y3h4GnZ+ElfKwzKe/uaCrAcFeh/XkdZzj+Q3EZL0PQgyCX36xtTgbfo1gZ9jZMcGZNpacyvmxw7sS3058pxHqgcToF0k0ZtagUdF6/UL446YXP7MkMCVBH+Tdk4OVviobmR12PIDaaKgLBVHHW54Skh7FSEXDQiY/KKjZueqshNgbWfH8HMBL93xofV/pix+J38rCTkKuSXqlyRYesWfOJdPvTX50Bk0CFbBJdMTfe5h+LAIquHMFtI1wyIqa4QikfgFgGuISMz7omciMZ70Z3vgWHF3PYgiE/tQ19YiUxLrlQxGAQVSSr4hVNOpGHFJwZDrbIBImVZIDBavJMhd9tajvgxkhuOGC2kDtzDG3oD5Xixb9i34Er7h2ZbXBBKUC8b148ja06QwiDoFqpstsKsfROyggrp4yA9nQnsaHACBdEVJDel42lf4UvBlJWzmtDz/Xi7hqYrP2qT5OvB3X794j4zg= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(4636009)(39850400004)(136003)(376002)(346002)(396003)(46966006)(36840700001)(54906003)(19627235002)(316002)(47076005)(1076003)(4326008)(82310400003)(34020700004)(6916009)(7696005)(70586007)(2616005)(186003)(356005)(8936002)(8676002)(478600001)(426003)(82740400003)(81166007)(36860700001)(36756003)(70206006)(336012)(83380400001)(26005)(2906002)(86362001)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7024 Return-Path: Christopher.Jones@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: c225f12a-4f62-4494-9e5e-08d95e7c2d8c X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YDSMnewE6EISh+6VD/rdvSt/9nDWdyrEw3ID2cN6XK7X5f1a/3a+/vgb1oMrKgg1WHGxqgl9POnHDwiYnFsmYj64yhfSwAxiX5Szq2zjinKuKRJ8FIkDruBdr3g2KlR6zkX/1T3qa5479n1Ag8p6xkh5dgUfBKUersIbJb8c3SfkcTiZgUnoka87ydBkx0ybm+M4qzXgBkVzgltMdaQuHlapndZ05Y1Hm8xMD9sJloRMDXX3cju1bgZUH5o76B97BWm5k5+05bxKni6xJLi5qJkXloHhx8vH73v0tri9OKKmFbmk2mMko5fGDMNPE2eU7zV3eM19aMHZ7kEU817os+ZBudg7XHqZZrnp0173urgSote03sl9PmwO3qxD4w8jiOSvI/gqWv28Zy3HMn6jO+QGVMu4ngOX+QH1lE7pKqAL+MHH2XFmbsColJQrWp4dNBDD/DJwvbVsPNwttqCjwJ2P0Nzr42oCFg5QPacrHr62Bh91M3sLsfAOH7ZUQ/daG90FG5HSeNssTMLx7JDblRtig+wXCFI09K06J4+gwe3IJX1aH20yJi3w7qKJ36HasxaEIQ1/Q3vw1+uSgYpp/7GtEBdNi9v91Uw4IDBpr24wnL++OODjqx9JrWB27J5Ld9RQou97lSb16r/Eg9BB1flTJnMbG2NmtjUVV9sdgYezUPu2bLOeoLkQQJ/QYCQxn53ykgmOFRZcpjRVhNreUGhkZTObYYJ6e+gIXfXzWlZzXZNjS8QWlJpY8j2L3657R2RGOHvxefWizF/tDyyWmoSmC92LpZtRrRns3nZKXm0= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(39850400004)(396003)(346002)(376002)(136003)(46966006)(36840700001)(36860700001)(36756003)(54906003)(82740400003)(70586007)(70206006)(81166007)(6916009)(478600001)(316002)(47076005)(19627235002)(2906002)(86362001)(82310400003)(7696005)(4326008)(5660300002)(1076003)(8936002)(8676002)(2616005)(336012)(186003)(26005)(83380400001)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2021 17:02:56.2123 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87605391-74b2-45ed-5793-08d95e7c3248 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT003.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB7198 Content-Type: text/plain Bugzilla: 3563 (https://bugzilla.tianocore.org/show_bug.cgi?id=3563) Update the Acpiview PCCT parser with the HW Registers based Communications Subspace Structure (Type 5) as defined in Section 14.1.7 of the ACPI 6.4 specification. Signed-off-by: Chris Jones --- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c | 58 +++++++++++++++++++- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c index 7d3a2dd10dc928265bad3711e929d96c1ed40b1d..6beee70b23a3b32992efa0edac48fe236591b9f5 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c @@ -77,7 +77,7 @@ ValidateRangeLength8 ( } /** - This function validates address space for type 0 structure. + This function validates address space for Memory/IO GAS. @param [in] Ptr Pointer to the start of the field data. @param [in] Context Pointer to context specific information e.g. this @@ -86,7 +86,7 @@ ValidateRangeLength8 ( STATIC VOID EFIAPI -ValidatePccType0Gas ( +ValidatePccMemoryIoGas ( IN UINT8* Ptr, IN VOID* Context ) @@ -274,7 +274,7 @@ STATIC CONST ACPI_PARSER PccSubspaceType0Parser[] = { {L"Base Address", 8, 8, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Memory Range Length", 8, 16, L"0x%lx", NULL, NULL, ValidateRangeLength8, NULL}, - {L"Doorbell Register", 12, 24, NULL, DumpGas, NULL, ValidatePccType0Gas, + {L"Doorbell Register", 12, 24, NULL, DumpGas, NULL, ValidatePccMemoryIoGas, NULL}, {L"Doorbell Preserve", 8, 36, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Doorbell Write", 8, 44, L"0x%lx", NULL, NULL, NULL, NULL}, @@ -367,6 +367,29 @@ STATIC CONST ACPI_PARSER PccSubspaceType3Parser[] = { {L"Error Status Mask", 8, 156, L"0x%lx", NULL, NULL, NULL, NULL}, }; +/** + An ACPI_PARSER array describing the HW Registers based Communications + Subspace Structure - Type 5 +*/ +STATIC CONST ACPI_PARSER PccSubspaceType5Parser[] = { + PCC_SUBSPACE_HEADER (), + {L"Version", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, + {L"Base Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}, + {L"Shared Memory Range Length", 8, 12, L"0x%lx", NULL, NULL, NULL, NULL}, + {L"Doorbell Register", 12, 20, NULL, DumpGas, NULL, + ValidatePccMemoryIoGas, NULL}, + {L"Doorbell Preserve", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL}, + {L"Doorbell Write", 8, 40, L"0x%lx", NULL, NULL, NULL, NULL}, + {L"Command Complete Check Register", 12, 48, NULL, DumpGas, NULL, + ValidatePccMemoryIoGas, NULL}, + {L"Command Complete Check Mask", 8, 60, L"0x%lx", NULL, NULL, NULL, NULL}, + {L"Error Status Register", 12, 68, NULL, DumpGas, NULL, + ValidatePccMemoryIoGas, NULL}, + {L"Error Status Mask", 8, 80, L"0x%lx", NULL, NULL, NULL, NULL}, + {L"Nominal Latency", 4, 88, L"0x%x", NULL, NULL, NULL, NULL}, + {L"Minimum Request Turnaround Time", 4, 92, L"0x%x", NULL, NULL, NULL, NULL} +}; + /** This function parses the PCC Subspace type 0. @@ -482,6 +505,29 @@ DumpPccSubspaceType4 ( ); } +/** + This function parses the PCC Subspace type 5. + + @param [in] Ptr Pointer to the start of the Subspace Structure. + @param [in] Length Length of the Subspace Structure. +**/ +STATIC +VOID +DumpPccSubspaceType5 ( + IN UINT8* Ptr, + IN UINT8 Length + ) +{ + ParseAcpi ( + TRUE, + 2, + "Subspace Type 5", + Ptr, + Length, + PARSER_PARAMS (PccSubspaceType5Parser) + ); +} + /** This function parses the ACPI PCCT table including its sub-structures of type 0 through 4. @@ -593,6 +639,12 @@ ParseAcpiPcct ( *PccSubspaceLength ); break; + case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS: + DumpPccSubspaceType5 ( + PccSubspacePtr, + *PccSubspaceLength + ); + break; default: IncrementErrorCount (); Print ( -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")