From afcdb7ce1a76978f001be8e8e162c20f71868753 Mon Sep 17 00:00:00 2001 From: Olivier Deprez Date: Fri, 29 Nov 2019 14:21:48 +0100 Subject: cactus: update to SPCI Beta1 and add sample direct messaging test The scenario is: TFTF (acting as an "hypervisor" at NS-EL2) sends a direct message request to an SP targetting its SP ID. SPMD/SPMC relays the message down to SP. SP extracts the message payload, amends it and sends a direct message response to TFTF that SPMC/SPMD relay back to TFTF. This sample SP can be instantiated into multiple SPs. The early main entry flow discriminates the first VM from other secondary VMs by getting its running id through SPCI_ID_GET. The SP runs an infinite message loop and waits for a new message by calling SPCI_MSG_WAIT. Notice SPCI_MSG_WAIT is also the hint to SPMD that the SP initialized properly. About logging, only PVM for now has direct access to UART. 2nd VMs must use the debug log hypervisor call. Signed-off-by: Olivier Deprez Change-Id: I001261c3f54e0bc217e43fca6812d6cda1ac4430 --- spm/cactus/aarch64/cactus_entrypoint.S | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spm/cactus/aarch64') diff --git a/spm/cactus/aarch64/cactus_entrypoint.S b/spm/cactus/aarch64/cactus_entrypoint.S index 214b4cf..7d6b6b2 100644 --- a/spm/cactus/aarch64/cactus_entrypoint.S +++ b/spm/cactus/aarch64/cactus_entrypoint.S @@ -21,6 +21,12 @@ func cactus_entrypoint adr x0, stacks_end mov sp, x0 + /* Enable I-Cache */ + mrs x0, sctlr_el1 + orr x0, x0, #SCTLR_I_BIT + msr sctlr_el1, x0 + isb + /* And jump to the C entrypoint. */ b cactus_main -- cgit v1.2.3