IVT for bare metal boot of SoloX from QSPI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IVT for bare metal boot of SoloX from QSPI

1,007 Views
ozu
Contributor III

Hi All,

I need to boot the SoloX from QSPI with a bare metal boot code and want it to trigger M4 later.

What I could do so far,

1) Can flash uboot in QSPI and it works.

2) Can flash the image from the attached sample program in SD and it boots A9 and then M4

 

My questions,

1) To make the image which works in SD, work also in QSPI, what do we need to change? Do we need to change IVT?

2) If we keep the same linker file and attempt a non XIP boot from QSPI, changing the addresses in IVT should work, right?

3) Following are my modified IVT structures from plat_startup.h (attached sample program). Modifications are highlighted in red. Can someone help me figure out, are these changes correct? The image doesn't work when placed in QSPI, with or without these changes.

4) Can anyone provide, sample boot code for bare metal boot from QSPI on SoloX?

 

Any help is appreciated!

 

plat_startup.h contents:

 

/* image starts at 0x00907000 */

/* flash header & DCD @ 0x400 */

.macro plat_dcd_startup

    b startup

  .org 0x400 //Do we need to change this?

 

 

/* First IVT to copy the plugin that initializes the system into OCRAM */

ivt_header:                    .long 0x402000D1    /* Tag=0xD1, Len=0x0020, Ver=0x40 */

app_code_jump_v:        .long 0x00907458    /* Plugin entry point, address after the second IVT table */

reserv1:                     .long 0x0

dcd_ptr:                     .long 0x0

boot_data_ptr:              .long 0x78001020 /*original: 0x00907420  */

self_ptr:                        .long 0x78001000 /*original: 0x00907400 */

app_code_csf:           .long 0x0 /* reserve 4K for csf */

reserv2:                     .long 0x0

boot_data:                 .long 0x00907000

image_len:              .long 16*1024

plugin:                      .long 0x1   /* Enable plugin flag */

 

 

/* Second IVT to give entry point into the bootloader copied to DDR */

ivt2_header:                   .long 0x402000D1    /* Tag=0xD1, Len=0x0020, Ver=0x40 */

app2_code_jump_v:       .long startup       /* Entry point for the bootloader */

reserv3:                           .long 0x0

dcd2_ptr:                         .long 0x0

boot_data2_ptr:              .long 0x7800104C /* original boot_data2 */

self_ptr2:                        .long 0x7800102C /* original ivt2_header */

app_code_csf2:               .long 0x0 /* reserve 4K for csf */

reserv4:                          .long 0x0

boot_data2:                  .long IMAGE_ENTRY_ADDR

image_len2:                  .long IMAGE_SIZE

plugin2:                          .long 0x0

Original Attachment has been moved to: MX6SX_example-A9_launch_m4.zip

Labels (2)
3 Replies

700 Views
BiyongSUN
NXP Employee
NXP Employee

We have mfg tool to flash to spi nor. And boot uboot from spi nor in SoloX.

mfgtool2-yocto-mx6-sabresd-qspi-nor.vbs  in 3.10.53 solox mfg tool.

The boot depends no ivt. and the spi nor is the same as boot from sdcard.

What is IVT "bare metal boot"? It there any boot loader  not a bare metal?  uboot ? redboot or others?

0 Kudos

700 Views
ozu
Contributor III

Hi!

Sorry, maybe the title is a bit confusing, what I meant was, I want to run a bare metal code (not linux) on A9  and I don't want to use uboot.

Looking for another bootloader, maybe faster and more compact than uboot. The example that i attached in the original post, boots A9 with a bare metal image first and then M4. But this example works well from SD and not from QSPI.

I need to change the bootloader part of the image to make it work from QSPI.

0 Kudos

700 Views
igorpadykov
NXP Employee
NXP Employee

Hi ozu

compared with sd, for qspi header offset=0x1000, rom

loads it starting from 0x00907000 (iram free space start)

So seems changing .org 0x400 --> 0x1000 and all others offsets

like 0x00907420  --> 0x00908020 should work.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------