From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39A1EC54EAA for ; Mon, 30 Jan 2023 18:14:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3C3A3857EA; Mon, 30 Jan 2023 19:14:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="dpqIYw8C"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5AE93857A4; Mon, 30 Jan 2023 19:14:01 +0100 (CET) Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DAC668580F for ; Mon, 30 Jan 2023 19:13:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82c.google.com with SMTP id v19so10913819qtq.13 for ; Mon, 30 Jan 2023 10:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VtUS5IbPkz/GZ7RKPyJUGBqHZdGmh7w22Y1Ou+bhEpc=; b=dpqIYw8CdqwwfDOzZ9yNyXB+baQEKvQl1nX8T9O6d8jyg/+B++eDAYcivuyaQjxPFu 8sG9+6JfO/mtFnbIHo91AcqolE7kC1aEjqmiBaBIEzMt1O4ZAxpeVdiozf3TLHSBRD3e qXId71x0SnOirR1L8CX6xaTP0ZbyjsqxQYcMs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VtUS5IbPkz/GZ7RKPyJUGBqHZdGmh7w22Y1Ou+bhEpc=; b=aANwmb5w3OnAil3KS3O55MUoOrXT7eDhw2FCsVFV5WDzdwkOyn3e+ws73mojRlCIAe 9hJ3gIl3qfppsc2GgpeztG+R2NTRLSduzSLViMwtB80VlmgYKY6772ig9tU7GBeIIFSR l9XlJ4Et1QXGglHDTI76OOX/cBhzOVKkdvZOCP76R98QwUj2WpJtohgDahCLUlKGHBC9 PjDN3TUGudJCjSdEBZQS9p9HHgxszXBE1+lwgHbt+pkOOJeH00PfYiDfSI5SNZ/ppo/P igas0EAm3ArOeeTD/Auv/xxG3ZPQUGZdTR++cfAnXurMVZTWqf+2kYQho7beci8mdu8S WpNQ== X-Gm-Message-State: AO0yUKUO11nnRyWz/X4E6YOrNS+4av3APHDwQiUlcdksoFfvvhW2C0ee H4kw68M019NzFT4Nm1FsT1oDEg== X-Google-Smtp-Source: AK7set9Ba9G4CCBhi09T4e+YCoZ6Xl6WPBYW2DB4tic2RAKVFzRt8E0PyzbHORg6Tj/uGYN6pKXfvw== X-Received: by 2002:ac8:5e4f:0:b0:3b8:20e5:733b with SMTP id i15-20020ac85e4f000000b003b820e5733bmr22681646qtx.51.1675102437565; Mon, 30 Jan 2023 10:13:57 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-31da-0362-f50e-b4ac.res6.spectrum.com. [2603:6081:7b00:6400:31da:362:f50e:b4ac]) by smtp.gmail.com with ESMTPSA id x14-20020a05620a258e00b0071b368cf074sm4968868qko.118.2023.01.30.10.13.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 10:13:57 -0800 (PST) Date: Mon, 30 Jan 2023 13:13:55 -0500 From: Tom Rini To: Heinrich Schuchardt Cc: Ilias Apalodimas , u-boot@lists.denx.de, Andre Przywara Subject: Re: [PATCH 1/1] efi_loader: stop watchdogs in ExitBootServices() Message-ID: References: <20230128085745.18389-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6Bem+DQFv7FHSSGC" Content-Disposition: inline In-Reply-To: <20230128085745.18389-1-heinrich.schuchardt@canonical.com> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --6Bem+DQFv7FHSSGC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 28, 2023 at 09:57:45AM +0100, Heinrich Schuchardt wrote: > The UEFI specification requires for ExitBootServices() that "the boot > services watchdog timer is disabled". We already disable the software > watchdog. We should additionally disable the hardware watchdogs. >=20 > Reported-by: Andre Przywara > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_boottime.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c > index ba28989f36..71215af9d2 100644 > --- a/lib/efi_loader/efi_boottime.c > +++ b/lib/efi_loader/efi_boottime.c > @@ -19,6 +19,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -2171,6 +2172,11 @@ static efi_status_t EFIAPI efi_exit_boot_services(= efi_handle_t image_handle, > list_del(&evt->link); > } > =20 > + /* Disable watchdogs */ > + efi_set_watchdog(0); > + if IS_ENABLED(CONFIG_WDT) > + wdt_stop_all(); > + > if (!efi_st_keep_devices) { > bootm_disable_interrupts(); > if (IS_ENABLED(CONFIG_USB_DEVICE)) > @@ -2196,10 +2202,6 @@ static efi_status_t EFIAPI efi_exit_boot_services(= efi_handle_t image_handle, > =20 > /* Recalculate CRC32 */ > efi_update_table_header_crc32(&systab.hdr); > - > - /* Give the payload some time to boot */ > - efi_set_watchdog(0); > - schedule(); > out: > if (IS_ENABLED(CONFIG_EFI_TCG2_PROTOCOL)) { > if (ret !=3D EFI_SUCCESS) I thought we had rejected going down this path since the UEFI spec is unhelpfully wrong if it insists this? --=20 Tom --6Bem+DQFv7FHSSGC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPYCOMACgkQFHw5/5Y0 tyzPeQv/XzMes4XKIEbWXhlto5OVtjETA4bJZ9HVzuDtrrFu/PFB1YmtpX78ETLk V3H5C5nPunv/KkNR1FeXmi0Wly9B7t6fgMjsDPqAlj2G+QJkFNAueYRveDMnm83S E+XBx5gcXvi6KlCEbndUQFKmqka0diGCKl2lRR44IAdsdyI1cT4EsjS32PvdvbHb 6XmpYnbP3pL9P5V2Z/dEp3ffUli1smwi0Q2tFrJ8TqX1q7Nl8fvCytSly3eo6iiF nLWwiKA5faCoKN8L2u6p/72nAmmK6US8FWIpqCIjq5wLkMO4yBZnKw9ICsGS3IeO RruFvggrX8O2GwArVjs0J+evCmrM1yvzGG+dJ+A5XQUmDtjx0UThae1ebWHEL+cI UNFkVJbJIEXWJza/2D/vQiHNufPwYECX4azkngAWWPDQbxWStt1kh4lYHTiWGByN 4BzjCzsbq+3WVOv1ry+4FqHBBE6t0VyA9q19K50POPeO0BK+BYfEnr5kElxudkBs X6NwLnox =g6K4 -----END PGP SIGNATURE----- --6Bem+DQFv7FHSSGC--