13 Feb, 2020
1 commit
-
clear_bss is already used by 3 arches (x86, arc, xtensa), so make it generic
and provide a weak nop stub for it. This also removes arch-specific ifdef
duplications around clear_bss.Signed-off-by: Ovidiu Panait
31 Jan, 2020
1 commit
-
This removes the arch-specific checks for "checkcpu" function from the init
sequence. Make "checkcpu" generic and provide a weak nop stub instead.Signed-off-by: Ovidiu Panait
18 Jan, 2020
2 commits
-
At present panic() is in the vsprintf.h header file. That does not seem
like an obvious choice for hang(), even though it relates to panic(). So
let's put hang() in its own header.Signed-off-by: Simon Glass
[trini: Migrate a few more files]
Signed-off-by: Tom Rini -
These three clock functions don't use driver model and should be migrated.
In the meantime, create a new file to hold them.Signed-off-by: Simon Glass
03 Dec, 2019
3 commits
-
Move this function into init.h which seems to be designed for this sort
of thing. Also update the header to declare struct global_data so that it
can be included without global_data.h being needed.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
This function belongs in cpu_func.h so move it over.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
These functions belong in serial.h so move them over.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini
28 Oct, 2019
2 commits
-
At present bootstage relocation assumes that it is possible to point back
to memory available before relocation, so it does not relocate the
strings. However this is not the case on some platforms, such as x86 which
uses the cache as RAM and loses access to this when the cache is enabled.Move the relocation step to before U-Boot relocates, expand the allocated
region to include space for the strings and relocate the strings at the
same time as the bootstage records.This ensures that bootstage data can remain accessible from TPL through
SPL to U-Boot before/after relocation.Signed-off-by: Simon Glass
-
Make sure that the bloblist starts on an aligned boundary. This protects
against one of the early allocating causing the alignment to be lost.Signed-off-by: Simon Glass
31 Aug, 2019
1 commit
-
The current code in reserve_noncached() has two issues:
1) The first update of gd->start_addr_sp always rounds down to a section
start. However, the equivalent calculation in cache.c:noncached_init()
always first rounds up to a section start, then subtracts a section size.
These two calculations differ if the initial value is already rounded to
section alignment.2) The second update of gd->start_addr_sp subtracts exactly
CONFIG_SYS_NONCACHED_MEMORY, whereas the equivalent calculation in
cache.c:noncached_init() rounds the noncached size up to section
alignment before subtracting it. The two calculations differ if the
noncached region size is not a multiple of the MMU section size.In practice, one/both of those issues causes a practical problem on
Jetson TX1; U-Boot triggers a synchronous abort during initialization,
likely due to overlapping use of some memory region.This change fixes both these issues by duplicating the exact calculations
from noncached_init() into reserve_noncached().However, this fix assumes that gd->start_addr_sp on entry to
reserve_noncached() exactly matches mem_malloc_start on entry to
noncached_init(). I haven't traced the code to see whether it absolutely
guarantees this in all (or indeed any!) cases. Consequently, I added some
comments in the hope that this condition will continue to be true.Fixes: 5f7adb5b1c02 ("board_f: reserve noncached space below malloc area")
Cc: Vikas Manocha
Signed-off-by: Stephen Warren
26 Aug, 2019
1 commit
-
Noncached area at present is being initialized to random space after malloc
area. It works in most the cases as it goes to stack area & stack is not
overwriting it being far from it.Signed-off-by: Vikas Manocha
12 Aug, 2019
4 commits
-
This file contains lots of internal details about the environment. Most
code can include env.h instead, calling the functions there as needed.Rename this file and add a comment at the top to indicate its internal
nature.Signed-off-by: Simon Glass
Acked-by: Joe Hershberger
Reviewed-by: Simon Goldschmidt
[trini: Fixup apalis-tk1.c]
Signed-off-by: Tom Rini -
Move env_init() over to the new header file.
Signed-off-by: Simon Glass
Acked-by: Joe Hershberger -
This function is no-longer defined in U-Boot. Drop the declaration from
common.hSigned-off-by: Simon Glass
-
This function relates to lcd.h and is about to become obsolete with the
driver-model conversion. Move it out of common.hSigned-off-by: Simon Glass
11 Jul, 2019
2 commits
-
Correct the debug output for the trace buffer size to accommodate trace
buffers exceeding 2GiB.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass -
Compiling with TRACE but without TRACE_EARLY results in an error
aarch64-linux-gnu-ld.bfd:
common/built-in.o:(.rodata.init_sequence_f+0x10):
undefined reference to `trace_early_init'trace_early_init() should not be called if CONFIG_TRACE_EARLY is not
defined.Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
18 May, 2019
1 commit
-
While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances
where these configuration items are conditional on SPL. This commit adds SPL
variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates
the configurations as required.Acked-by: Alexey Brodkin
Signed-off-by: Trevor Woerner
[trini: Make the default depend on the setting for full U-Boot, update
more zynq hardware]
Signed-off-by: Tom Rini
24 Apr, 2019
1 commit
-
At present if one of the initcalls fails on sandbox the address printing
is not help, e.g.:initcall sequence 0000557678967c80 failed at call 00005576709dfe1f (err=-96)
This is because U-Boot gets relocated high into memory and the relocation
offset (gd->reloc_off) does not work correctly for sandbox.Add support for finding the base address of the text region (at least on
Linux) and use that to set the relocation offset. This makes the output
better:initcall sequence 0000560775957c80 failed at call 0000000000048134 (err=-96)
Then you use can use grep to see which init call failed, e.g.:
$ grep 0000000000048134 u-boot.map
stdio_add_devicesOf course another option is to run it with a debugger such as gdb:
$ gdb u-boot
...
(gdb) br initcall.h:41
Breakpoint 1 at 0x4db9d: initcall.h:41. (2 locations)Note that two locations are reported, since this function is used in both
board_init_f() and board_init_r().(gdb) r
Starting program: /tmp/b/sandbox/u-boot
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".U-Boot 2018.09-00264-ge0c2ba9814-dirty (Sep 22 2018 - 12:21:46 -0600)
DRAM: 128 MiB
MMC:Breakpoint 1, initcall_run_list (init_sequence=0x5555559619e0 )
at /scratch/sglass/cosarm/src/third_party/u-boot/files/include/initcall.h:41
41 printf("initcall sequence %p failed at call %p (err=%d)\n",
(gdb) print *init_fnc_ptr
$1 = (const init_fnc_t) 0x55555559c114
(gdb)Signed-off-by: Simon Glass
06 Dec, 2018
1 commit
-
- Various MTD fixes from Boris
- Zap various unused / legacy paths.
- pxa3xx NAND update from MiquelSigned-off-by: Tom Rini
27 Nov, 2018
2 commits
-
In legacy CONFIG_HARD_SPI initalizing spi_init code, which
was removed during dm conversion cleanup.So remove the dead instances of CONFIG_HARD_SPI, and related
code.Signed-off-by: Jagan Teki
-
spi_init used in some areas in tree, but the respective
drivers will remove in future patches.So remove the same instances.
Signed-off-by: Jagan Teki
26 Nov, 2018
2 commits
-
There is some basic informaton that SPL normally wants to pass through to
U-Boot, such as the SDRAM size and bank information.Mkae use of the new bloblist structure for this. Add a new 'handoff' blob
which is set up in SPL and passed to U-Boot proper. Also adda test for
sandbox_spl that checks that this works correctly and a new 'sb' command
to show the information passed from SPL.Reviewed-by: Tom Rini
Signed-off-by: Simon Glass -
Add support for locating a bloblist in U-Boot that has been set up by SPL.
It is copied into RAM during relocation.Reviewed-by: Tom Rini
Signed-off-by: Simon Glass
17 Nov, 2018
1 commit
-
Convert the Watchdog driver for AT91SAM9x processors to support
the driver model and device tree. Changes "CONFIG_AT91SAM9_WATCHDOG"
to new "CONFIG_WDT_AT91" Kconfig option.Signed-off-by: Prasanthi Chellakumar
15 Nov, 2018
2 commits
-
It was observed that current output of print_cpuinfo() on QEMU
x86 targets does not have an ending '\n', neither have a leading
'CPU:' any more. However it used to have these before.It turns out commit c0434407b595 introduced a unified DM version
of print_cpuinfo() that exposed such issue on QEMU x86.Fixes: c0434407b595 ("board_f: Use static print_cpuinfo if CONFIG_CPU is active")
Signed-off-by: Bin Meng
Reviewed-by: Simon Glass -
When the DM CPU drivers are active, printing information about a CPU
should be delegated to a matching driver.Hence, add a static print_cpuinfo that implements this delegation when
DM CPU drivers are active.Reviewed-by: Simon Glass
Signed-off-by: Mario Six
Changed condition to CONFIG_IS_ENABLED(CPU):
Signed-off-by: Simon Glass
08 Nov, 2018
1 commit
-
This reverts commit c0434407b595f785fc7401237896c48c791b45fd.
It turns out commit c0434407b595 broke some boards which have DM CPU
driver with CONFIG_DISPLAY_CPUINFO option on. These boards just fail
to boot when print_cpuinfo() is called during boot.Fixes are already sent to ML and in u-boot-dm/next, however since
we are getting close to the v2018.11 release, it's safer we revert
the original commit.This commit should be reverted after v2018.11 release.
Signed-off-by: Bin Meng
Acked-by: Peng Fan
Reviewed-by: Simon Glass
18 Sep, 2018
3 commits
-
When the DM CPU drivers are active, printing information about a CPU
should be delegated to a matching driver.Hence, add a static print_cpuinfo that implements this delegation when
DM CPU drivers are active.Reviewed-by: Simon Glass
Signed-off-by: Mario Six
Changed condition to CONFIG_IS_ENABLED(CPU):
Signed-off-by: Simon Glass -
Includes should be sorted.
Reviewed-by: Simon Glass
Signed-off-by: Mario Six -
To print the reset status during boot, add a method print_resetinfo to
board_f, which is called in init_sequence_f[], that gets the reset
information from the sysreset driver (assuming there is only one seems
reasonable), and prints it.Reviewed-by: Simon Glass
Signed-off-by: Mario Six
19 Jul, 2018
1 commit
-
This patch updates the ram_base to store the start address of
the first bank DRAM and the use this ram_base to calculate ram_top
properly. This patch fixes the erroneous calculation of ram_top
incase of non zero ram start address.Signed-off-by: Siva Durga Prasad Paladugu
Signed-off-by: Michal Simek
Reviewed-by: Tom Rini
06 Jun, 2018
1 commit
-
In case of no relocation we'll just waste some space at the very end
of usable memory area. If target device has very limited amount of memory
(for example 256 kB) this loss will be pretty inconvenient.Signed-off-by: Alexey Brodkin
Reviewed-by: Simon Glass
Cc: Bin Meng
Cc: Heiko Schocher
Cc: York Sun
Cc: Stefan Roese
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
21 Mar, 2018
1 commit
-
Disabling relocation might be useful on ARC for 2 reasons:
a) For advanced debugging with Synopsys proprietary MetaWare debugger
which is capable of accessing much more specific hardware resources
compared to gdb. For example it may show contents of L1 and L2 caches,
internal states of some hardware blocks etc.But on the downside MetaWare debugger still cannot work with PIE.
Even though that limitation could be work-arounded with change of ELF's
header and stripping down all debug info but with it we won't have
debug info for source-level debugging which is quite inconvenient.b) Some platforms which might benefit from usage of U-Boot basically
don't have enough RAM to accommodate relocation of U-Boot so we
keep code in flash and use as much of RAM as possible for more
interesting things.Signed-off-by: Alexey Brodkin
Cc: Simon Glass
Cc: Bin Meng
Cc: Heiko Schocher
Cc: York Sun
Cc: Stefan Roese
17 Mar, 2018
2 commits
-
Merge init_helpers.h in the new file init.h
with only prototypes for init_cache_f_r
used in common/board_f.cSigned-off-by: Patrick Delaunay
-
Move prototypes for function used in common/board_f.c
from common.h to init.h
Remove weak for arch_reserve_stacks in prototype
(checkpatch issue)Signed-off-by: Patrick Delaunay
28 Jan, 2018
1 commit
-
Fix some style violations in the board_f file.
Reviewed-by: Simon Glass
Signed-off-by: Mario Six
25 Jan, 2018
1 commit
24 Jan, 2018
1 commit
-
Change all coldfire arch files to use CONFIG_DISPLAY_CPUINFO.
Signed-off-by: Angelo Dureghello
Reviewed-by: Tom Rini
---
Changes for v2:
- update common/Kconfig to add M68K to the default y list