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 2B812C38A2D for ; Mon, 24 Oct 2022 12:09:04 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5ADB5806ED; Mon, 24 Oct 2022 14:09:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="jCQLmMk+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F853806F4; Mon, 24 Oct 2022 14:08:59 +0200 (CEST) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 C87AE806DD for ; Mon, 24 Oct 2022 14:08:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ed1-x52b.google.com with SMTP id a13so30484552edj.0 for ; Mon, 24 Oct 2022 05:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; 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=UYRJKuhhH5BtxHzfgViJHZbN4SUNaUYs4P14XVMbSLs=; b=jCQLmMk+ukXlIfzD2LCJVDgLkv270oahnRhCqP8yoKH2mLmNkdIFToy5uy46AYh2Kb dhYanwbbSklU3DGc0gTndhF7wUBODrduZywqKAqMhqPTQJ4Wb+csZMfiTMZXvTR5Z4rN ZQ6E3jbdTHdeGaoXpjtFan5y5cyR8WKlDKk9aWmXX4mvzErRmBhhVPIlcSAOfgJv2fiU Sv8+9G0MY5/XQ9svh/vJv4fh50j/odeGpkKcGisjV71MgJ5/1A/VM42/PMcT5FJlGsrN EIe9VtnhwJKRVk4yS5RE2NxH6hRfLxiuXMC6FgOTYXeoo90n/BAdo3Ir/K/DlypFNXjf sslw== 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=UYRJKuhhH5BtxHzfgViJHZbN4SUNaUYs4P14XVMbSLs=; b=Gx0OL0KTwSAUehaiIVo1/UCRLxXFN2+sJO8MockdJFlM3IszGrluvTzsX0R9RE5oUl eQWyuFUV+UruJaZGfMCYxIFJz8ZspmPDlPRZJ3WERMcftgqrVNcZ3rn6e4sv84jdJ9np UAKySJdk9+0rErDQNV/e5BDwzrdiLWoWGck4oEnNbz4TvSIkxisNw7UbdOXCGcY360fD J+bigeRCF3cfVbws7FGHpxIY7AeMWRszSmFzVbxJ0Lub4imrAMU5ViluOY63UDSMBELP FIiLWb76Pq9vdvAgCqrnMdwtXhOEJ1yMWEgNLye3v0kfsBP2UeZ5YX6P/pCygm1DNRcl eWHg== X-Gm-Message-State: ACrzQf2Mt0S7ZlqUaXMURkR9QOYKcw41tvqoSnVpCyRj9AcljQTMxcRI 3r/BStGlCM/6aEiwA3Pm1PtXxg== X-Google-Smtp-Source: AMsMyM5Pap6lUQIQ2FohyLfUAzlxGgUewu5OUUGxLlrO/tmQN6QniE757/an43V6UQDkFbEfG91b+Q== X-Received: by 2002:a05:6402:11d4:b0:45d:8733:7cc2 with SMTP id j20-20020a05640211d400b0045d87337cc2mr29781640edw.409.1666613336505; Mon, 24 Oct 2022 05:08:56 -0700 (PDT) Received: from hera (ppp046103015185.access.hol.gr. [46.103.15.185]) by smtp.gmail.com with ESMTPSA id o20-20020a170906769400b00783f32d7eaesm15639428ejm.164.2022.10.24.05.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 05:08:56 -0700 (PDT) Date: Mon, 24 Oct 2022 15:08:53 +0300 From: Ilias Apalodimas To: Abdellatif El Khlifi Cc: achin.gupta@arm.com, jens.wiklander@linaro.org, nd@arm.com, sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de, vishnu.banavath@arm.com, xueliang.zhong@arm.com, Drew.Reed@arm.com Subject: Re: [PATCH v6 04/10] arm_ffa: efi: unmap RX/TX buffers Message-ID: References: <20220926140827.15125-1-abdellatif.elkhlifi@arm.com> <20221013103857.614-1-abdellatif.elkhlifi@arm.com> <20221013103857.614-5-abdellatif.elkhlifi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221013103857.614-5-abdellatif.elkhlifi@arm.com> 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 On Thu, Oct 13, 2022 at 11:38:51AM +0100, Abdellatif El Khlifi wrote: > unmap RX/TX buffers at ExitBootServices() > > Unmapping the RX/TX buffers created by u-boot is needed before EFI > runtime. > > At EFI runtime the linux kernel takes care of allocating its own RX/TX > buffers and registering them with the secure world. > > Secure world should be using the RX/TX buffers created by the kernel. > So, RX/TX buffers created by u-boot must be unmapped. > > Signed-off-by: Abdellatif El Khlifi > Cc: Tom Rini > Cc: Simon Glass > Cc: Ilias Apalodimas > Cc: Jens Wiklander > --- > lib/efi_loader/efi_boottime.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c > index a56021559b..2054b33568 100644 > --- a/lib/efi_loader/efi_boottime.c > +++ b/lib/efi_loader/efi_boottime.c > @@ -3,6 +3,9 @@ > * EFI application boot time services > * > * Copyright (c) 2016 Alexander Graf > + * > + * (C) Copyright 2022 ARM Limited > + * Abdellatif El Khlifi > */ > > #include > @@ -23,6 +26,10 @@ > #include > #include > > +#if CONFIG_IS_ENABLED(ARM_FFA_TRANSPORT) > +#include > +#endif > + > DECLARE_GLOBAL_DATA_PTR; > > /* Task priority level */ > @@ -2178,6 +2185,14 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, > dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL); > } > > +#if CONFIG_IS_ENABLED(ARM_FFA_TRANSPORT) > + /* unmap FF-A RX/TX buffers */ > + if (ffa_bus_ops_get()->rxtx_unmap()) > + debug("[efi_boottime][ERROR]: can not unmap FF-A RX/TX buffers\n"); Just do log_err() here and get rid of the else > + else > + debug("[efi_boottime][INFO]: FF-A RX/TX buffers unmapped\n"); > +#endif > + > /* Patch out unsupported runtime function */ > efi_runtime_detach(); > > -- > 2.17.1 > Thanks /Ilias