summaryrefslogtreecommitdiff
path: root/doc/README.semihosting
diff options
context:
space:
mode:
authorDarwin Rambo <drambo@broadcom.com>2014-06-09 11:12:59 -0700
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2014-07-03 08:35:45 +0200
commit261d27605c70f5c7644686df25ce76adf80a7a21 (patch)
treea966d774b34259fa5af60dd85b3cf4cc9517185d /doc/README.semihosting
parentfe8b3212b7938861eacdefe6115810303a96f9cc (diff)
downloadu-boot-imx-261d27605c70f5c7644686df25ce76adf80a7a21.zip
u-boot-imx-261d27605c70f5c7644686df25ce76adf80a7a21.tar.gz
u-boot-imx-261d27605c70f5c7644686df25ce76adf80a7a21.tar.bz2
arm: Add support for semihosting for armv8 fastmodel targets.
The armv8 ARM Trusted Firmware (ATF) can be used to load various ATF images and u-boot, and does this for virtual platforms by using semihosting. This commit extends this idea by allowing u-boot to also use semihosting to load the kernel/ramdisk/dtb. This eliminates the need for a bootwrapper and produces a more realistic boot sequence with virtual models. Though the semihosting code is quite generic, support for armv7 in fastmodel is less useful due to the wide range of available silicon and the lack of a free armv7 fastmodel, so this change contains an untested armv7 placeholder for the service trap opcode. Please refer to doc/README.semihosting for a more detailed description of semihosting and how it is used with the armv8 virtual platforms. Signed-off-by: Darwin Rambo <drambo@broadcom.com> Cc: trini@ti.com Cc: fenghua@phytium.com.cn Cc: bhupesh.sharma@freescale.com
Diffstat (limited to 'doc/README.semihosting')
-rw-r--r--doc/README.semihosting54
1 files changed, 54 insertions, 0 deletions
diff --git a/doc/README.semihosting b/doc/README.semihosting
new file mode 100644
index 0000000..7248560
--- /dev/null
+++ b/doc/README.semihosting
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2014 Broadcom Corporation.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+Semihosting is ARM's way of having a real or virtual target communicate
+with a host or host debugger for basic operations such as file I/O,
+console I/O, etc. Please see
+http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjjgij.html for more information.
+
+For developing on armv8 virtual fastmodel platforms, semihosting is a
+valuable tool since it allows access to image/configuration files before
+eMMC or other NV media are available.
+
+There are two main ARM virtual Fixed Virtual Platform (FVP) models,
+Versatile Express (VE) FVP and BASE FVP (See
+http://www.arm.com/products/tools/models/fast-models/foundation-model.php)
+The initial vexpress64 u-boot board created here runs on the VE virtual
+platform using the license-free Foundation_v8 simulator. Fortunately,
+the Foundation_v8 simulator also supports the BASE_FVP model which
+companies can purchase licenses for and contain much more functionality.
+So we can, in u-boot, run either model by either using the VE FVP (default),
+or turning on CONFIG_BASE_FVP for the more full featured model.
+
+Rather than create a new armv8 board similar to armltd/vexpress64, add
+semihosting calls to the existing one, enabled with CONFIG_SEMIHOSTING
+and CONFIG_BASE_FVP both set. Also reuse the existing board config file
+vexpress_aemv8a.h but differentiate the two models by the presence or
+absence of CONFIG_BASE_FVP. This change is tested and works on both the
+Foundation and Base fastmodel simulators.
+
+The level of semihosting support is minimal, restricted to just what it
+takes to load images to memory. If more semihosting functionality is
+required, such as file seek, outputting strings, reading characters, etc,
+then it can be easily added later.
+
+We require that the board include file define these env variables:
+- kernel_name e.g. "uImage"
+- kernel_addr_r e.g. "0x80000000"
+- initrd_name e.g. "ramdisk.img"
+- initrd_addr_r e.g. "0x88000000"
+- fdt_name e.g. "devtree.dtb"
+- fdt_addr_r e.g. "0x83000000"
+
+Optionally, "fdt_high" and "initrd_high" can be specified as per
+their rules for allowing or preventing copying of these images.
+
+For the "fdt chosen" startup macro, this code will then define:
+- initrd_end (based on retrieving initrd_addr_r plus actual initrd_size)
+
+We will then load the kernel, initrd, and fdt into the specified
+locations in memory in a similar way that the ATF fastmodel code
+uses semihosting calls to load other boot stages and u-boot itself.