mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH master 1/3] RISC-V: cpu: request stack memory region
Date: Sat, 3 Apr 2021 09:09:15 +0200	[thread overview]
Message-ID: <2cd63d9c-903d-3670-6417-65d1fa324410@pengutronix.de> (raw)
In-Reply-To: <20210402111348.fcc6384084512f23588aad8f@gmail.com>

Hello Antony,

On 02.04.21 10:13, Antony Pavlov wrote:
>> This is strange. Could you print get_runtime_offset() at this location?
>> It should be zero, because relocate_to_current_adr() had previously run,
>> but it seems it's not for you? I don't see how compiler reordering could have
>> occurred given that we don't do LTO and relocate_to_current_adr is thus
>> a compiler barrier.

[ Naïve me thinking there are any guarantees from GCC for self-modifying code ]

> +    empty_slot_init(0, 0xffffffff);

That's tremendously useful. Thanks! I don't quite understand how it works
though. It registers a "fall-back" device for all of the 32-bit address
space?

> There are empty_slot read warnings on master:
> 
>     barebox$ qemu-system-riscv32 -nographic -M erizo -bios ./images/barebox-erizo-generic.img -serial stdio -monitor none -trace file=/dev/null 
>     >get_runtime_offset()=0x00000000
>     empty_slot: read from 0000000000022caf
>     empty_slot: read from 0000000000022cae
>     empty_slot: read from 0000000000022cb0
>     empty_slot: read from 0000000000022cb1
>     riscv-timer riscv-timer: running at 24000000 Hz
>     Switch to console [cs0]
> 
>     barebox 2021.03.0-00134-gc4a1684da9-dirty #1 Fri Apr 2 10:33:45 MSK 2021
> 
>     Board: generic Erizo SoC board
>     riscv-timer riscv-timer: running at 24000000 Hz
>     malloc space: 0x804ffd80 -> 0x805ffd7f (size 1 MiB)
> 
>     Hit any to stop autoboot:    1
>     boot: error 2
>     barebox:/ 
> 
> 
> There is no empty_slot warning with fef19e17f651^ barebox:
> 
>     barebox$ qemu-system-riscv32 -nographic -M erizo -bios ./images/barebox-erizo-generic.img -serial stdio -monitor none -trace file=/dev/null 
>     >RISC-V system with no 'timebase-frequency' in DTS
>     Switch to console [cs0]
> 
>     barebox 2021.03.0-00122-g6107208573 #1 Fri Apr 2 11:09:16 MSK 2021
> 
>     Board: generic Erizo SoC board
>     RISC-V system with no 'timebase-frequency' in DTS
>     malloc space: 0x802ffd80 -> 0x803ffd7f (size 1 MiB)
> 
>     Hit any to stop autoboot:    0
>     boot: error 2
>     barebox:/ 

Thanks. I identified two issues and CC'd you on a patch fixing them.
Breaking erizo has been a blessing to sort out this kind of bugs early :D

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

  reply	other threads:[~2021-04-03  7:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24  8:23 Ahmad Fatoum
2021-03-24  8:23 ` [PATCH master 2/3] RISC-V: board-dt-2nd: ensure FDT doesn't overlap with early mem regions Ahmad Fatoum
2021-03-24  8:23 ` [PATCH master 3/3] RISC-V: boot: move stack top to very end of memory Ahmad Fatoum
2021-03-29  7:57 ` [PATCH master 1/3] RISC-V: cpu: request stack memory region Sascha Hauer
2021-04-02  5:56 ` Antony Pavlov
2021-04-02  6:34   ` Ahmad Fatoum
2021-04-02  8:13     ` Antony Pavlov
2021-04-03  7:09       ` Ahmad Fatoum [this message]
2021-04-03  9:00         ` Antony Pavlov
2021-04-04 11:26           ` Ahmad Fatoum

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=2cd63d9c-903d-3670-6417-65d1fa324410@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /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