From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 76254AC0BA8 for ; Tue, 25 Jul 2023 10:28:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vp7WpQSJnDuLDmS80GCURUU39IU9EHsHV4ClAt/jMt8=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Received:X-MS-Exchange-Authentication-Results:Received-SPF:X-Received:X-Received:X-CheckRecipientChecked:X-CR-MTA-CID:X-CR-MTA-TID:X-Received:X-Received:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:X-Received:X-Received:X-MS-Exchange-Authentication-Results:Received-SPF:X-Received:X-Received:X-Received:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:X-EOPAttributedMessage:X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id:x-checkrecipientrouted:NoDisclaimer:X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam-Untrusted:X-Microsoft-Antispam-Message-Info-Original:X-Forefront-Antispam-Report-Untrusted:X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-MS-Exchange-Transport-CrossTenantHeadersStripped:X-MS-PublicTrafficType:X-MS-Office365-Filtering-Correlation-Id-Prvs:X-Microsoft-Antispam-Message-Info:X-OriginatorOrg:X-MS-Exchange-CrossTenant-OriginalArrivalTime:X-MS-Exchange -CrossTenant-Network-Message-Id:X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp:X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs:X-MS-Exchange-CrossTenant-FromEntityHeader:X-MS-Exchange-Transport-CrossTenantHeadersStamped:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:X-Gm-Message-State:Content-Type; s=20140610; t=1690280908; v=1; b=r6wm6YLvKStL1ptPp78J5UiFh+0rpX/ZY05LcF+p9zUAti3uIsv+rL5kNeU1vtEkrVxPj9iK 6Ov9klE9gMhJh11mNzTKDT9Ed1wB9q0CUWy6/CB5gV5dhhec9HPKZY1KxUtHLRGQng8SsbZqUsQ ZWrsI8SXhYBtgqFCJJmVAkO4= X-Received: by 127.0.0.2 with SMTP id nZtHYY7687511x2HPk6AKe4W; Tue, 25 Jul 2023 03:28:28 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.64]) by mx.groups.io with SMTP id smtpd.web11.17192.1690280906453979197 for ; Tue, 25 Jul 2023 03:28:26 -0700 X-Received: from AM0PR05CA0081.eurprd05.prod.outlook.com (2603:10a6:208:136::21) by AS8PR08MB5893.eurprd08.prod.outlook.com (2603:10a6:20b:23e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Tue, 25 Jul 2023 10:28:23 +0000 X-Received: from AM7EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:208:136:cafe::5e) by AM0PR05CA0081.outlook.office365.com (2603:10a6:208:136::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33 via Frontend Transport; Tue, 25 Jul 2023 10:28:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT010.mail.protection.outlook.com (100.127.141.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Tue, 25 Jul 2023 10:28:22 +0000 X-Received: ("Tessian outbound d7adc65d10b4:v145"); Tue, 25 Jul 2023 10:28:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a25871c6475c73be X-CR-MTA-TID: 64aa7808 X-Received: from 0553edfa7394.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F0FE3C91-5359-4ADB-B66C-B539A141F914.1; Tue, 25 Jul 2023 10:28:11 +0000 X-Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0553edfa7394.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 Jul 2023 10:28:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CAIULerqdeIVXDxJziH/h+syK8UgVRbUeCrhEg0PObbe/hjxSNCB7U2Jdadd9p8q/QF8l6j9s/UkpY6bkmww5y9fXzwDQfUXXa8EmbpZVShHEyDN2XZciInj/7/9k7YxQjVm6ka9lxMl2Zlf1v+R2TtM7jxIFjFs0kZMJl+uX+FsDBMEWCAV4nGyqnit13bq1E0FtO8gRqflxMVvziVRZqEwPPf17+SbodBM8Cmfm4bH9CTKOkReciSFHL6Hf9Mm/VoArcPrMJB+wP4xvFeJX/gYwuKFb+aiYp30lBg3V9Vwe5KsoD9ur1cc2Bh4zVShsUcFFPNyfgZWUo19HkHt8g== 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=2V2zrojZEXv5AgWAVU2t1DJjq9PuimS1nDOhNN+D4oc=; b=i+7qAuALPN/VMsxm7wS2qJsz/DOs6Yp0LWTCtp7kZ2FPs2Q7L9we4XOKuMGYEEslm1HYwDrzIFKf0ri1/RgnryvES5Ctk8CAu8Kiak+OWhFI8TB/3vO7pzFPo/EfWtoe0025UKmDcDjwPXIVRHxWlydm7IUQ22SQBB+QEj8P4QiASmoPKuJkmXIt0k14Qs2Og841TqmjJPLkmLJQbbksnfYtjThLEeyGUr/YyACJ0tZF6ej8Ue/fiMH+5AvfdD03qqajIGG+MSEv28QWECMFIDyLp4A+lqNNtf+tuxXxlIZTHfBXHuU1r9Q23cjLWAO7mcvYFjnnqzwJ02WgZEEFNA== 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 X-Received: from AS9PR01CA0016.eurprd01.prod.exchangelabs.com (2603:10a6:20b:540::16) by GV1PR08MB8569.eurprd08.prod.outlook.com (2603:10a6:150:81::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Tue, 25 Jul 2023 10:28:06 +0000 X-Received: from AM7EUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:540:cafe::da) by AS9PR01CA0016.outlook.office365.com (2603:10a6:20b:540::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33 via Frontend Transport; Tue, 25 Jul 2023 10:28:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;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; pr=C X-Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT004.mail.protection.outlook.com (100.127.140.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6631.25 via Frontend Transport; Tue, 25 Jul 2023 10:28:06 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Tue, 25 Jul 2023 10:28:02 +0000 X-Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Tue, 25 Jul 2023 10:28:02 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , Subject: [edk2-devel] [PATCH v1 07/11] ShellPkg: Acpiview: Update MADT parser for TRBE interrupt Date: Tue, 25 Jul 2023 11:27:54 +0100 Message-ID: <20230725102758.28132-8-sami.mujawar@arm.com> In-Reply-To: <20230725102758.28132-1-sami.mujawar@arm.com> References: <20230725102758.28132-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT004:EE_|GV1PR08MB8569:EE_|AM7EUR03FT010:EE_|AS8PR08MB5893:EE_ X-MS-Office365-Filtering-Correlation-Id: 8661c2a8-f8d1-432e-f67d-08db8cf9df88 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: zIqlXqYkGPjpsVgQuAJZB+RbetCIKpvGPf2XhLaa8LXG1yRgbIb34f/DreQ8dY15TvokH9xTNVUKCRdYczRUIQnRrCKpHRzqUN4Eo1x8ZAMh2fgrj5AC108woTJbCKZXu5b1sQRgWkwn0OR+AZTUkL0W1etCkugFFQB5xkEeXiMpnD9TJ+Eq9xWdwfc4fpsHSDnKtRk57rHRDBEDGSHOGOso717SO/S/gtVtqe0vaZmCxgMV4zaEz3R2V/elQ9PkwX6KO892vt8tCX+qsA2dTcbueRIS1zHXRlO2lSkGn5Vc1GTly4Zmm2KQISj1VD37Dd5R/oU27IIwoX14tUANTwe5Nm2zXBTza5sWsRmrpSEXg7SuPwVPzkd9+PiMWgbQgy61fzzO4T1si10SFx9qjm2tvIcDAMZlSUN44rzxWX7knYeWhMJU8TEq6kxDvwTEuu0xVya3TFb9sK5mnSRpmZVOUW9lDg8bg8+58WVGEz20R0heHtjA+DFUMzrtoh0cILhKe6pKMo/V9daT7HdjrTSYeSHKJxhBP5R5K4gqFBmY/I4uQqSbDAkUdimUWOerVqlD42sCyK7A1LfAgR2mRy3N79JtbqZjwECpVq3Z0U9yynGUtYuOrBVMIJXQmTJ3DzIttmoWb3VgUWs3i3GwSvpfMqk9Ob/lsn4GXiOaU2bKmYtYyfa2YDMHijFeVg6z5iS1pbDjtICaSOipXLviPMRqXNAUm0IKyjNWGofsMyDbi3rJQMr7jvzRuMY5/S5NkXqD5D76y95kFciMwxE/pQ== 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:(13230028)(4636009)(376002)(136003)(39860400002)(346002)(396003)(451199021)(82310400008)(36840700001)(46966006)(40470700004)(36860700001)(40480700001)(40460700003)(336012)(186003)(2616005)(26005)(1076003)(41300700001)(316002)(7696005)(36756003)(44832011)(5660300002)(70586007)(4326008)(6916009)(15650500001)(70206006)(8936002)(8676002)(2906002)(47076005)(426003)(83380400001)(356005)(478600001)(54906003)(86362001)(81166007)(82740400003)(6666004)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8569 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a4b90cb5-076d-419f-3f0f-08db8cf9d59c X-Microsoft-Antispam-Message-Info: g6/WGbhLx/Vh60GWn/G+xamOH1n5TWQChK/pz8+xXqmVX+g0UXhehIUmNopu+VNmJm/tFARMm1vF6wq4V9abs3LQStMCCkZNFM3urjG5O6RKFTkeybkSjO9Wj2xmeiHPR11gLtkIIQlF6mzjBnDTNahvnBB4natEyP14AVFwGyq44Nty0jqRGWqC6Lw4RIRLUHgsbN42yLek/zqEHVKFA3nny6tt3ZZSDBdEBvp3JQOYaTlNQztPxCpKe0J5hitpq7A8oyUKLwMGK9nu4QyLb5Bcc+AooDkL7IaKP2lWbWvQ6b9j6QP01dqscNXMA164Rfj5l8xZa4xSx5ppkpOQc6dIGiY2piDitvruQ5U33pIu25BlhXRfUZL3Ol5SkqnGutOKWpzdP5eZnYI/0V12c6SYGq1V1NgwSOFtAzOzuNiv8oGIuK+coFTEzYpljU+6hTgVKuSPwSP+F6K04pLO032JFUdfe6COODBk+Zr7FY/60svO/rMEYRZuoRvunGB781C2AEmkSh0Z/bE5GXDQWq1+jPFe9lcCV21BYDa4/MdL3pBPpJcdtwhJVZ6lpn7BSO/A/GcyJpVbMSqRqiAM7g2Su9tsezxn8l1YxFIrKteQBO5MzPICtxfZ1efbMqQiW7VQivPjtOarwtmBPCNNxH3kuo9lW8+9o5nGXtrIUAguLI60c0Nlt+gMdfo3akp0D6VTFZd+KcW59/64gdOAtq67oWMMCkJkdGADbcRMPjU6l0GiycNa+klUabHasTvD X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2023 10:28:22.7316 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8661c2a8-f8d1-432e-f67d-08db8cf9df88 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: AM7EUR03FT010.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB5893 Precedence: Bulk 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,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: sdc0npyBvTZGpYVGUXGARefpx7686176AA= Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=r6wm6YLv; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io ACPI 6.5 introduces a new filed to the MADT GICC structure to specify the TRBE interrupt. The TRBE interrupt is a Processor Private interrupt (PPI) and is used to specify a platform-specific interrupt to signal TRBE events. Therefore, update the MADT GICC structure parser to parse the new TRBE interrupt field. Also, add validations to check that the TRBE interrupt is within the PPI interrupt range. Signed-off-by: Sami Mujawar --- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 48 +++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c index 41edcb9ffd1da90893c04e8284ea3317a9e3b45a..3a4f246347f8ad3489fda083e3268e73baa9bc92 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c @@ -1,7 +1,7 @@ /** @file MADT table parser - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. Copyright (c) 2022, AMD Incorporated. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -97,6 +97,48 @@ ValidateSpeOverflowInterrupt ( } } +/** + This function validates the TRBE Interrupt in the GICC. + + @param [in] Ptr Pointer to the start of the field data. + @param [in] Context Pointer to context specific information e.g. this + could be a pointer to the ACPI table header. +**/ +STATIC +VOID +EFIAPI +ValidateTrbeInterrupt ( + IN UINT8 *Ptr, + IN VOID *Context + ) +{ + UINT16 TrbeInterrupt; + + TrbeInterrupt = *(UINT16 *)Ptr; + + // SPE not supported by this processor + if (TrbeInterrupt == 0) { + return; + } + + if ((TrbeInterrupt < ARM_PPI_ID_MIN) || + ((TrbeInterrupt > ARM_PPI_ID_MAX) && + (TrbeInterrupt < ARM_PPI_ID_EXTENDED_MIN)) || + (TrbeInterrupt > ARM_PPI_ID_EXTENDED_MAX)) + { + IncrementErrorCount (); + Print ( + L"\nERROR: TRBE Interrupt ID of %d is not in the allowed PPI ID " + L"ranges of %d-%d or %d-%d (for GICv3.1 or later).", + TrbeInterrupt, + ARM_PPI_ID_MIN, + ARM_PPI_ID_MAX, + ARM_PPI_ID_EXTENDED_MIN, + ARM_PPI_ID_EXTENDED_MAX + ); + } +} + /** An ACPI_PARSER array describing the GICC Interrupt Controller Structure. **/ @@ -122,7 +164,9 @@ STATIC CONST ACPI_PARSER GicCParser[] = { NULL }, { L"Reserved", 1, 77, L"0x%x", NULL, NULL, NULL, NULL }, { L"SPE overflow Interrupt", 2, 78, L"0x%x", NULL, NULL, - ValidateSpeOverflowInterrupt, NULL } + ValidateSpeOverflowInterrupt, NULL }, + { L"TRBE Interrupt", 2, 80, L"0x%x", NULL, NULL, + ValidateTrbeInterrupt, NULL } }; /** -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107233): https://edk2.groups.io/g/devel/message/107233 Mute This Topic: https://groups.io/mt/100347375/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-