From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::42f; helo=mail-wr1-x42f.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8964A2119EF23 for ; Tue, 18 Dec 2018 01:26:31 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id p4so15108308wrt.7 for ; Tue, 18 Dec 2018 01:26:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=bErtXzIPNrc+mbYXw1pag1JT8UCFn1WqpID+UGl9tMs=; b=jWnW/vrp2YCx3u16bjcz6iPScwoqtmvPFNu4x7ygd9HvZJtyrzhlOxPj2UhcxlMr94 ycDJF3f83OM6gKqselwh5wk3l/ZUFOSjv9kMskD6wKlu3B+/Piot1M2YdLGFl3P5NZie CzEMF91dV4cpT47lElVvhmwXSw8pHdjG1i6Vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=bErtXzIPNrc+mbYXw1pag1JT8UCFn1WqpID+UGl9tMs=; b=H/OUyuJRzyqi9+pmEvGgzIU9d+sEGJoziarR3MYzaqdvVJBS9czOPf0bGHOJHErSNt oA5S1Dpc+dU25gbqv4mVx685sgpfAc4v8OxuOIPFML7n5nsYhhZscZqgtY7eFEoKagcf l0Nps8/92h7M2++lHJF60+nw3MRejd48b7+kLjNqn68VFhaAz8A4QrirVb1pRkvjHbZ5 3p3GefErvKDwCgUx/OIO4Nvg0tunQkwQWGvreGJhnTycnmTvD/POFH7S5K8aKAPkoNnt YhgKi0U7mDB1ZIKHSxZs0guap6bZE7UfVSs6ixT6n7XfHNL7DQ73wTgV1w9sUMc6TwX0 jWOA== X-Gm-Message-State: AA+aEWY3KYsxgC1IhK+F24TjRoIQyV7tzHiGexjZyFx59hKPdZel/H2g 4OUZeznSkclYQaxcTaE10HZjCg== X-Google-Smtp-Source: AFSGD/UGU9nxNDUVVtqD92uU3hiXl6bcywwEosRtLrHtT6fDknpBq1bQ5zKvQSqhnVLtGIf/FgeNYA== X-Received: by 2002:adf:c888:: with SMTP id k8mr14937459wrh.6.1545125189649; Tue, 18 Dec 2018 01:26:29 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id h13sm3514562wrp.61.2018.12.18.01.26.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Dec 2018 01:26:28 -0800 (PST) Date: Tue, 18 Dec 2018 09:26:27 +0000 From: Leif Lindholm To: Udit Kumar Cc: Sami Mujawar , Thomas Panakamattam Abraham , Meenakshi Aggarwal , Ard Biesheuvel , "edk2-devel (edk2-devel@lists.01.org)" , Ming Huang , Heyi Guo , Matteo Carlini , Nariman Poushin Message-ID: <20181218092626.juymiyl3yxjfqclb@bivouac.eciton.net> References: MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: SP805 driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2018 09:26:31 -0000 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Dec 18, 2018 at 05:20:59AM +0000, Udit Kumar wrote: > Thanks for note Leif, > > I am trying to understand this behavior of specification. > > >"If no handler has been registered, or the registered handler > >returns, then the system will be reset by calling the Runtime > >Service ResetSystem()." > I believe, this handler needs to be called by wdt driver after wdt > is expired. Meaning , we want wdt to work without resetting the > system. > Therefore a mask is needed with wdt, which will prevent to reset the > system. I see it working, at least for SP805, because of PMU mask > bits. Yes, if the WDT can be configured to generate an interrupt instead of a hardware reset, it can be used to implement this protocol. > Also ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c has this limitation. > I haven’t read spec of this wdt. I hope there should a mask around. No, the situation for the GenericWatchdogDxe is not as dire. Correct: it does not permit registering software handlers (which perhaps we should do something about, but is ... acceptable). _But_, it still conforms to the above text; when the timer expires, it resets the system by calling the ResetSystem() service. It does not directly force a hardware reset. The severe problem is not the lack of the ability to register the software handler (which does remove much of the utility), but the removal of reset control from the system firmware. > Coming back to hardware, which does not have mask around wdt, how to > implement this feature. Simple - you can't. You can absolutely implement exactly the functionality you have today, with minimal changes to the protocol - it just should not be registered as an implementation of EFI_WATCHDOG_TIMER_ARCH_PROTOCOL. Then your platform code can invoke this custom protocol as needed. Regards, Leif