2020-07-01 |
arm: module: Allow modules outside of bl range
...
Unlike the Linux kernel, barebox does not have a dedicated heap for
storing modules. Therefore, if the system memory configuration places
the general heap further away than can be reached by a 'bl' instruction
(24 bits of address, or 16 MiB), then the module relocations will fail
due to being out of range.
Allocate PLTs when loading modules so that jumps and calls whose
targets are too far away for their relative offsets to be encoded
in the instructions themselves can be bounced via veneers in the
module's PLT. The modules will use slightly more memory, but after
rounding up to page size, the actual memory footprint is usually
the same.
Adoption of Linux commits:
66e94ba3c8ea ARM: kernel: avoid brute force search on PLT generation
1031a7e674d1 ARM: kernel: sort relocation sections before allocating PLTs
05123fef0982 ARM: kernel: allocate PLT entries only for external symbols
35fa91eed817 ARM: kernel: merge core and init PLTs
7d485f647c1f ARM: 8220/1: allow modules outside of bl range
Signed-off-by: David Dgien <dgienda125@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
David Dgien
authored
on 29 Jun 2020
Sascha Hauer
committed
on 1 Jul 2020
|
2020-04-27 |
treewide: remove references to CREDITS
...
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Uwe Kleine-König
authored
on 23 Apr 2020
Sascha Hauer
committed
on 27 Apr 2020
|
2020-03-23 |
ARM: bootm: make sure we place the kernel in free memory
...
When placing the kernel image in memory make sure we do not
place it too high, outside of the available memory, outside of the
available memory.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Mar 2020
|
2020-01-30 |
ARM: add optee early loading function
...
Add a OP-TEE early loading function which expects a pointer to a valid
tee binary and the device tree. OP-TEE will then be started and barebox
will continue to run in normal mode.
The function start_optee_early should be used in a boards lowlevel.c
file. Ensure that barebox has been relocated and a proper c environment
has been setup beforehand. Depending on the OP-TEE configuration, the
fdt will be modified. If the internal barebox device tree is passed,
OP-TEE will overwrite barebox PBL memory during this modification. Copy
the fdt to a save memory location beforehand to avoid a corruption of
barebox PBL memory.
This also moves the OP-TEE Kconfig symbols into a separate menu.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Rouven Czerwinski
authored
on 28 Jan 2020
Sascha Hauer
committed
on 30 Jan 2020
|
ARM: import setjmp implementation from U-Boot
...
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Rouven Czerwinski
authored
on 28 Jan 2020
Sascha Hauer
committed
on 30 Jan 2020
|
2020-01-28 |
optee: move optee_verify_header() to common
...
Subsequent patches will use this to verify the header in the PBL, move
it to common to make it potentially available for both.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Rouven Czerwinski
authored
on 28 Jan 2020
Sascha Hauer
committed
on 28 Jan 2020
|
2019-12-02 |
ARM: move into ARM32 specific optee kernel start into lib32 dir
...
Otherwise it may also get built on a ARM64 config, which obviously
fails.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 29 Nov 2019
Sascha Hauer
committed
on 2 Dec 2019
|
2019-10-14 |
lds: Add and use RO_DATA_SECTION macro
...
We have many different pointer arrays which we put into linker sections
and each time there's one added we have to adjust all linker scripts.
This adds a common RO_DATA_SECTION define and uses it for all
architectures. This makes it easier to add a new linker array.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Oct 2019
|
lds: create and use BAREBOX_PCI_FIXUP macro
...
No need to repeat the pci fixup sections in each linker script. Add a
define for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Oct 2019
|
lds: Move start/end address variables into defines
...
For the older section defines we specify the start and end addresses
outside the macro which means we have to repeat them in each linker
script. Make the start/end addresses part of the define to simplify
things. While at it, add a BAREBOX_ prefix to the INITCALLS and EXITCALLS
macros for consistency to the other defines.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Sascha Hauer
committed
on 14 Oct 2019
|
barebox.lds: Remove unnecessary braces
...
The BAREBOX_CLK_TABLE and BAREBOX_DTB macros are defines that do not
take a parameter, so we can remove the braces.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Oct 2019
|
2019-06-07 |
ARM: Initial OP-TEE support
...
This adds initial support for OP-TEE, see https://www.op-tee.org/
barebox starts in secure mode as usual. When booting a kernel
the bootm code also loads the optee_os binary. Instead of jumping
into the kernel barebox jumps into the optee_os binary and puts
the kernel execution address into the lr register. OP-TEE then
jumps into the kernel in nonsecure mode.
The optee_os binary is passed with the -t option to bootm or
with global.bootm.tee.
Optionally OP-TEE can be compiled into barebox using the builtin firmware
feature. Enable the Kconfig option and place or link your tee binary as
optee.bin into the firmware directory.
The amount of SDRAM which is kept free for OP-TEE is configurable.
This patch was tested on a i.MX6 Nitrogen6x board.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 7 Jun 2019
|
2019-03-18 |
treewide: Add missing includes
...
Many files in the tree implement functions, but do not include the
header files which provide the prototypes for these functions. This
means conflicting prototypes remain undetected. Add the missing
includes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 Mar 2019
|
ARM: semihosting: Fix function prototype
...
lsee takes a loff_t pos argument and not a off_t argument. Fix.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 Mar 2019
|
2018-11-14 |
ARM: stack unwind: Print messages with pr_warning
...
print stack traces with pr_err() rather than printf() to make sure they appear
in the logs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 14 Nov 2018
|
2018-10-23 |
ARM: unwind: Make locally used function static
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Oct 2018
|
ARM: unwind: Provide prototypes for exported functions
...
__aeabi_unwind_cpp_prx are provided to make the linker happy. To fix
warnings about missing prototypes just provide a prototype in the same
file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Oct 2018
|
ARM: legacy Linux support: Make locally used functions static
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Oct 2018
|
2018-08-13 |
Merge branch 'for-next/socfpga'
Sascha Hauer
committed
on 13 Aug 2018
|
2018-08-08 |
pci: add quirk infrastructure
...
This is a cut down version of the Linux kernel PCI quirk infrastructure,
which allows to register and execute some fixups before the driver is
loaded.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 1 Aug 2018
Sascha Hauer
committed
on 8 Aug 2018
|
bootm: allow booting SoCFPGA prebootloader image
...
A prebootloader image might also contain a fully working barebox and
allows to be booted second stage. Thus we add a handler here to give it
a try.
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Enrico Jorns
authored
on 31 Jul 2018
Sascha Hauer
committed
on 8 Aug 2018
|
2018-07-09 |
Merge branch 'for-next/kill-oftree-f'
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 9 Jul 2018
|
2018-06-15 |
bootm: Split bootm_load_devicetree into two functions
...
It is not always desired to get the devicetree from image data and load
it to a SDRAM region at the same time. Sometimes it's enough to just
load it to an allocated address (in case the user has no constraints
where the devicetree should be placed.
This patch splits bootm_load_devicetree into bootm_get_devicetree which
returns a pointer to the allocated devicetree and bootm_load_devicetree
which loads the devicetree to a specified region.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Jun 2018
|
ARM: bootm: drop usage of data->oftree
...
data->oftree can be replaced with a variable local to the arm code, so
drop usage of data->oftree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Jun 2018
|
2018-06-11 |
ARM: bootm: Add option boot using ATAGs
...
So far we can only force legacy boot using ATAGs by executing
'oftree -f'. Said command is going away as often this command
is not safe to call. Add an alternative way using the
global.bootm.boot_atag environment variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Jun 2018
|
2018-04-04 |
ARM: aarch64: disable 32bit boot commands
...
The 32bit boot support is full of legacy cruft. While it should be
possible to merge the aarch64 support there, a fresh start looks more
promising.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 4 Apr 2018
|
2018-03-21 |
ARM: remove ld_var support
...
Now that ld_var is no longer used it can be removed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 21 Mar 2018
|
ARM: move away from ld_var
...
The ld_var solves the issue that when compiled with -pie the linker
provided variables are all 0x0. This mechanism however refuses to
compile with aarch64 support.
This patch replaces the ld_var mechanism with a nice little trick
learned from U-Boot: Instead of using linker provided variables
directly with "__bss_start = ." we put a zero size array into
a separate section and use the address of that array instead of
the linker variable. This properly works before relocation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 21 Mar 2018
|
ARM: return positive offset in get_runtime_offset()
...
When we are linked at 0x0 and running at 0x01000000 then
get_runtime_offset() should return 0x01000000 and not 0xff000000. This
makes get_runtime_offset() more consistent and better understandable.
This was tested on a Freescale i.MX53 Quickstart board. Additionally
relocate_to_adr() was tested since that is normally not called.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 21 Mar 2018
|
2018-03-01 |
ratp: implement generic command support
...
The RATP implementation now allows executing generic commands with a
binary interface: binary requests are received and binary responses
are returned.
Each command can define its own RATP request contents (e.g. to specify
command-specific options) as well as its own RATP response contents
(if any data is to be returned).
Each command is associated with a pair of numeric unique request and
response IDs, and for easy reference these IDs are maintained in the
common ratp_bb header. Modules may override generic implemented
commands or include their own new ones (as long as the numeric IDs
introduced are unique).
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Aleksander Morgado
authored
on 24 Feb 2018
Sascha Hauer
committed
on 1 Mar 2018
|