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 E831DC433EF for ; Sun, 3 Apr 2022 00:21:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 51D3883CAF; Sun, 3 Apr 2022 02:16:54 +0200 (CEST) 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="IjXLfUIQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5AEC583C59; Sun, 3 Apr 2022 02:16:44 +0200 (CEST) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (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 2629F83C16 for ; Sun, 3 Apr 2022 02:16:35 +0200 (CEST) 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-x82b.google.com with SMTP id c4so5100670qtx.1 for ; Sat, 02 Apr 2022 17:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ryZoLZNHEwZhjZa8mOB9m6NH5EpMV6wM1Ou/I5v5eEE=; b=IjXLfUIQGbupHDDvgN3Pe/nXjyptmhJeFl7p7OuwO/5JRKumFoffS3KvEuahPuGCTM xGcPRBAui89Lb2OfWcPf2LwIUx1LiH8P54z4cPPbQDx3hG2xcAvMmeQ4J0hMe/pja1g0 ufhvgl8pDCs5T1jYMY7ZmjyGz85AkT16TXAvI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ryZoLZNHEwZhjZa8mOB9m6NH5EpMV6wM1Ou/I5v5eEE=; b=w5Fx8ErjLmwZWS4krbCDAZDOHWbHxwZIwQn+PQtttbFP32mY7xwV+5tGe5MPI5IMy9 0lf61H52gCbDomlaDO9VSnDYR9BADQGy9encr4ArkGLWCDAV/H6IHofpLHh+nr4624Ox Vxa4gk57fC6lF3f9gNdxo6qwNvqA0vEVu+mbwBErua7vD+bWOfkr5j5lSgQSfW0+s4Bc jhWXbC5PUXW0E4k1IqhXxAWwFm+6F9z8CkqGxzVyM0lO2BDWPw+TPfXFZwzgjID5Yft+ YFn7b2M4FHYiHr2QaOAjilO5RGI8TozyN8ba72OQjURz/iSghGTB0q0vR1EtjGUjzlW8 jlbg== X-Gm-Message-State: AOAM532YaQOXGw9IpaFML8xW0ZLcWFmY9deTuOsTlO8reVr9J/JhpNH5 c3DzGCp1mrrJQVRXtnU9Dnub1Ibm06oQeg== X-Google-Smtp-Source: ABdhPJzpA92X2AjmkygNAj8jT+USrdldb6z3hlZ7bjVocHO/l5cmzKl+UJRuA8nFKSHpao2keTqXNA== X-Received: by 2002:ac8:5cc2:0:b0:2eb:8308:91f3 with SMTP id s2-20020ac85cc2000000b002eb830891f3mr13182629qta.280.1648944994003; Sat, 02 Apr 2022 17:16:34 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id p13-20020a05622a048d00b002e1ce0c627csm5231006qtx.58.2022.04.02.17.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 17:16:33 -0700 (PDT) Date: Sat, 2 Apr 2022 20:16:31 -0400 From: Tom Rini To: Sean Anderson Cc: Linus Walleij , Liviu Dudau , Andre Przywara , Simon Glass , u-boot@lists.denx.de Subject: Re: [PATCH v3 22/29] arm: smh: Add option to detect semihosting Message-ID: <20220403001631.GE14476@bill-the-cat> References: <20220322205938.1721846-1-sean.anderson@seco.com> <20220322205938.1721846-23-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VvBvkXET3ybLhzUi" Content-Disposition: inline In-Reply-To: <20220322205938.1721846-23-sean.anderson@seco.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.5 at phobos.denx.de X-Virus-Status: Clean --VvBvkXET3ybLhzUi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 04:59:30PM -0400, Sean Anderson wrote: > These functions are intended to support detecting semihosting and > falling back gracefully to alternative implementations. The test starts > by making semihosting call. SYS_ERRNO is chosen because it should not > mutate any state. If this semihosting call results in an exception > (rather than being caught by the debugger), then the exception handler > should call disable_semihosting() and resume execution after the call. >=20 > Ideally, this would just be part of semihosting by default, and not a > separate config. However, to reduce space ARM SPL doesn't include > exception vectors by default. This means we can't detect if a > semihosting call failed unless we enable them. To avoid forcing them to > be enabled, we use a separate config option. It might also be possible > to try and detect whether a debugger has enabled (by reading HDE from > DSCR), but I wasn't able to figure out a way to do this from all ELs. >=20 > This patch just introduces the generic code to handle detection. The > next patch will implement it for arm64 (but not arm32). >=20 > Signed-off-by: Sean Anderson Applied to u-boot/next, thanks! --=20 Tom --VvBvkXET3ybLhzUi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJI518ACgkQFHw5/5Y0 tyxRgQv/c56JhbLQqa+5Ttbs1+2DWcSdZJCzH6c4A9fHXjs2gt5RZmjYBFIxfPWk CURouBKHBAOi/c1mqzZLCTUOZ9JOaNuITUGW2BHe8KicSy08rMooq9cKSb040OLY UaI/ltlu1wqvjc7L6pCzukBpZmR9DnH2EqXur5JWAjZ34bm2l2mWKmtklHDGAO/B ShF/usMNlWHiw66Rp2wQo/Ti1Ol97mfW6Yqes/Dv0AxetuAxKJc8E0l1B0Z1JH0Z 99XulqWv/y+yGq8uKPII6wWZRNh8W5ORkHrJ1U3ZUDdefpYOcQ2F0rgjz6ZiZnX/ 2RvlqMCco4lxZ1svcIVgCJINvybg45ZRNHoXf8LlJEmV/Mahyvw1D/QuyBP91UBZ JgCpVIupG2DUBOU5DV6/hM2GW8Y5Ogd65mjMpzMhpnd7j5VfvlB8aXfG6tOsj+BE emSFIN8XvG+MDE9z/gOZjmTZ8N6D6pLV6/Il92penlYxGzAdh3Kzs6kbtM/P3315 k8Or2Ir8 =B46A -----END PGP SIGNATURE----- --VvBvkXET3ybLhzUi--