summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/cpu/cpu.c
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: Tidy up terminal restoreSimon Glass2015-06-041-0/+2
| | | | | | | | | For some reason 'u-boot -D' does not restore the terminal correctly when the 'reset' command is used. Call the terminal restore function explicitly in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* sandbox: Add test function to advance timeJoe Hershberger2015-05-051-5/+0
| | | | | | | | | | Add a function that maintains an offset to include in the system timer values returned from the lib/time.c APIs. This will allow timeouts to be skipped instantly in tests Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* fdt: sandbox: Move setup code from board_f to fdtdecSimon Glass2015-04-231-0/+41
| | | | | | | We want to be able to set up the device tree in SPL, so move this code to a common place. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Split bootm code out into lib/bootmSjoerd Simons2015-04-191-12/+0
| | | | | | | | Follow the convention of other architectures and move the platform specific linux bootm code into sandbox/lib/bootm.c. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Acked-by: Simon Glass <sjg@chromium.org>
* dm: sandbox: pci: Add PCI support for sandboxSimon Glass2015-04-161-1/+40
| | | | | | | | Add the required header information, device tree nodes and I/O accessor functions to support PCI on sandbox. All devices are emulated by drivers which can be added as required for testing or development. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Remove all drivers before exitSimon Glass2014-07-231-0/+4
| | | | | | | | | | | Drivers are supposed to be able to close down cleanly. To set a good example, make sandbox shut down its driver model drivers and remove them before exit. It may be desirable to do the same more generally once driver model is more widely-used. This could be done during bootm, before U-Boot jumps to the OS. It seems far too early to make this change. Signed-off-by: Simon Glass <sjg@chromium.org>
* Use a const pointer for map_to_sysmem()Simon Glass2014-03-171-1/+1
| | | | | | | This function does not actually change the pointer contents, so use const so that functions which have a const pointer do not need to cast. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Allow reading/writing of RAM bufferSimon Glass2014-01-081-0/+4
| | | | | | | | | | | | | It is useful to be able to save and restore the RAM contents of sandbox U-Boot either for setting up tests, for later analysys, or for chaining together multiple tests which need to keep the same memory contents. Add a function to provide a memory file for U-Boot. This is read on start-up and written when shutting down. If the file does not exist on start-up, it will be created when shutting down. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Implement the bootm command for sandboxSimon Glass2014-01-081-2/+15
| | | | | | | | | | When sandbox does a 'bootm' to run a kernel we cannot actually execute it. So just exit sandbox, which is essentially what U-Boot does on other archs. Also, allow sandbox to use bootm on any kernel, so that it can be used to test booting of kernels from any architecture. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* sandbox: Support trace featureSimon Glass2013-06-261-1/+1
| | | | | | | | | | Support tracing on sandbox by adding suitable CONFIG options. To enable it, compile U-Boot with FTRACE=1. The timer functions are marked to skip tracing, since these are called from the tracing code itself, and we want to avoid an infinite loop. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Provide a way to map from host RAM to U-Boot RAMSimon Glass2013-05-011-0/+5
| | | | | | | | | | | | | | | | | | | | | In many cases, pointers to memory are passed around, and these pointers refer to U-Boot memory, not host memory. This in itself is not a problem. However, in a few places, we cast that pointer back to a ulong (being a U-Boot memory address). It is possible to convert many of these cases to avoid this. However there are data structures (e.g. struct bootm_headers) which use pointers. We could with a lot of effort adjust the structs and all code that uses them to use ulong instead of pointers. This seems like an unacceptable cost, since our objective with sandbox is to minimise the impact on U-Boot code while maximising the features available to sandbox. Therefore, create a map_to_sysmem() function which converts from a pointer to a U-Boot address. This can be used sparingly when needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Move ram_buf to arch_global_dataSimon Glass2013-02-041-1/+1
| | | | | | Move this field into arch_global_data and tidy up. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add timer simulationMatthias Weisser2011-12-101-2/+2
| | | | | | | Making sleep command work Signed-off-by: Matthias Weisser <weisserm@arcor.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: Add OS dependent layerSimon Glass2011-10-171-4/+3
| | | | | | | We want to keep all OS-dependent code in once place, with a simple interface to U-Boot. For now, this is that place. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add cpu filesSimon Glass2011-10-171-0/+63
This is an initial implementation with all functions defined but not working. The lds file is very simple since we can mostly rely on the linker defaults. Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud