03 May, 2016
1 commit
-
I'll switch my mails to my own server, so drop all gmail references.
Signed-off-by: Andreas Bießmann
19 Apr, 2016
7 commits
-
jetson-tk1 has 2 GB of RAM at 0x80000000, causing gd->ram_top to be zero.
Handle this by either avoiding ram_top or by using the same type as
ram_top to reverse the overflow effect.Cc: Alexander Graf
Signed-off-by: Andreas Färber
Reviewed-by: Alexander Graf -
Call blk_dwrite to ensure that the block cache is notified
if enabled and remove build breakage when CONFIG_BLK is enabled.Signed-off-by: Eric Nelson
Reviewed-by: Stephen Warren -
The EFI memory map does not need to be in a strict order, but 32bit
grub2 does expect it to be ascending. If it's not, it may try to
allocate memory inside the U-Boot data memory region.We already sort the memory map in descending order, so let's just
reverse it when we pass it to a payload.Signed-off-by: Alexander Graf
Tested-by: Andreas Färber -
The cache line flush helpers only work properly when they get aligned
start and end addresses. Round our flush range to cache line size. It's
safe because we're guaranteed to flush within a single page which has the
same cache attributes.Reported-by: Marek Vasut
Signed-off-by: Alexander Graf
Reviewed-by: Andreas Färber
Tested-by: Andreas Färber -
Whenever we want to tell our payload about a path, we limit ourselves
to a reasonable amount of characters. So far we only passed in device
names - exceeding 16 chars was unlikely there.However by now we also pass real file path information, so let's increase
the limit to 32 characters. That way common paths like "boot/efi/bootaa64.efi"
fit just fine.Signed-off-by: Alexander Graf
-
When loading an el torito image, uEFI exposes said image as a raw
block device to the payload.Let's do the same by creating new block devices with added offsets for
the respective el torito partitions.Signed-off-by: Alexander Graf
-
The snippet of code to add a drive to our drive list needs to
get called from 2 places in the future. Split it into a separate
function.Signed-off-by: Alexander Graf
12 Apr, 2016
1 commit
-
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.For non-zero CRC start values to work, I've reworked the function a bit.
The new implementation is copied from the Linux version in
drivers/i2c/i2c-core.c / i2c_smbus_pec(). Which supports non-zero
CRC stating values.I've double-checked that the results for zero starting values are
identical to the results from the original version of this function.Signed-off-by: Stefan Roese
Cc: Simon Glass
Reviewed-by: Simon Glass
02 Apr, 2016
2 commits
-
Some EFI applications (grub2) expect that an allocation always returns
the highest available memory address for the given size.Without this, we may run into situations where the initrd gets allocated
at a lower address than the kernel.This patch fixes booting in such situations for me.
Signed-off-by: Alexander Graf
-
We normally use __weak rather than calling it out directly as an alias.
Update this function to the normal method.Signed-off-by: Tom Rini
31 Mar, 2016
1 commit
-
Signed-off-by: Masahiro Yamada
27 Mar, 2016
3 commits
-
When switching between EFI context and U-Boot context we need to swap
the register that "gd" resides in.Some functions slipped through here, with efi_allocate_pool / efi_free_pool
not doing the switch correctly and efi_return_handle switching too often.Fix them all up to make sure we always have consistent register state.
Signed-off-by: Alexander Graf
-
A carriage return needs to execute before a line feed.
Signed-off-by: Bin Meng
Reviewed-by: Tom Rini -
The EFI standard defines a simple boot protocol that an EFI payload can use
to access video output.This patch adds support to expose exactly that one (and the mode already in
use) as possible graphical configuration to an EFI payload.With this, I can successfully run grub2 with graphical output.
Signed-off-by: Alexander Graf
17 Mar, 2016
4 commits
-
Since dhry_per_sec is a u64 we must also use lldiv here when working
with it. Otherwise:
../lib/dhry/cmd_dhry.c:(.text.do_dhry+0xd8): undefined reference to `__udivdi3'On some platforms.
Signed-off-by: Tom Rini
-
This is not needed now that the memory controller driver has the SPD data
in its own node.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng -
At present samus reports about 5600 DMIPS. With the default iteration count
this is OK, but if 10 million runs are performed it overflows. Fix it.Signed-off-by: Simon Glass
-
We don't need this anymore - we can use device tree and the new pinconfig
driver instead.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
16 Mar, 2016
8 commits
-
EFI payloads can query for the device they were booted from. Because
we have a disconnect between loading binaries and running binaries,
we passed in a dummy device path so far.Unfortunately that breaks grub2's logic to find its configuration
file from the same device it was booted from.This patch adds logic to have the "load" command call into our efi
code to set the device path to the one we last loaded a binary from.With this grub2 properly detects where we got booted from and can
find its configuration file, even when searching by-partition.Signed-off-by: Alexander Graf
-
Now that we have all the bits and pieces ready for EFI payload loading
support, hook them up in Makefiles and KConfigs so that we can build.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Tested-by: Simon Glass
[trini: Enable only when we of OF_LIBFDT, disable on kwb and colibri_pxa270]
Signed-off-by: Tom Rini -
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
Tested-by: Simon Glass -
A EFI applications usually want to access storage devices to load data from.
This patch adds support for EFI disk interfaces. It loops through all block
storage interfaces known to U-Boot and creates an EFI object for each existing
one. EFI applications can then through these objects call U-Boot's read and
write functions.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Tested-by: Simon Glass
[trini: Update for various DM changes since posting]
Signed-off-by: Tom Rini -
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
Reviewed-by: Simon Glass
Tested-by: Simon Glass -
One of the basic EFI interfaces is the console interface. Using it an EFI
application can interface with the user. This patch implements an EFI console
interface using getc() and putc().Today, we only implement text based consoles. We also convert the EFI Unicode
characters to UTF-8 on the fly, hoping that everyone managed to jump on the
train by now.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Tested-by: Simon Glass -
When an EFI application runs, it has access to a few descriptor and callback
tables to instruct the EFI compliant firmware to do things for it. The bulk
of those interfaces are "boot time services". They handle all object management,
and memory allocation.This patch adds support for the boot time services and also exposes a system
table, which is the point of entry descriptor table for EFI payloads.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Tested-by: Simon Glass -
EFI uses the PE binary format for its application images. Add support to EFI PE
binaries as well as all necessary bits for the "EFI image loader" interfaces.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Tested-by: Simon Glass
15 Mar, 2016
10 commits
-
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
Reviewed-by: Tom Rini -
lib/crc16.c is changed to match the common U-Boot coding-style.
Signed-off-by: Stefan Roese
Reviewed-by: Tom Rini -
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
-
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_RSAUnfortunately 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
[trini: Add microblaze change, various configs/ re-applies]
Signed-off-by: Tom Rini -
Adjust the cast to avoid a warning when stdint.h is used.
Signed-off-by: Simon Glass
Tested-by: Stephen Warren -
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
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
Use this new function in places where it simplifies the code.
Signed-off-by: Simon Glass
-
Move this option to Kconfig and tidy up existing boards.
Signed-off-by: Simon Glass
-
The existing function to add a new property to a tree being built requires
that the entire contents of the new property be passed in. For some
applications it is more convenient to be able to add the property contents
later, perhaps by reading from a file. This avoids double-buffering of the
contents.Add a new function to support this and adust the existing fdt_property() to
use it.Signed-off-by: Simon Glass
26 Feb, 2016
2 commits
-
In some cases the timer must be accessible before driver model is active.
Examples include when using CONFIG_TRACE to trace U-Boot's execution before
driver model is set up. Enable this option to use an early timer. These
functions must be supported by your timer driver: timer_early_get_count()
and timer_early_get_rate().Signed-off-by: Simon Glass
-
This function can be called from the timer code on instrumented functions.
Mark it as 'notrace' so that it doesn't cause infinite recursion.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
17 Feb, 2016
1 commit
-
Adjust the driver to use driver model. The SOR becomes a bridge device. We
use the normal simple_panel driver to handle the display itself. We also
need to enable some options such as regulators, PWMs and DM_VIDEO itself.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin
Signed-off-by: Tom Warren