Skip to contentSkip to conversation

Use .data section in SPL ?

U-Boot Masahiro Yamada 3 participants 6 messages Dec 10, 2014 – Dec 11, 2014

lore
Share & tools
lore
#0 lore raw

Hi.

I notice SPL is using .data section

u32 *boot_params_ptr = NULL;
struct spl_image_info spl_image;

/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));

If SPL is running on an execute-in-place device such NOR flash, .data section is not writable.

common/spl/spl_nor.c does not work.

Shall we ban global variables on SPL (and pre-relocation) ?

or

Shall we make .data section available?

Best Regards
Masahiro Yamada

#1 lore raw
Quoted 15 lines · Masahiro Yamada

Hi.

I notice SPL is using .data section

u32 *boot_params_ptr = NULL;
struct spl_image_info spl_image;

/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));

Quoted 4 lines

If SPL is running on an execute-in-place device such NOR flash, .data section is not writable.

common/spl/spl_nor.c does not work.

spl_nor.c only works today on PowerPC where there's nothing shoved into the .data section.

And all of this is related to what's needed to enable DM in SPL on ARM as well, iirc anyhow.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141210/e9757d80/attachment.pgp>
#2 lore raw

Hi Tom,

Quoted 19 lines · Tom Rini
Quoted 18 lines · Masahiro Yamada

Hi.

I notice SPL is using .data section

u32 *boot_params_ptr = NULL;
struct spl_image_info spl_image;

/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));

If SPL is running on an execute-in-place device such NOR flash, .data section is not writable.

Quoted 8 lines
Quoted 1 line

common/spl/spl_nor.c does not work.

spl_nor.c only works today on PowerPC where there's nothing shoved into the .data section.

And all of this is related to what's needed to enable DM in SPL on ARM as well, iirc anyhow.

Can you please explain the SPL problem on ARM a bit more? If It could understand what is going on, or how to repeat it, I might be able to help. I'd really like to enable this DM SPL support...

Regards,
Simon

#3 lore raw
Quoted 27 lines · Simon Glass

Hi Tom,

Quoted 24 lines · Tom Rini
Quoted 15 lines · Masahiro Yamada

Hi.

I notice SPL is using .data section

u32 *boot_params_ptr = NULL;
struct spl_image_info spl_image;

/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));

Quoted 4 lines

If SPL is running on an execute-in-place device such NOR flash, .data section is not writable.

common/spl/spl_nor.c does not work.

spl_nor.c only works today on PowerPC where there's nothing shoved into the .data section.

Quoted 6 lines
Quoted 2 lines

And all of this is related to what's needed to enable DM in SPL on ARM as well, iirc anyhow.

Can you please explain the SPL problem on ARM a bit more? If It could understand what is going on, or how to repeat it, I might be able to help. I'd really like to enable this DM SPL support...

Did you see the WIP patch I sent out in reply to the SPL DM series?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141210/62adc49e/attachment.pgp>
#4 lore raw

Hi Tom,

Quoted 28 lines · Tom Rini
Quoted 27 lines · Simon Glass

Hi Tom,

Quoted 24 lines · Tom Rini
Quoted 15 lines · Masahiro Yamada

Hi.

I notice SPL is using .data section

u32 *boot_params_ptr = NULL;
struct spl_image_info spl_image;

/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));

Quoted 4 lines

If SPL is running on an execute-in-place device such NOR flash, .data section is not writable.

common/spl/spl_nor.c does not work.

spl_nor.c only works today on PowerPC where there's nothing shoved into the .data section.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

And all of this is related to what's needed to enable DM in SPL on ARM as well, iirc anyhow.

Can you please explain the SPL problem on ARM a bit more? If It could understand what is going on, or how to repeat it, I might be able to help. I'd really like to enable this DM SPL support...

Did you see the WIP patch I sent out in reply to the SPL DM series?

Not that I recall - you mean this one?

http://patchwork.ozlabs.org/patch/417792/

I might have been asleep. Will take a look.

Regards,
Simon

#5 lore raw
Quoted 38 lines · Simon Glass

Hi Tom,

Quoted 35 lines · Tom Rini
Quoted 33 lines · Simon Glass

Hi Tom,

Quoted 19 lines · Tom Rini
Quoted 18 lines · Masahiro Yamada

Hi.

I notice SPL is using .data section

u32 *boot_params_ptr = NULL;
struct spl_image_info spl_image;

/* Define board data structure */
static bd_t bdata __attribute__ ((section(".data")));

If SPL is running on an execute-in-place device such NOR flash, .data section is not writable.

Quoted 7 lines
Quoted 1 line

common/spl/spl_nor.c does not work.

spl_nor.c only works today on PowerPC where there's nothing shoved into the .data section.

And all of this is related to what's needed to enable DM in SPL on ARM as well, iirc anyhow.

Can you please explain the SPL problem on ARM a bit more? If It could understand what is going on, or how to repeat it, I might be able to help. I'd really like to enable this DM SPL support...

Quoted 7 lines
Quoted 1 line

Did you see the WIP patch I sent out in reply to the SPL DM series?

Not that I recall - you mean this one?

http://patchwork.ozlabs.org/patch/417792/

I might have been asleep. Will take a look.

Yup, that's the one. Fixing that (and the similar constructs the other TI platforms have) and then a few other similar constructs elsewhere is why we have to throw things into .data but write to them today in ARM.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141210/25c22f25/attachment.pgp>