| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pbl_set_putc may be called by a PBL entry point to store the absolute
address of a routine to be used for printing out a character.
If barebox happens to be located outside of the initially known RAM,
it will be relocated into it by means of relocate_to_adr(), but nothing
will take care to update the function pointer stored by pbl_set_putc.
This will usually continue to work until barebox sets up the MMU and
everything not known to be RAM is marked as eXecute Never. After that,
the next PBL console print will trigger an instruction abort.
Fix this by not storing the putc function pointer, but instead an offset
relative to _text.
This is the second part of fixing barebox hanging on i.MX8M when located
at an address greater than 4G.
This change has been tested on both i.MX8M (AArch64) and i.MX6 (Thumb2).
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230907082126.2326381-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Using dev_err() and friends in PBL results in undefined references.
Implement dev_printf() for PBL to avoid that. Just ignore the dev
argument here as it's likely not intialized in PBL.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like U-Boot, barebox has two standard output streams:
CONSOLE_STDOUT and CONSOLE_STDERR in addition to the input stream
CONSOLE_STDIN.
>From a consumer view, the console.active device parameter allows
restricting which of these streams interact with a given console.
>From a provider view, only CONSOLE_STDOUT is ever used. dputs
dputc allow passing in CONSOLE_STDERR instead, but nothing in-tree
does so.
Change this by having all log messages (e.g. pr_debug or dev_err)
go to CONSOLE_STDERR. For nearly all systems that just use the default
of console.active="ioe" or "oe", there is no difference. But now
systems that use either "o" or "e" can use different console
devices for barebox log messages and for standard output by commands.
This is especially useful to debug interactive applications like edit
or for monitoring barebox debug messages during execution of payloads
when barebox acts as EFI loader.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220930154145.754181-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Record GPL-2.0-only as license for all files lacking an explicit license
statement.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-12-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Replace the *sprintf to their *snprintf version when printing
to the fixed size printbuffer.
Reported-by: Neeraj Pal <neerajpal09@gmail.com>
Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
Link: https://lore.barebox.org/20210417211144.26466-1-jmaselbas@kalray.eu
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
The PBL console support may be configured before the BSS segment
is cleared. Put the pointer into the data section so that it is
not affected by the BSS clearing.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
console_puts uses console_putc() to output characters, so the carriage
return should be output with the same function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
With more stuff being done in PBL regular console support gets more and more
useful. This makes the PBL console independent of DEBUG_LL which is only
meant for early debugging but not regular output.
To use the regular PBL console a board must call pbl_set_putc() which stores
a pointer to the putc function to be used.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The PBL has console support now, so add memory_display support aswell
which can be a good debugging aid.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
This adds simple console support to the PBL which makes it
possible to print more complex messages in the PBL than just
strings or hex numbers. For now puts_ll is used to print the
messages, so it depends on CONFIG_DEBUG_LL which makes it
more a debugging option. However, this could be extended later
to get regular output from the PBL if desired.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|