From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.1.55; helo=eur02-he1-obe.outbound.protection.outlook.com; envelope-from=udit.kumar@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10055.outbound.protection.outlook.com [40.107.1.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9679520356253 for ; Mon, 4 Dec 2017 21:02:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=W+/+3x7ZafP9RD2l8n/9Ip61s35oWkgmwXnO7eqR0Q4=; b=sL5ysqAJiBVwUq4C8qnUcuaLdXbts1vBJzhBPs8ayoh2jB8Ei4GkBXL3h1eciNi5e2/T2yodUWqOKuIGEFtlsdv2ib9yNEGjcuQXIN+Czbpfqve+ACX+evR0UY6eteg5AhCvgRfKBcDtnUuTcNWdhs9sfotMWkiFpI5N2ZaHiaw= Received: from AM6PR0402MB3334.eurprd04.prod.outlook.com (52.133.18.151) by HE1PR04MB1003.eurprd04.prod.outlook.com (10.162.25.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Tue, 5 Dec 2017 05:07:01 +0000 Received: from AM6PR0402MB3334.eurprd04.prod.outlook.com ([fe80::51eb:bed3:cf67:f4be]) by AM6PR0402MB3334.eurprd04.prod.outlook.com ([fe80::51eb:bed3:cf67:f4be%13]) with mapi id 15.20.0282.012; Tue, 5 Dec 2017 05:07:00 +0000 From: Udit Kumar To: "Gao, Liming" , Leif Lindholm , "Kinney, Michael D" CC: Meenakshi Aggarwal , "ard.biesheuvel@linaro.org" , "edk2-devel@lists.01.org" , Varun Sethi Thread-Topic: [PATCH edk2-platforms] [PATCH v3 2/9] Platform/NXP : Add support for Watchdog driver Thread-Index: AQHTbQ0qQaor6kmHaUekvON9HDYV2KMzTYcAgADatJA= Date: Tue, 5 Dec 2017 05:07:00 +0000 Message-ID: References: <1511779917-9255-1-git-send-email-meenakshi.aggarwal@nxp.com> <1511779917-9255-3-git-send-email-meenakshi.aggarwal@nxp.com> <20171204143537.abxvjztldex2bjde@bivouac.eciton.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E189CAA@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E189CAA@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=udit.kumar@nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR04MB1003; 6:iR/Am7ReC3i1voD5h1w5qkWhqO0gmb9n96ntWQfAqq+QVTyzab95CYP8nWQmPN+TgTYEK8j3cLXLGYql1wb0tTu2o1eIGyiVxmXUd8P4GViWeZmmb+/t3D6pza5ep2fO8wqZ+bDUjXNeVYCUc2Y+UTTey9zI0FuRjL2mhWKw+Te7QAgwz5YXj3OyuScP7NrF9Y5Khu9YvUaD0mTClBy0N3IpPgGwf/baRJ+2NK0vDVPsZot2KbD4HYLPFAjPz+dsnMJ3ZMpJW8rJ6255X/fCNPzPJjhrLcHXiNXNCieEmDjxX/nKq7fjk4GgN9lkt2HS3tNJlMKLtKGNT+Ee4l1Xe1+iGyjDeQyWmtfLNwWzwJQ=; 5:SaePorBo81kmmP94gUnJpHCvt+/jUftfrKG6JYCh8QaTuqVnaC7P1GSCHMqy9wBkRnmkTXlTy2mwS8UwG+RpR3/cWgaP6Jn+TPwDCj5d+9ViVbhcc5c1fPHCP9Y9/dXLolztlqaFkZUy5SAWLVNIkfmx+5I43DffTpBwHYvt7ks=; 24:+mOFnE7DSiT5M+ZGYalGAZ6P+hx0CLvzltIDlL4+izcvJaeFpgVLnng/6vQsTXW7GANKXXZkVqJvftBb8+/4qgpthVw+YT5McaxpZU3xGCo=; 7:k/MGjRy8YHfLaM2iPqHICdhhqHbObNTdOoASRV2U/7gzjo92hEoJETAPNIQjSKJ7PnJEIl+PYUSJA5yy8aFdhA2wwfNyl7Vsp4PDmeQxY8mx+eHgoV4ta8VhlLdfN8+dEf64aPxh6Zd/LDU1VRP2D6kCsIUCfZqbo1PfuvXIuVL+e8l41n/8WykbrJ4XXQVj22/1HWBS+2imKCcOYRdRvlkyB08UlcuARrUi3n3BjC8Rp3VXw6AP8kPm9G9ZqFLX x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(366004)(39860400002)(189002)(13464003)(24454002)(199003)(81166006)(7736002)(53936002)(106356001)(68736007)(33656002)(2900100001)(2950100002)(8676002)(55016002)(14454004)(6246003)(4326008)(76176011)(54356011)(478600001)(66066001)(93886005)(81156014)(8936002)(86362001)(7696005)(189998001)(102836003)(54906003)(110136005)(97736004)(25786009)(3846002)(53546010)(99286004)(105586002)(5250100002)(6506006)(5660300001)(6116002)(305945005)(229853002)(74316002)(316002)(2906002)(101416001)(3660700001)(9686003)(3280700002)(6436002)(171213001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR04MB1003; H:AM6PR0402MB3334.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: def49c7b-3a69-4a4f-b9f2-08d53b9e047d x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(48565401081)(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286); SRVR:HE1PR04MB1003; x-ms-traffictypediagnostic: HE1PR04MB1003: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3231022)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123562025)(6072148)(201708071742011); SRVR:HE1PR04MB1003; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:HE1PR04MB1003; x-forefront-prvs: 0512CC5201 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: def49c7b-3a69-4a4f-b9f2-08d53b9e047d X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Dec 2017 05:07:00.8231 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1003 Subject: Re: [PATCH edk2-platforms] [PATCH v3 2/9] Platform/NXP : Add support for Watchdog driver 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: Tue, 05 Dec 2017 05:02:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > I suggest return EFI_UNSUPPORTED for this case. The protocol implementa= tion > could return its status besides spec defined status. Thanks to help me , how core will treat this error =20 1/ Wdt not available=20 2/ ignoring this error=20 3/ core is not registering handler =20 I guess 3 is valid,=20 On side track, looks wdt is not used by core services then do we really nee= d this=20 as part of arch protocol ? regards Udit=20 > -----Original Message----- > From: Gao, Liming [mailto:liming.gao@intel.com] > Sent: Monday, December 04, 2017 8:53 PM > To: Leif Lindholm ; Kinney, Michael D > > Cc: Meenakshi Aggarwal ; > ard.biesheuvel@linaro.org; edk2-devel@lists.01.org; Udit Kumar > ; Varun Sethi > Subject: RE: [PATCH edk2-platforms] [PATCH v3 2/9] Platform/NXP : Add sup= port > for Watchdog driver >=20 > Leif: > I suggest return EFI_UNSUPPORTED for this case. The protocol implementa= tion > could return its status besides spec defined status. >=20 > Thanks > Liming > > -----Original Message----- > > From: Leif Lindholm [mailto:leif.lindholm@linaro.org] > > Sent: Monday, December 4, 2017 10:36 PM > > To: Kinney, Michael D ; Gao, Liming > > > > Cc: Meenakshi Aggarwal ; > > ard.biesheuvel@linaro.org; edk2-devel@lists.01.org; > > udit.kumar@nxp.com; v.sethi@nxp.com > > Subject: Re: [PATCH edk2-platforms] [PATCH v3 2/9] Platform/NXP : Add > > support for Watchdog driver > > > > Mike, Liming, as MdePkg mainteiners - one question below: > > > > On Mon, Nov 27, 2017 at 04:21:50PM +0530, Meenakshi Aggarwal wrote: > > > diff --git a/Platform/NXP/Drivers/WatchDog/WatchDog.c > > > b/Platform/NXP/Drivers/WatchDog/WatchDog.c > > > new file mode 100644 > > > index 0000000..a9c70ef > > > --- /dev/null > > > +++ b/Platform/NXP/Drivers/WatchDog/WatchDog.c > > > @@ -0,0 +1,421 @@ > > > > ... > > > > > +/** > > > + This function registers the handler NotifyFunction so it is > > > +called every time > > > + the watchdog timer expires. It also passes the amount of time > > > +since the last > > > + handler call to the NotifyFunction. > > > + If NotifyFunction is not NULL and a handler is not already > > > +registered, > > > + then the new handler is registered and EFI_SUCCESS is returned. > > > + If NotifyFunction is NULL, and a handler is already registered, > > > + then that handler is unregistered. > > > + If an attempt is made to register a handler when a handler is > > > +already registered, > > > + then EFI_ALREADY_STARTED is returned. > > > + If an attempt is made to unregister a handler when a handler is > > > +not registered, > > > + then EFI_INVALID_PARAMETER is returned. > > > + > > > + @param This The EFI_TIMER_ARCH_PROTOCOL instance. > > > + @param NotifyFunction The function to call when a timer interru= pt fires. > This > > > + function executes at TPL_HIGH_LEVEL. The = DXE Core will > > > + register a handler for the timer interrup= t, so it can know > > > + how much time has passed. This informatio= n is used to > > > + signal timer based events. NULL will unre= gister the handler. > > > + > > > + @retval EFI_SUCCESS The watchdog timer handler was regis= tered. > > > + @retval EFI_ALREADY_STARTED NotifyFunction is not NULL, and a > handler is already > > > + registered. > > > + @retval EFI_INVALID_PARAMETER NotifyFunction is NULL, and a handle= r > was not > > > + previously registered. > > > + > > > +**/ > > > +STATIC > > > +EFI_STATUS > > > +EFIAPI > > > +WdogRegisterHandler ( > > > + IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This, > > > + IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction > > > + ) > > > +{ > > > + // ERROR: This function is not supported. > > > + // The hardware watchdog will reset the board > > > + return EFI_INVALID_PARAMETER; > > > > Michael, Liming - what's your take on this? > > > > Is EFI_WATCHDOG_TIMER_ARCH_PROTOCOL suitable for use with a pure-hw > > watchdog such as this? > > > > If so, what would be a suitable return code here? > > EFI_INVALID_PARAMETER does not look ideal. > > > > / > > Leif