From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0072.outbound.protection.outlook.com [104.47.2.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 22CC621E7493A for ; Fri, 15 Sep 2017 02:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mvi8d/kKsIvZ3eZQV4K4DatKHTBGhH0wMMxZdwFQD2s=; b=gxgcGeMyWlBESgO3aAwubruv4MTL55vR3BCwQ9xd33wF0J17vgv13ux7iCwdyI9Ta7W2Z2ostZixHEzhE8AOrCLIQbsa31pamGru2sZ3QZT83KpRxdzMH3u67As7iZRQjfq04yGrfKSjfdWiyQAeJ9qmy/SD/tByY4ZF8YUi81E= Received: from DB5PR08MB1014.eurprd08.prod.outlook.com (10.166.14.11) by DB5PR08MB0790.eurprd08.prod.outlook.com (10.164.42.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Fri, 15 Sep 2017 09:21:44 +0000 Received: from DB5PR08MB1014.eurprd08.prod.outlook.com ([fe80::4c98:c840:d411:4259]) by DB5PR08MB1014.eurprd08.prod.outlook.com ([fe80::4c98:c840:d411:4259%14]) with mapi id 15.20.0035.021; Fri, 15 Sep 2017 09:21:44 +0000 From: Alexei Fedorov To: Leif Lindholm , Evan Lloyd CC: "edk2-devel@lists.01.org" , nd , "Ard Biesheuvel" Thread-Topic: [edk2] [PATCH 2/5] EmbeddedPkg: Introduce HardwareInterrupt2 protocol Thread-Index: AQHTKxH5Qd1W+8uZbUiM4EWFsScyfaK0mr4AgAEWnck= Date: Fri, 15 Sep 2017 09:21:44 +0000 Message-ID: References: <20170911152335.72672-1-evan.lloyd@arm.com> <20170911152335.72672-3-evan.lloyd@arm.com>, <20170914164224.lqrqkq4ot3ozftyo@bivouac.eciton.net> In-Reply-To: <20170914164224.lqrqkq4ot3ozftyo@bivouac.eciton.net> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexei.Fedorov@arm.com; x-originating-ip: [217.140.96.140] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR08MB0790; 6:UDRzctYuUuESwp1DQCD4wFLGESuUmr9xRCjL+1//u9e8ElNqlcA6i730g53gNxrXsCJcR/7QpLwDxiCbQ0L8sOQj3AH7Gg/G37+uKBN/Bir9SJ/2JjlCznGR85cYrTFCDvAcOLhlPAhwEgopL5YFOE/cLHnrmnE1sBNagkVRlwwEJx/4vawmZWmmhjSm6L2BdsA7kBiINE2+p0XnvQ7iNOg1Sc8D3PtMvtFnfGA/3HLo9ebrUfxTUB4vvXBtRpbgdeoEbR3fCJzeUre7oxgFT7EH+Dvs9A8mz+qlllSKcdt9cQWzHmV/82grBQ6YAtn6hRmGQsxMTUoscDqdYEYPFg==; 5:K7WG6vhkMc6eZZDYTHkeVDm7BVH4KAgggc7LkEfDn5PMHM8w88Q9sFd3NqkOdu5SupcdKP2KcytH8TD6c/CobyDxegAOyKU5FCTDHPfVDj1CmXxFhNaX2sMS6T14s3XUqP5gje/sPMd1KtKgnevZnw==; 24:m4Vwk5/q6dL/CwXbXG8PfPjmOHkUsRTd0+r/LJ4GPoAhG7c8tN0OBcxVB/7uGnlCBM8M2888YUgzTRv8ixIrtD/s6a9Zg1NT4+p58GA0X8I=; 7:CpRn8CG7vAChoAQf61lHdPsxFbRnNWBrhiVyXLrln3skc7v9QdHm/xUu+gcKszs4AG8KC7NEIAmLo58reQKZidaapM5rDqdGOfxJpLJ7p5514GFIZ1kU7SFEgZOQ7XhyW3cz+zmidITrBJ6Jho28CS20OlRc8J2B0Ye1UlPXK9ZfkcXEXS8e7IZZZ0ibTBKGYtryrNnWjBOLj7oG7sP+GlQ340ES81K/BPBdR18w31k= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: f74b4445-d94a-42f5-e003-08d4fc1b2ec7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DB5PR08MB0790; x-ms-traffictypediagnostic: DB5PR08MB0790: nodisclaimer: True x-exchange-antispam-report-test: UriScan:(158342451672863)(180628864354917)(162533806227266); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB5PR08MB0790; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB5PR08MB0790; x-forefront-prvs: 0431F981D8 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(376002)(199003)(189002)(24454002)(105586002)(2906002)(2950100002)(106356001)(316002)(74316002)(8936002)(6636002)(229853002)(6246003)(6116002)(53376002)(575784001)(102836003)(3846002)(86362001)(7696004)(5250100002)(4326008)(6436002)(6506006)(7736002)(14454004)(5660300001)(101416001)(478600001)(33656002)(25786009)(72206003)(68736007)(97736004)(53936002)(189998001)(15188155005)(76176999)(50986999)(236005)(2900100001)(66066001)(81166006)(3660700001)(8676002)(81156014)(54356999)(606006)(966005)(3280700002)(16799955002)(6306002)(99286003)(55016002)(54896002)(9686003)(54906002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR08MB0790; H:DB5PR08MB1014.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2017 09:21:44.3843 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0790 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: [PATCH 2/5] EmbeddedPkg: Introduce HardwareInterrupt2 protocol X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 09:18:51 -0000 Content-Language: en-GB Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In "Signal to the hardware that the End Of Intrrupt state has been reached." I= ntrrupt -> Interrupt ________________________________ From: edk2-devel on behalf of Leif Lindho= lm Sent: 14 September 2017 17:42:24 To: Evan Lloyd Cc: edk2-devel@lists.01.org; nd; Ard Biesheuvel Subject: Re: [edk2] [PATCH 2/5] EmbeddedPkg: Introduce HardwareInterrupt2 p= rotocol On Mon, Sep 11, 2017 at 04:23:32PM +0100, evan.lloyd@arm.com wrote: > From: Ard Biesheuvel > > The existing HardwareInterrupt protocol lacks the means to configure > the level/edge and polarity properties of an interrupt. So introduce a > new protocol HardwareInterrupt2, and add some new members that allow > manipulation of those properties. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > Signed-off-by: Girish Pathak > Signed-off-by: Evan Lloyd > Tested-by: Girish Pathak Reviewed-by: Leif Lindholm > --- > EmbeddedPkg/EmbeddedPkg.dec | 1 + > EmbeddedPkg/Include/Protocol/HardwareInterrupt2.h | 182 ++++++++++++++++= ++++ > 2 files changed, 183 insertions(+) > > diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec > index 0be102ad9c767d81a004c757f40a65063aab1d7a..151b1d503dee463d529a173d2= 555b6c9208100e5 100644 > --- a/EmbeddedPkg/EmbeddedPkg.dec > +++ b/EmbeddedPkg/EmbeddedPkg.dec > @@ -69,6 +69,7 @@ [Guids.common] > > [Protocols.common] > gHardwareInterruptProtocolGuid =3D { 0x2890B3EA, 0x053D, 0x1643, { 0x= AD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } } > + gHardwareInterrupt2ProtocolGuid =3D { 0x32898322, 0x2da1, 0x474a, { 0x= ba, 0xaa, 0xf3, 0xf7, 0xcf, 0x56, 0x94, 0x70 } } > gEfiDebugSupportPeriodicCallbackProtocolGuid =3D { 0x9546e07c, 0x2cbb,= 0x4c88, { 0x98, 0x6c, 0xcd, 0x34, 0x10, 0x86, 0xf0, 0x44 } } > gEfiEblAddCommandProtocolGuid =3D { 0xaeda2428, 0x9a22, 0x4637, { 0x= 9b, 0x21, 0x54, 0x5e, 0x28, 0xfb, 0xb8, 0x29 } } > gEmbeddedDeviceGuid =3D { 0xbf4b9d10, 0x13ec, 0x43dd, { 0x88, 0x80, = 0xe9, 0xb, 0x71, 0x8f, 0x27, 0xde } } > diff --git a/EmbeddedPkg/Include/Protocol/HardwareInterrupt2.h b/Embedded= Pkg/Include/Protocol/HardwareInterrupt2.h > new file mode 100644 > index 0000000000000000000000000000000000000000..505052bd81afe7432e3122a27= 22ceab348777c29 > --- /dev/null > +++ b/EmbeddedPkg/Include/Protocol/HardwareInterrupt2.h > @@ -0,0 +1,182 @@ > +/** @file > + > + Copyright (c) 2016-2017, Linaro Ltd. All rights reserved.
> + > + This program and the accompanying materials > + are licensed and made available under the terms and conditions of the = BSD License > + which accompanies this distribution. The full text of the license may= be found at > + http://opensource.org/licenses/bsd-license.php > + > + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR I= MPLIED. > + > +**/ > + > +#ifndef __HARDWARE_INTERRUPT2_H__ > +#define __HARDWARE_INTERRUPT2_H__ > + > +#include > + > +// 22838932-1a2d-4a47-aaba-f3f7cf569470 > + > +#define EFI_HARDWARE_INTERRUPT2_PROTOCOL_GUID \ > + { 0x32898322, 0x2d1a, 0x474a, \ > + { 0xba, 0xaa, 0xf3, 0xf7, 0xcf, 0x56, 0x94, 0x70 } } > + > +typedef enum { > + EFI_HARDWARE_INTERRUPT2_TRIGGER_LEVEL_LOW, > + EFI_HARDWARE_INTERRUPT2_TRIGGER_LEVEL_HIGH, > + EFI_HARDWARE_INTERRUPT2_TRIGGER_EDGE_FALLING, > + EFI_HARDWARE_INTERRUPT2_TRIGGER_EDGE_RISING, > +} EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE; > + > +typedef struct _EFI_HARDWARE_INTERRUPT2_PROTOCOL \ > + EFI_HARDWARE_INTERRUPT2_PROTOCOL; > + > +/** > + Register Handler for the specified interrupt source. > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + @param Handler Callback for interrupt. NULL to unregister > + > + @retval EFI_SUCCESS Source was updated to support Handler. > + @retval EFI_DEVICE_ERROR Hardware could not be programmed. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_REGISTER) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source, > + IN HARDWARE_INTERRUPT_HANDLER Handler > + ); > + > + > +/** > + Enable interrupt source Source. > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + > + @retval EFI_SUCCESS Source interrupt enabled. > + @retval EFI_DEVICE_ERROR Hardware could not be programmed. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_ENABLE) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source > + ); > + > + > +/** > + Disable interrupt source Source. > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + > + @retval EFI_SUCCESS Source interrupt disabled. > + @retval EFI_DEVICE_ERROR Hardware could not be programmed. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_DISABLE) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source > + ); > + > + > +/** > + Return current state of interrupt source Source. > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + @param InterruptState TRUE: source enabled, FALSE: source disabled. > + > + @retval EFI_SUCCESS InterruptState is valid > + @retval EFI_DEVICE_ERROR InterruptState is not valid > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_INTERRUPT_STATE) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source, > + IN BOOLEAN *InterruptState > + ); > + > +/** > + Signal to the hardware that the End Of Intrrupt state > + has been reached. > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + > + @retval EFI_SUCCESS Source interrupt EOI'ed. > + @retval EFI_DEVICE_ERROR Hardware could not be programmed. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_END_OF_INTERRUPT) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source > + ); > + > +/** > + Return the configured trigger type for an interrupt source > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + @param TriggerType The configured trigger type > + > + @retval EFI_SUCCESS Operation successful > + @retval EFI_DEVICE_ERROR Information could not be returned > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_GET_TRIGGER_TYPE) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source, > + OUT EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE *TriggerType > + ); > + > + > +/** > + Configure the trigger type for an interrupt source > + > + @param This Instance pointer for this protocol > + @param Source Hardware source of the interrupt > + @param TriggerType The trigger type to configure > + > + @retval EFI_SUCCESS Operation successful > + @retval EFI_DEVICE_ERROR Hardware could not be programmed. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *HARDWARE_INTERRUPT2_SET_TRIGGER_TYPE) ( > + IN EFI_HARDWARE_INTERRUPT2_PROTOCOL *This, > + IN HARDWARE_INTERRUPT_SOURCE Source, > + IN EFI_HARDWARE_INTERRUPT2_TRIGGER_TYPE TriggerType > + ); > + > +struct _EFI_HARDWARE_INTERRUPT2_PROTOCOL { > + HARDWARE_INTERRUPT2_REGISTER RegisterInterruptSource; > + HARDWARE_INTERRUPT2_ENABLE EnableInterruptSource; > + HARDWARE_INTERRUPT2_DISABLE DisableInterruptSource; > + HARDWARE_INTERRUPT2_INTERRUPT_STATE GetInterruptSourceState; > + HARDWARE_INTERRUPT2_END_OF_INTERRUPT EndOfInterrupt; > + > + // v2 members > + HARDWARE_INTERRUPT2_GET_TRIGGER_TYPE GetTriggerType; > + HARDWARE_INTERRUPT2_SET_TRIGGER_TYPE SetTriggerType; > +}; > + > +extern EFI_GUID gHardwareInterrupt2ProtocolGuid; > + > +#endif > -- > Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel