summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch')
-rw-r--r--meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch
new file mode 100644
index 0000000000..05b5e4d1ab
--- /dev/null
+++ b/meta-arm/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch
@@ -0,0 +1,95 @@
+From 78547a9f322b981a93bbeeb48b3eda1d2ab35cd0 Mon Sep 17 00:00:00 2001
+From: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
+Date: Fri, 23 Jun 2023 13:44:10 +0100
+Subject: [PATCH 08/33] FF-A v15: arm_ffa: introduce armffa command Sandbox
+ test
+
+Add Sandbox test for the armffa command
+
+Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
+Reviewed-by: Simon Glass <sjg@chromium.org>
+Cc: Tom Rini <trini@konsulko.com>
+Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
+Cc: Jens Wiklander <jens.wiklander@linaro.org>
+Upstream-Status: Submitted [cover letter: https://lore.kernel.org/all/20230713132847.176000-1-abdellatif.elkhlifi@arm.com/]
+---
+ MAINTAINERS | 1 +
+ test/cmd/Makefile | 2 ++
+ test/cmd/armffa.c | 33 +++++++++++++++++++++++++++++++++
+ 3 files changed, 36 insertions(+)
+ create mode 100644 test/cmd/armffa.c
+
+diff --git a/MAINTAINERS b/MAINTAINERS
+index ccd7859c88..885d91fe5c 100644
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -276,6 +276,7 @@ F: doc/arch/arm64.ffa.rst
+ F: doc/usage/cmd/armffa.rst
+ F: drivers/firmware/arm-ffa/
+ F: include/arm_ffa.h
++F: test/cmd/armffa.c
+ F: test/dm/ffa.c
+
+ ARM FREESCALE IMX
+diff --git a/test/cmd/Makefile b/test/cmd/Makefile
+index 055adc65a2..1d1dbb4fbc 100644
+--- a/test/cmd/Makefile
++++ b/test/cmd/Makefile
+@@ -1,6 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0+
+ #
+ # Copyright (c) 2013 Google, Inc
++# Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+
+ ifdef CONFIG_HUSH_PARSER
+ obj-$(CONFIG_CONSOLE_RECORD) += test_echo.o
+@@ -23,6 +24,7 @@ obj-$(CONFIG_CMD_SEAMA) += seama.o
+ ifdef CONFIG_SANDBOX
+ obj-$(CONFIG_CMD_READ) += rw.o
+ obj-$(CONFIG_CMD_SETEXPR) += setexpr.o
++obj-$(CONFIG_ARM_FFA_TRANSPORT) += armffa.o
+ endif
+ obj-$(CONFIG_CMD_TEMPERATURE) += temperature.o
+ obj-$(CONFIG_CMD_WGET) += wget.o
+diff --git a/test/cmd/armffa.c b/test/cmd/armffa.c
+new file mode 100644
+index 0000000000..9a44a397e8
+--- /dev/null
++++ b/test/cmd/armffa.c
+@@ -0,0 +1,33 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * Test for armffa command
++ *
++ * Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
++ *
++ * Authors:
++ * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
++ */
++
++#include <common.h>
++#include <string.h>
++#include <asm/sandbox_arm_ffa.h>
++#include <dm/test.h>
++#include <test/test.h>
++#include <test/ut.h>
++
++/* Basic test of 'armffa' command */
++static int dm_test_armffa_cmd(struct unit_test_state *uts)
++{
++ /* armffa getpart <UUID> */
++ ut_assertok(run_command("armffa getpart " SANDBOX_SERVICE1_UUID, 0));
++
++ /* armffa ping <ID> */
++ ut_assertok(run_commandf("armffa ping 0x%x", SANDBOX_SP1_ID));
++
++ /* armffa devlist */
++ ut_assertok(run_command("armffa devlist", 0));
++
++ return 0;
++}
++
++DM_TEST(dm_test_armffa_cmd, UT_TESTF_SCAN_FDT | UT_TESTF_CONSOLE_REC);
+--
+2.25.1
+