Skip to content

Make sure 85xx bss doesn't start at 0x0

Peter Tyser u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/2] Make sure 85xx bss doesn't start at 0x0
Quoted 14 lines · Wolfgang Denk

Dear Peter Tyser,

Quoted 5 lines · In message <[email protected]> you wrote:

I personally like the current implementation of putting the bss after the entire U-Boot image. It keeps U-Boot's code, malloc pool, stack, bss, etc all in the same general area which is nice, and has the side benefit that the bootpg won't be overwritten.

OK, if you think so...

Quoted 2 lines

I know ORing in 0x10 is a bit ugly, but what's the real downside of doing it?

Quoted 6 lines

Nothing. I just hate to allocate the bss at 0x0, because this is actually incorrect - it's the result of an address overflow / truncation, and pretty much misleading to someone trying to read and understand the code. For the linked image, it does not _look_ as if the bss was located _after_ the U-Boot image, it looks detached and allocated in low RAM.

Do you have a preference Kumar? You're probably going to be the first in line to have to deal with any resulting confusion:)

I personally would rank the options:
1. OR in an offset to the bss address and leave some good comments in the linker script and commit message

2. Make the bss the last section like other PPC boards which would result in the bootpg sometimes being overwritten

3. Put the bss at an arbitrary address

Best,
Peter