summaryrefslogtreecommitdiffstats
path: root/arch/sandbox/include
Commit message (Collapse)AuthorAgeFilesLines
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-147-7/+7
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2414-235/+14
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host fileSimon Glass2013-05-011-0/+1
| | | | | | | | | | | | With sandbox it is tricky to add an FDT to the image at build time (or later) since we build an ELF file, not a plain binary, and the address space of the whole U-Boot is not accessible in the emulated memory map of sandbox. Sandbox can read files directly from the host, though, so add an option to read an FDT from a host file on start-up. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Switch over to generic boardSimon Glass2013-05-012-20/+7
| | | | | | | | | Add generic board support for sandbox. and remove the old board init code. Select CONFIG_SYS_GENERIC_BOARD for sandbox now that this is supported. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
* sandbox: Provide a way to map from host RAM to U-Boot RAMSimon Glass2013-05-011-0/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* Introduce generic link section.h symbol filesSimon Glass2013-03-151-0/+2
| | | | | | | | | | | | | | | | | | We create a separate header file for link symbols defined by the link scripts. It is helpful to have these all in one place and try to make them common across architectures. Since Linux already has a similar file, we bring this in even though many of the symbols there are not relevant to us. Each architecture has its own asm/sections.h where symbols specifc to that architecture can be added. For now everything except AVR32 just includes the generic header. One change is needed in arch/avr32/lib/board.c to make this conversion work. Reviewed-by: Tom Rini <trini@ti.com> (version 5) Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add un/map_sysmen() to deal with sandbox's ram_bufSimon Glass2013-02-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | Sandbox doesn't actually provide U-Boot access to the machine's physical memory. Instead it provides a RAM buffer of configurable size, and all memory accesses are within that buffer. Sandbox memory starts at 0 and is CONFIG_DRAM_SIZE bytes in size. Allowing access outside this buffer might produce unpredictable results in the event of an error, and would expose the host machine's memory architecture to the sandbox U-Boot. Most U-Boot functions assume that they can just access memory at given address. For sandbox this is not true. Add a map_sysmem() call which converts a U-Boot address to a system address. In most cases this is a NOP, but for sandbox it returns a pointer to that memory inside the RAM buffer. To get a U-Boot feature to work correctly within sandbox, you should call map_sysmem() to get a pointer to the address, and then use that address for any U-Boot memory accesses. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Use generic global_dataSimon Glass2013-02-041-24/+1
| | | | | | Move sandbox over to use generic global_data. 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>
* Add architecture-specific global dataSimon Glass2013-02-011-0/+6
| | | | | | | | | | | | | We plan to move architecture-specific data into a separate structure so that we can make the rest of it common. As a first step, create struct arch_global_data to hold these fields. Initially it is empty. This patch applies to all archs at once. I can split it if this is really a pain. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Change global data baudrate to intSimon Glass2012-10-191-1/+1
| | | | | | | This doesn't need to be a long, so change it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* sandbox: Add asm/errno.hSimon Glass2012-09-291-0/+1
| | | | | | This file is required for all archs. Fixes a sandbox build break on ext4. Signed-off-by: Simon Glass <sjg@chromium.org>
* global_data: unify global flag definesMike Frysinger2012-08-091-13/+1
| | | | | | | All the global flag defines are the same across all arches. So unify them in one place, and add a simple way for arches to extend for their needs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* net: punt bd->bi_ip_addrMike Frysinger2012-05-151-1/+0
| | | | | | | | | This field gets read in one place (by "bdinfo"), and we can replace that with getenv("ipaddr"). After all, the bi_ip_addr field is kept up-to-date implicitly with the value of the ipaddr env var. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* sandbox: add getopt supportSimon Glass2012-03-124-0/+99
| | | | | | | | | | | | | | | This adds simple command-line parsing to sandbox. The idea is that it sets up the state with options provided, and this state can then be queried later, as needed. New flags are declared with the SB_CMDLINE_OPT_SHORT helper macro, pointers are automatically gathered up in a special section, and then the core code takes care of gathering them up and processing at runtime. This way there is no central place where we have to store a list of flags with ifdefs. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: allow processing before main loopSimon Glass2012-03-121-0/+3
| | | | | | | | | In order to pass command line arguments to sandbox we need to be able to act on them. So take control back at the end of board_init_r() from where we can call the main loop or do something else. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: add concept of sandbox stateSimon Glass2012-03-121-0/+57
| | | | | | | | | | | | The state exists through the life of U-Boot. It can be adjusted by command line options and perhaps later through a config file. It is available to U-Boot through state_...() calls (within sandbox code). The primary purpose of this is to contain the "hardware" state. It should only be used by sandbox internal code. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: gpio: add basic driver for simulating GPIOsSimon Glass2012-03-121-0/+81
| | | | | | | | This provides a way of simulating GPIOs by setting values which are seen by the normal gpio_get/set_value() calls. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: fdt: add support for CONFIG_OF_CONTROLSimon Glass2012-03-121-0/+1
| | | | | | | This adds support for a controlling fdt, mirroring the ARM implementation. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: Add asm/cache.h for sandboxAnton staaf2011-11-031-0/+33
| | | | | | | | | This file is required by the new DMA buffer alignment macro. Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: Add architecture image supportSimon Glass2011-10-171-0/+3
| | | | | | | We won't actually load an image with this architecture, but we still need to define it. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: Add architecture header filesSimon Glass2011-10-1713-0/+683
This adds required header files for the sandbox architecture, and a basic description of what sandbox is (README.sandbox). Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud