From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: "Barbier, Renaud" <renaud.barbier@abaco.com>,
"barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: Uart set up in PBL
Date: Mon, 8 Mar 2021 21:22:30 +0100 [thread overview]
Message-ID: <44bd35be-7d96-294b-c625-2e94398d2c08@pengutronix.de> (raw)
In-Reply-To: <MN2PR16MB3135E6DF1FAD29294046059391969@MN2PR16MB3135.namprd16.prod.outlook.com>
Hello Renaud,
On 05.03.21 14:08, Barbier, Renaud wrote:
>> So you load pbl/bare init barebox into SRAM, run PBIT memory test on DRAM,
>> then extract/copy barebox proper to DRAM or how does it work?
>>
> [Barbier, Renaud]
> For now I have never used PBL on ARM (lwl-y => obj-y). Probably did not do right as I tweaked the barebox linker script to have a TEXT_BASE. Only reason I did not use PBL is that it did not boot first few time I tried and the other way worked right away.
>
> PBIT runs from SPI NOR flash which is not a problem as there is a DDR BIST unit on our ARM SOC. I did include the memtester from pyropus.ca too for a more comprehensive test and obviously it is very slow running from flash with D-cache off. An improvement would be to run from SRAM.
>
> From the barebox_arm-reset_vector, the uart is set to a fixed baud rate, the DDR memory initialized and if PBIT is enabled a quick or comprehensive test is ran. Otherwise use the BIST to initialise ECC if present and then barebox_arm_entry is called to relocate barebox in memory.
I see. I am afraid there's no suitable API for early variable
readout you can directly use. Some solutions that come to mind:
- If you have early chainloading to copy the reset of barebox
into DRAM, you could use it to load a data block with your own
format
- The sama5d2 boards use FAT from PBL, before barebox proper is
initialized. Only if you have an early block driver.
- Read it from i2c EEPROM if available: There is early i2c code
for i.MX (used for SPD EEPROM)
- Change memory test to log to memory and then write from barebox
proper
- Dedicate a word in barebox header for the baud rate and patch the binary
in flash to override it...
I'd be interested in hearing what you eventually decide on.
Cheers,
Ahmad
>
>
>
>
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-03-08 20:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 12:28 Barbier, Renaud
2021-03-04 12:59 ` Ahmad Fatoum
2021-03-04 16:41 ` Barbier, Renaud
2021-03-05 10:48 ` Ahmad Fatoum
2021-03-05 13:08 ` Barbier, Renaud
2021-03-08 20:22 ` Ahmad Fatoum [this message]
2021-03-04 13:07 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44bd35be-7d96-294b-c625-2e94398d2c08@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=renaud.barbier@abaco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox