- Mar 17, 2016
-
-
Simon Glass authored
At present on x86 machines with use cache-as-RAM, the memory goes away just before board_init_r() is called. This means that serial drivers are no-longer unavailable, until initr_dm() it called, etc. Any attempt to use printf() within this period will cause a hang. To fix this, mark the serial devices as 'unavailable' when it is no-longer available. Bring it back when serial_initialize() is called. This means that the debug UART will be used instead for this period. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Commit 1057e6cf broke use of the timer with driver model. If the timer is used before relocation, then it becomes broken after relocation. This prevents some x86 boards from booting. Fix it. Fixes: 1057e6cf (timer: Set up the real timer after driver model is available) Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
Output the pointer returned by each call to malloc(). This can be useful when debugging memory problems. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
- Mar 16, 2016
-
-
Masahiro Yamada authored
Fix "warning: cast to pointer from integer of different size". Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Alexander Graf authored
We have a nice framework around image fils to prepare a device tree for OS execution. That one patches in missing device tree nodes and fixes up the memory range bits. We need to call that one from the EFI boot path too to get all those nice fixups. This patch adds the call. Signed-off-by:
Alexander Graf <agraf@suse.de>
-
Alexander Graf authored
The EFI loader needs to maintain views of memory - general system memory windows as well as used locations inside those and potential runtime service MMIO windows. To manage all of these, add a few helpers that maintain an internal representation of the map the similar to how the EFI API later on reports it to the application. For allocations, the scheme is very simple. We basically allow allocations to replace chunks of previously done maps, so that a new LOADER_DATA allocation for example can remove a piece of the RAM map. When no specific address is given, we just take the highest possible address in the lowest RAM map that fits the allocation size. Signed-off-by:
Alexander Graf <agraf@suse.de> Tested-by:
Simon Glass <sjg@chromium.org>
-
- Mar 15, 2016
-
-
Alexander Graf authored
After booting has finished, EFI allows firmware to still interact with the OS using the "runtime services". These callbacks live in a separate address space, since they are available long after U-Boot has been overwritten by the OS. This patch adds enough framework for arbitrary code inside of U-Boot to become a runtime service with the right section attributes set. For now, we don't make use of it yet though. We could maybe in the future map U-boot environment variables to EFI variables here. Signed-off-by:
Alexander Graf <agraf@suse.de> Reviewed-by:
Simon Glass <sjg@chromium.org> Tested-by:
Simon Glass <sjg@chromium.org>
-
- Mar 14, 2016
-
-
Stefan Roese authored
The original name of this function is unclear. This patch renames this CRC16 function to crc16_ccitt() matching its name with its implementation. To make the usage of this function more flexible, lets add the CRC start value as parameter to this function. This way it can be used by other functions requiring different start values than 0 as well. Signed-off-by:
Stefan Roese <sr@denx.de> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
York Sun authored
FIT image supports more than 32 bits in addresses by using #address-cell field. Fixing 64-bit support by using this field. Signed-off-by:
York Sun <york.sun@nxp.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
York Sun authored
FIT image supports load address and entry address. Getting these addresses can use a common function. Signed-off-by:
York Sun <york.sun@nxp.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Detect a FIT when loading from MMC and handle it using the new FIT SPL support. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This provides a way to load a FIT containing U-Boot and a selection of device tree files. The board can select the correct device tree by probing the hardware. Then U-Boot is started with the selected device tree. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Sometimes it is useful to obtain the short name for an Operating System, architecture or compression mechanism. Provide functions for this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add an option to enable libfdt in SPL. This can be useful when decoding FIT files in SPL. We need to make sure this option is not enabled in SPL by this change. Also this option needs to be enabled in host builds. Si add a new IMAGE_USE_LIBFDT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
There are already two FIT options in Kconfig but the CONFIG options are still in the header files. We need to do a proper move to fix this. Move these options to Kconfig and tidy up board configuration: CONFIG_FIT CONFIG_OF_BOARD_SETUP CONFIG_OF_SYSTEM_SETUP CONFIG_FIT_SIGNATURE CONFIG_FIT_BEST_MATCH CONFIG_FIT_VERBOSE CONFIG_OF_STDOUT_VIA_ALIAS CONFIG_RSA Unfortunately the first one is a little complicated. We need to make sure this option is not enabled in SPL by this change. Also this option is enabled automatically in the host builds by defining CONFIG_FIT in the image.h file. To solve this, add a new IMAGE_USE_FIT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Note: Masahiro's moveconfig.py script is amazing. Signed-off-by:
Simon Glass <sjg@chromium.org> [trini: Add microblaze change, various configs/ re-applies] Signed-off-by:
Tom Rini <trini@konsulko.com>
-
Simon Glass authored
Update this code to support CONFIG_BLK. Each USB storage device can have one or more block devices as children, each one representing a LUN (logical unit) of the USB device. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
Adjust a few things so that the addition of driver-models support involved adding code rather than also changing it. This makes the patches easier to review. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
The limit on storage devices is USB_MAX_STOR_DEV but we use one extra element while probing to see if a device is a storage device. Avoid this, since it causes memory corruption. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Marek Vasut <marex@denx.de> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
To ease conversion to driver model, add helper functions which deal with calling each block device method. With driver model we can reimplement these functions with the same arguments. Use inline functions to avoid increasing code size on some boards. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
This is a device number, and we want to use 'dev' to mean a driver model device. Rename the member. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
Rename three partition functions so that they start with part_. This makes it clear what they relate to. Signed-off-by:
Simon Glass <sjg@chromium.org> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
Rename this function to blk_get_device_part_str(). This is a better name because it makes it clear that the function returns a block device and parses a string. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Simon Glass authored
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
Stuart Longland authored
This is an enhancement that permits storing the environment file on an EXT4 partition such as the root filesystem. It is based on the existing FAT environment file code.
-
- Mar 08, 2016
-
-
Stephen Warren authored
Following the previous patch, malloc() is never called before gd is set, so we can remove the special-case check for this condition. This reverts commit 854d2b97 "dlmalloc: ensure gd is set for early alloc". Cc: Rabin Vincent <rabin@rab.in> Signed-off-by:
Stephen Warren <swarren@wwwdotorg.org> Reviewed-by:
Tom Rini <trini@konsulko.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Feb 26, 2016
-
-
Simon Glass authored
When using the early timer, we need to manually trigger setting up the real timer. This will not happen automatically. Do this immediately after starting driver model. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com>
-
Simon Glass authored
This reverts commit 84ca65aa. On signature verification failures fit_image_verify() should NOT exit with error. Only keys marked 'required' can cause image verification failure. This logic is already there and works correctly. Add a comment to make this clear. Fixes: 84ca65aa (image-fit: Fix signature checking) Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
A recent change broke the 'bootm' command on sandbox. The root cause is using a pointer as an address. Conversion from pointer to address needs to use map_to_sysmem() so that sandbox can do the right thing. The problem was pre-existing but uncovered by a recent commit. Fix this. Also move fit_get_end() to the C file to avoid needing to include mapmem.h (and thus asm/io.h) everywhere. Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images) Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Feb 19, 2016
-
-
Guillaume GARDET authored
Since commit fd61d399: spl: mmc: add break statements in spl_mmc_load_image() RAW and FS boot modes are now exclusive again. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to try MMCSD_MODE_FS then. It has been tested on a beaglebone black to boot on an EXT partition. Signed-off-by:
Guillaume GARDET <guillaume.gardet@free.fr> Cc: Tom Rini <trini@konsulko.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Simon Glass <sjg@chromium.org> Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com> Acked-by:
Nikita Kiryanov <nikita@compulab.co.il>
-
- Feb 15, 2016
-
-
Lubomir Rintel authored
$ make tools-all ... In file included from tools/env/env_flags.c:1:0: tools/env/../../common/env_flags.c: In function ‘env_flags_parse_varaccess_from_binflags’: tools/env/../../common/env_flags.c:156:18: warning: implicit declaration of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration] for (i = 0; i < ARRAY_SIZE(env_flags_varaccess_mask); i++) ^ Seems like the other utilities just add a copy of ARRAY_SIZE since there's nowhere to include it from (tools/imagetool.h, tools/mxsimage.h). Let's do the same here. Signed-off-by:
Lubomir Rintel <lkundrak@v3.sk>
-
- Feb 11, 2016
-
-
Simon Glass authored
Boards with a saved environment may use 'lcd' in their stdout environment variable, expecting that this will enable output to the LCD. When the board moves to use driver model for video, this will no-longer work. Add a work-around to fix this. A warning messages is printed, and we will remove the work-around at the end of 2016. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Anatolij Gustschin <agust@denx.de> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
- Feb 10, 2016
-
-
Hans de Goede authored
This commit breaks bootup on sunxi boards, the get stuck when running the main u-boot binary at: CPU: Allwinner H3 (SUN8I) I2C: ready DRAM: This reverts commit 8e7cba04. Signed-off-by:
Hans de Goede <hdegoede@redhat.com>
-
- Feb 08, 2016
-
-
David Müller (ELSOFT AG) authored
Signed-off-by:
David Müller <d.mueller@elsoft.ch>
-
Masahiro Yamada authored
Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Masahiro Yamada authored
Commit 9c11135c ("image: fix getenv_bootm_size() function") fixed the case where "bootm_low" is defined, but "bootm_size" is not. Instead, it broke the case where neither "bootm_low" nor "bootm_size" is defined. Fix this function again. Fixes: 9c11135c ("image: fix getenv_bootm_size() function") Signed-off-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Tested-by:
Matthias Weisser <m.weisser.m@gmail.com> Tested-by:
Hannes Schmelzer <oe5hpm@oevsv.at>
-
Stephen Warren authored
The recent change to memalign() caused the allocation failure detection code to be dead code; the "retry" logic is always activated under the same condition that the original failure detection code is, and also fully handles any possible failures. This patch solves the presence of dead code. Two alternatives are possible: a) Delete the now-dead test, and rely on the "retry" path to handle any allocation problems, as it does. b) Make the "retry" path fall through to the existing (currently dead) failure detection code, thus making it not-dead. (b) was chosen since it reduces the diff between U-Boot's and the upstream dlmalloc. This should make it marginally easier to import a new version of dlmalloc in the future. Reported by: Coverity Scan Fixes: 4f144a41 ("malloc: work around some memalign fragmentation issues") Signed-off-by:
Stephen Warren <swarren@nvidia.com> Reviewed-by:
Tom Rini <trini@konsulko.com>
-
Eddy Petrișor authored
The case of memory of size 0 is not that different from a memory of any other size, so we remove the duplicate code and treat the small differences when it is the case. Signed-off-by:
Eddy Petrișor <eddy.petrisor@gmail.com>
-
Marek Vasut authored
Add trivial support for changing the U-Boot command prompt string by setting PS1 and PS2 environment variables. Only static variables are supported. Signed-off-by:
Marek Vasut <marex@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Marek Vasut authored
Pull the code which displays U-Boot prompt and reads the command line into a separate function. No functional change. Signed-off-by:
Marek Vasut <marex@denx.de> Reviewed-by:
Heiko Schocher <hs@denx.de> Reviewed-by:
Simon Glass <sjg@chromium.org>
-