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 0F2F3C77B75 for ; Wed, 19 Apr 2023 01:54:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8329C86215; Wed, 19 Apr 2023 03:50:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="KZt/cee+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1488F86218; Wed, 19 Apr 2023 03:50:35 +0200 (CEST) Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) (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 940B386218 for ; Wed, 19 Apr 2023 03:50:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-54fb615ac3dso269180167b3.2 for ; Tue, 18 Apr 2023 18:50:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1681869029; x=1684461029; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=upnDSQatdshc6ekR6NgrRIE+Blu3JWoSHr8AOdy0H54=; b=KZt/cee+TBF/XeXdTyt7gp7TgGeIu8XN9xwk7gl3BbDTPfocA1Re9H9VynvV1BkIF2 IEyQwzoU/gnUu1oabYl9rnz8F+q1MbKUxRg0+J3MGBGvAQzow+bvhbdKfNY5qAjQts0d K+MiACJE8UddIfxaDnZwqye4IDsA8H3yQDQQ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681869029; x=1684461029; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=upnDSQatdshc6ekR6NgrRIE+Blu3JWoSHr8AOdy0H54=; b=aZiYdodtt6aFk47peDkklQAs6mh5eyuauaZI+isnaRnRS2vC6ogDIq0em5+OIyWABO Kl/fuzLn04ve705bttwgc4dX/eL2AdljRXExvWOZg2anLvoGHKcm8sGPMxPpw7t+4QHq 8MSZ+rBgTef8z2h2OvNa3srdXQrNRwOTmCh69BroOYPL7qy0IRxawBdQIRWrJGdTEjQ8 A83+JvScakzYUm4rld22hMOwzP194mCBB1gtnIjKPUaixfOcDe2sWyxrFwiRhcswuImR 1t68t6ewiKwFfJ4rZyAHUz3bPj/m1zS3qvb7B1A9ix65KdeMlfrA8QW2zSJGHZ9xfA1T s4wA== X-Gm-Message-State: AAQBX9cN9h3CfkQHP7eN4Xf9OotWFjo/Soyc+2R38iZayCteCF+Zogg7 S7af6CJFUJ5vi6K5I3Z7oglqhulplIl7ufSuVWrs2g== X-Google-Smtp-Source: AKy350Zrd1FZJNeyHVRUlPY5T/kqxvBPBmMpzoTJlQIDr9UBUKyvThQgNCd37on2mGDXRJaeUyV1Xce+dmmWzVOeHps= X-Received: by 2002:a0d:da07:0:b0:541:69aa:4c6f with SMTP id c7-20020a0dda07000000b0054169aa4c6fmr1757615ywe.44.1681869029027; Tue, 18 Apr 2023 18:50:29 -0700 (PDT) MIME-Version: 1.0 References: <20230328161157.219375-1-abdellatif.elkhlifi@arm.com> <20230412094245.44674-1-abdellatif.elkhlifi@arm.com> <20230412094245.44674-7-abdellatif.elkhlifi@arm.com> In-Reply-To: <20230412094245.44674-7-abdellatif.elkhlifi@arm.com> From: Simon Glass Date: Tue, 18 Apr 2023 19:49:58 -0600 Message-ID: Subject: Re: [PATCH v11 06/10] arm_ffa: introduce sandbox FF-A support To: Abdellatif El Khlifi Cc: Drew.Reed@arm.com, achin.gupta@arm.com, ilias.apalodimas@linaro.org, jens.wiklander@linaro.org, nd@arm.com, robh@kernel.org, trini@konsulko.com, u-boot@lists.denx.de, xueliang.zhong@arm.com, Heinrich Schuchardt Content-Type: text/plain; charset="UTF-8" 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.8 at phobos.denx.de X-Virus-Status: Clean Hi Abdellatif, On Wed, 12 Apr 2023 at 03:43, Abdellatif El Khlifi wrote: > > Emulate Secure World's FF-A ABIs and allow testing U-Boot FF-A support > > Features of the sandbox FF-A support: > > - Introduce an FF-A emulator > - Introduce an FF-A device driver for FF-A comms with emulated Secure World > - Provides test methods allowing to read the status of the inspected ABIs > > The sandbox FF-A emulator supports only 64-bit direct messaging. > > Signed-off-by: Abdellatif El Khlifi > Cc: Tom Rini > Cc: Simon Glass > Cc: Ilias Apalodimas > Cc: Jens Wiklander > Cc: Heinrich Schuchardt > > --- > Changelog: > =============== > > v11: > > * rename ffa_try_discovery() to sandbox_ffa_discover() > * rename sandbox_ffa_query_core_state() to sandbox_query_ffa_emul_state() > * store the sandbox emulator pointer in the FF-A device uc_priv (struct ffa_priv) > * set the emulator as parent of the sandbox FF-A device This is close, but not quite what I expected. I suspect the emulator should be the child of the FF-A device, not the parent? You should update the devicetree to show that. You should not need to reparent anything. Then you put this in your FFA uclass so it binds the emulator: .post_bind = dm_scan_fdt_dev, Finding the emulator is probably then just a case of calling device_find_first_child(). I notice that you are sometimes breaking lines very short, e.g. the memset() lines. Please try to use all 80cols if you can. Regards, Simon