From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.42]) by mx.groups.io with SMTP id smtpd.web11.9222.1600783703175237733 for ; Tue, 22 Sep 2020 07:08:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=YMHt7fBl; spf=pass (domain: arm.com, ip: 40.107.8.42, mailfrom: sami.mujawar@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=9TEXYQ/gXa8wVhruTgpWTo2w0Up2IRgGXaFW4lOiHI4=; b=YMHt7fBllyeIiAwNL+qxWUEq5AzBYvUEbgyLynT+NvpjpfmPbRsBX4soZsufjczNgWNcsex8h4qO+n/LiKm0eJOrMz50ZvGbbmkBLBoycDH0immNWImmKHaAoeiXEdzF2pS4lBzxekmRRdymVOY0biGE055aw4Q82hdvw/Mncr4= Received: from DB6PR0301CA0086.eurprd03.prod.outlook.com (2603:10a6:6:30::33) by AM5PR0801MB2099.eurprd08.prod.outlook.com (2603:10a6:203:4d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.24; Tue, 22 Sep 2020 14:08:20 +0000 Received: from DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:30:cafe::87) by DB6PR0301CA0086.outlook.office365.com (2603:10a6:6:30::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14 via Frontend Transport; Tue, 22 Sep 2020 14:08:20 +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=bestguesspass 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 DB5EUR03FT061.mail.protection.outlook.com (10.152.21.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Tue, 22 Sep 2020 14:08:20 +0000 Received: ("Tessian outbound e8cdb8c6f386:v64"); Tue, 22 Sep 2020 14:08:19 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cb1f4f345bceeb68 X-CR-MTA-TID: 64aa7808 Received: from ba0b4dfe6509.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A90A69FF-5CDA-492C-8360-C4DCF32A6FD6.1; Tue, 22 Sep 2020 14:08:13 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ba0b4dfe6509.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 22 Sep 2020 14:08:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RbbzQJM2QkWStp40BdtwRpNZeJ4ajlpa1/4ZQeynNc/DSDLXdcP2OJy1g4D+IJ6DSlsVa7IykztRTFQYdKxBvHc/NSCe9mhTdYLzjS/Jsflq4uDCAR4++jBz3Wmx4DklT6GJixiqOg6X/mNh2pL2FiIo2ClDPvn0HfDgu2Mox1KWfy8u3iQM5ih4PM4D7hCkJ0yRTPJRkz18UHwu/r/hoPDm9TVFCVwnLa59kRuIuAMiWrccDrGNie9trOTRGEq15dSv52+1/PEuQvRdX4dzbViAFw4r2Il1lr2OS+9eot/RL+ZG2Q2WOnvftMCwwnUYg2EGm3wznfnudyY197kRpw== 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=9TEXYQ/gXa8wVhruTgpWTo2w0Up2IRgGXaFW4lOiHI4=; b=CBI1HeobkcrCza9jSBaRJCjHk5A8TLU6mg5N+4WT2Q+V+f+eBDejpyUzwSOeLopUkF2Rw9kia4ziLQ8GqzcskpkHf/OCfOlKMMUHSCOOK+nABK3qrsbM/HJ+h8KNA4AR73UbQkWsEGr97Mo/zNkzUw53YJx5Y58LJOtcWZAMHgOY/Tx+k2iK01tbzH/WySBi1iAHxqIJnoFfYXaig1ghzBsf3RAB5Ec1m9HVN8PkovjzxG2muOPWZ0fVT2pLFa0MLIYfM7mMctj+XiU0vFY1r6h4R3j78MiQ6uLEgT10d1JPDnaIaLvyWQdDOfVKYNmkRUTlFDCK2zpMjz5qJaPC5w== 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=bestguesspass 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=9TEXYQ/gXa8wVhruTgpWTo2w0Up2IRgGXaFW4lOiHI4=; b=YMHt7fBllyeIiAwNL+qxWUEq5AzBYvUEbgyLynT+NvpjpfmPbRsBX4soZsufjczNgWNcsex8h4qO+n/LiKm0eJOrMz50ZvGbbmkBLBoycDH0immNWImmKHaAoeiXEdzF2pS4lBzxekmRRdymVOY0biGE055aw4Q82hdvw/Mncr4= Received: from AM6PR10CA0039.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:209:80::16) by AM0PR08MB4532.eurprd08.prod.outlook.com (2603:10a6:208:145::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.19; Tue, 22 Sep 2020 14:08:11 +0000 Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:80:cafe::fa) by AM6PR10CA0039.outlook.office365.com (2603:10a6:209:80::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.19 via Frontend Transport; Tue, 22 Sep 2020 14:08:11 +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=bestguesspass 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 AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3391.15 via Frontend Transport; Tue, 22 Sep 2020 14:08:11 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2044.4; Tue, 22 Sep 2020 14:08:10 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1779.2; Tue, 22 Sep 2020 14:08:10 +0000 Received: from E107187.Arm.com (10.57.47.90) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Tue, 22 Sep 2020 14:08:09 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [PATCH v1 1/2] MdePkg: Definitions for Extended Interrupt Flags Date: Tue, 22 Sep 2020 15:08:07 +0100 Message-ID: <20200922140808.77392-2-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20200922140808.77392-1-sami.mujawar@arm.com> References: <20200922140808.77392-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e2884fc-9b9e-4fbb-6fef-08d85f00f5bb X-MS-TrafficTypeDiagnostic: AM0PR08MB4532:|AM5PR0801MB2099: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4941;OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: zTeDRuovqWJdU+BYp/7x1zoQ8bCCYM4w7YpzKVn1F3l/lJxK3SMuQ6K51zs8lx+0p5QGDjTCNEtu1BE0wOriRZUuG5Ienmb3Yqd3ZRXJReHBXJc5ZmF/iS+yyq6MKF5zs8xMcLUhulzjv9ueKel3NSTk+TFJj/G9BIvBjMAJedZLd0UipB8JG1WSbfawLyeIQW1wCI5vINaEsLnlDy9SKOMS973tICjTKXhQwEFMgiG385awwRukkk2tzaQYfEG+B293c3A5JZ3yzW/iouapapj89wI7Zy+9jr3Yd8LLQstv3T9Yag6nz3Pxvw/mZpY9x0qZpyvF4ZvUydh4XUvbSrMd1kP/1G+Qm62gjFIgCf387T4p/IFVa1Cj41QrPPTYQrOuycwexeuei9O1nP9vUghCQDv1gR8Yllm0C/nG/ZCcD5CrQKUVlm9aetly4Kul 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)(39860400002)(376002)(136003)(396003)(346002)(46966005)(8936002)(19627235002)(2616005)(336012)(26005)(81166007)(478600001)(316002)(44832011)(82740400003)(1076003)(426003)(8676002)(356005)(83380400001)(186003)(47076004)(6916009)(86362001)(70206006)(7696005)(2906002)(54906003)(5660300002)(36756003)(70586007)(82310400003)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4532 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: a70d1119-f371-4d05-43b8-08d85f00f080 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FFoDJMd+i3bVMyZh/2TS1doFGn3s86MKe2P1wHAuApv5oHab4erVSksn0T+aE7LBtaiN6CD4kR4jeYVS5BeKAZN46nwcUMs/r905W4Xvl79jtt3t6muWi3apT80U9cRlJjUwfsjFinQwDFFgqVtFNhGCdrs3kccHbkEQ6CaXtdJCSUSbmKEFLFpSBqpfYeWgBnQTH1sdgt8gMMEz60Qutf4jmNxnkp2f6iV0KV8b7vqMz5+b9g5Nl8pkkorM+mS68AqXhDhiC0rhSLgfdEoiQoBSvdToBMJDHjLIvl5KEUj4cCWd5ErVPNojN7T1ZV6b2XqhsXYm4PLXFtLcY04gTgNUGvM7TF3BH9saPJ+D4CpDx5vyt6pJLDIgIhP/PJvfdA6qLsL4g/GfclfoR+GlyA== 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)(346002)(396003)(376002)(39860400002)(136003)(46966005)(70586007)(36756003)(5660300002)(7696005)(4326008)(19627235002)(44832011)(2616005)(6916009)(54906003)(478600001)(1076003)(426003)(336012)(186003)(26005)(8676002)(86362001)(8936002)(70206006)(47076004)(316002)(82740400003)(83380400001)(82310400003)(2906002)(81166007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 14:08:20.0195 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e2884fc-9b9e-4fbb-6fef-08d85f00f5bb 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: DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2099 Content-Type: text/plain Add Interrupt Vector Flag definitions for Extended Interrupt Descriptor, and macros to test the flags. Ref: ACPI specification 6.4.3.6 Signed-off-by: Sami Mujawar --- MdePkg/Include/IndustryStandard/Acpi10.h | 85 ++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/Acpi10.h b/MdePkg/Include/IndustryStandard/Acpi10.h index adeb5ae8c219f31d2403fc7aa217bfb4e1e44694..fa3f0694b9cf80bf9c1a325099a970b9cf8c1426 100644 --- a/MdePkg/Include/IndustryStandard/Acpi10.h +++ b/MdePkg/Include/IndustryStandard/Acpi10.h @@ -2,6 +2,7 @@ ACPI 1.0b definitions from the ACPI Specification, revision 1.0b Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -377,6 +378,90 @@ typedef struct { #define EFI_ACPI_MEMORY_NON_WRITABLE 0x00 // +// Interrupt Vector Flags definitions for Extended Interrupt Descriptor +// Ref ACPI specification 6.4.3.6 +// +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK BIT0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER 0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_CONSUMER BIT0 + +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_MODE_MASK BIT1 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_LEVEL_TRIGGERED 0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_EDGE_TRIGGERED BIT1 + +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_POLARITY_MASK BIT2 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_ACTIVE_HIGH 0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_ACTIVE_LOW BIT2 + +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK BIT3 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_EXCLUSIVE 0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARED BIT3 + +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLITY_MASK BIT4 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_NOT_WAKE_CAPABLE 0 +#define EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLE BIT4 + +/* Helper macros to test Extended Interrupt Resource descriptor flags. +*/ + +/** Test the Extended Interrupt flags to determine if the Device + is an Interrupt Consumer or Producer. + + @param [in] Flag Extended Interrupt Resource descriptor flag. + + @retval TRUE Device is Interrupt Consumer. + @retval FALSE Device is Interrupt Producer. +*/ +#define IS_EXTENDED_INTERRUPT_CONSUMER(Flag) \ + (((Flag) & EFI_ACPI_EXTENDED_INTERRUPT_FLAG_CONSUMER) == \ + EFI_ACPI_EXTENDED_INTERRUPT_FLAG_CONSUMER) + +/** Test if the Extended Interrupt is Edge or Level triggered. + + @param [in] Flag Extended Interrupt Resource descriptor flag. + + @retval TRUE Interrupt is Edge triggered. + @retval FALSE Interrupt is Level triggered. +*/ +#define IS_EXTENDED_INTERRUPT_EDGE_TRIGGERED(Flag) \ + (((Flag) & EFI_ACPI_EXTENDED_INTERRUPT_FLAG_EDGE_TRIGGERED) == \ + EFI_ACPI_EXTENDED_INTERRUPT_FLAG_EDGE_TRIGGERED) + +/** Test if the Extended Interrupt is Active Low or Active High. + + @param [in] Flag Extended Interrupt Resource descriptor flag. + + @retval TRUE Interrupt is Active Low. + @retval FALSE Interrupt is Active High. +*/ +#define IS_EXTENDED_INTERRUPT_ACTIVE_LOW(Flag) \ + (((Flag) & EFI_ACPI_EXTENDED_INTERRUPT_FLAG_ACTIVE_LOW) == \ + EFI_ACPI_EXTENDED_INTERRUPT_FLAG_ACTIVE_LOW) + +/** Test if the Extended Interrupt is Shared or Exclusive. + + @param [in] Flag Extended Interrupt Resource descriptor flag. + + @retval TRUE Interrupt is Shared. + @retval FALSE Interrupt is Exclusive. +*/ +#define IS_EXTENDED_INTERRUPT_SHARED(Flag) \ + (((Flag) & EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARED) == \ + EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARED) + +/** Test the Extended Interrupt flags to determine if the Device + is Wake capable or not. + + @param [in] Flag Extended Interrupt Resource descriptor flag. + + @retval TRUE Interrupt is Wake Capable. + @retval FALSE Interrupt is not Wake Capable. +*/ +#define IS_EXTENDED_INTERRUPT_WAKE_CAPABLE(Flag) \ + (((Flag) & EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLE) == \ + EFI_ACPI_EXTENDED_INTERRUPT_FLAG_WAKE_CAPABLE) + +// // Ensure proper structure formats // #pragma pack(1) -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'