From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mateusz Kulikowski Date: Sat, 25 Jun 2016 21:04:42 +0200 Subject: [U-Boot] [PATCH v7 3/9] armv8: Add Secure Monitor/Hypervisor Call (SMC/HVC) infrastructure In-Reply-To: <7c1595fe-f3a3-5a11-5f22-f729bf74e465@de.bosch.com> References: <1444841757-28043-1-git-send-email-s.temerkhanov@gmail.com> <1444841757-28043-4-git-send-email-s.temerkhanov@gmail.com> <568D10E5.4060005@gmail.com> <568E7F0F.5000001@xilinx.com> <568EDB1A.9030707@gmail.com> <7c1595fe-f3a3-5a11-5f22-f729bf74e465@de.bosch.com> Message-ID: <576ED5CA.203@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Dirk, On 23.06.2016 13:33, Dirk Behme wrote: [...] >>>> >>>> Idea: perhaps after this series is merged we can add 2 new commands to u-boot (SMC/HVC) to >>>> play with hypervisors/secure monitors (and perhaps use some simple functionality if needed). >>> >>> How this should look like? >> >> I thought of something like this (I did such code few times): >> >> u-boot> smc 42 42 42 42 42 42 >> ret => (0x1, 0x2, 0x3, 0x4) > > > Could you share any (example?) code you have for such an smc/hvc U-Boot command? I'm afraid I don't have it anymore :( SMC call itself is trivial, you can use smc_call @ u-boot: arch/arm/cpu/armv8/fwcall.c (this is code for armv8 in 64-bit mode, but you can easily port it to armv7) As for adding custom commands - just use any existing as template (sleep may be a good idea :) ). Regards, Mateusz