boot sequence of EIM-NOR of i.MX6

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

boot sequence of EIM-NOR of i.MX6

1,873 Views
宗標廖
Contributor V

Hello Community

In page 417 of the reference manual IMX6SDLRM.pdf(Rev.2), there is the following description for SPI-NOR boot sequence:

1)The boot ROM will copy 4Kbyte of data from Serial ROM device to internal RAM.(The Initial 4K of Program Image must contain the IVT, DCD and the Boot Data structures.)

2)Checking the Image Vector Table header value (0xD1) from Program Image.

3)The ROM code performs a DCD check.

4)After successful DCD extraction, the ROM code extracts from Boot Data Structure the destination pointer and length of image to be copied to RAM device from where code execution occurs.

But for EIM-NOR boot, there is just a very simple description(page 387) as bellow:

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

The ROM reads Image Vector Table and Boot Data structures to determine if the image can be executed directly
from EIM address space or should be copied to other memory. The start field of Boot Data Structure specifies the final location of the image

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

So could you give more detailed boot sequence for EIM-NOR?

Thank you!

ZongbiaoLiao

0 Kudos
9 Replies

1,173 Views
Yuri
NXP Employee
NXP Employee

  IMX6 has fixed memory mapping for EIM (take a look at the RM, Table 2-1. System memory map),
this allows to define if app entry point is located in EIM or DRAM area.

~Yuri. 

0 Kudos

1,173 Views
宗標廖
Contributor V

Hello Yuri

I understood that CONFIG_SYS_LOAD_ADDR is not the Entry Point that you said.

I referred to Tool to dump and analyze IVT/DCD data in i.MX binaries  and dumped my u-boot as bellow:

 =================IVT data===================
ivt_length=20
ivt_entry=17800000
ivt_dcd=177FF42C
ivt_boot_data=177FF420
ivt_self=177FF400
ivt_csf=0
=================DCD data===================
tag=0xcc length=0x02ec param=0x04

So what is the Entry Point that you said?

Thank you!

ZongbiaoLiao

0 Kudos

1,173 Views
Yuri
NXP Employee
NXP Employee

Hello,

ivt_entry=17800000 - this is absolute address of the first instruction

   to execute from the image. This is RAM area. So, U-boot loads the image 

to RAM. 

Regards,

Yuri.

0 Kudos

1,173 Views
宗標廖
Contributor V

Hi Yuri

Please help me!

Thank you!

0 Kudos

1,173 Views
宗標廖
Contributor V

Hello Yuri

Thank you for your reply!

Entry point is defined by macro CONFIG_SYS_LOAD_ADDR in u-boot config file, is it right?

If Entry point is located in EIM, then ROM code does not read u-boot from EIM-NOR to DRAM, just extracts u-boot in EIM-NOR, right?

Thank you!

ZongbiaoLiao

0 Kudos

1,173 Views
Yuri
NXP Employee
NXP Employee

Hello,

  EIM NOR supports XIP approach, that allows to run boot code directly

in CPU address space without code copying from storage to DRAM.
This simplifies boot sequence - there is no need for primary and secondary

bootloader. It is enough to check IVT, verify - if needed - (signed) image

and just to jump to entry point.

Regards,

Yuri.

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

Note: If this post answers your question, please click the Correct

Answer button. Thank you!

0 Kudos

1,173 Views
宗標廖
Contributor V

Hello Yuri

Description in IMX6SDLRM.pdf:

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

The ROM reads Image Vector Table and Boot Data structures to determine if the image can be executed directly
from EIM address space or should be copied to other memory. The start field of Boot Data Structure specifies the final location of the image

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

For the red part above, how does the ROM code determine it?

(by some flags in IVT and Boot Data structures?)

Thank you!

ZongbiaoLiao

0 Kudos

1,173 Views
宗標廖
Contributor V

Hello Yuri

Thank you for your reply!

there is no need for primary and secondary bootloader

what does this mean?

Thank you!

ZongbiaoLiao

0 Kudos

1,173 Views
Yuri
NXP Employee
NXP Employee

Primary loader is intended to read first 4K (from SD or NAND, etc) in order to get IVT

and analyze it, Then - secondary loader can read the rest image.

~Yuri.

0 Kudos