About iTop4412 Start-up guide

Source: Internet
Author: User

iTop4412 irom start and Exynos4212 irom booting guide are the same.

Tools for making itop4412 BL1: http://download.csdn.net/detail/cj675816156/9101607

Irom Phase START process

This article describes how to build BL1 and BL2 in Exynos4412, so that Irom can successfully load BL1, BL2 finally execute the OS.

Irom stored in the start-up phase from (NAND, eMMC, sdcard, etc.) loading a specific binary to the Ram/sram program, this program by Samsung in the chip factory burned, did not give code, so we can not see the source code. Irom loading Start-up process see the following figure:

1. First, Irom provides an initial basic environment for executing arm code

2. Copy the BL1 from the specific boot device (SD/MMC, eMMC4.3, eMMC4.4, and NAND) to the memory SRAM

3.irom Check the integrity of the BL1 in memory SRAM and jump to BL1 if the copy result is OK

Direct-go

The purpose of this option is to skip the execution of BL1 and BL2, provided the system is just awakened from the Aftr, Deepstop, and LPA modes.

If the dedicated register has been configured with Direct-go before entering the above three modes, then the Irom code executes the code in the specified address DDR and does not go back to executing BL1 and BL2.

The direct-go registers are as follows:

Register Name Address
SFR for Direct-go flag 0x0202_0020
SFR for Direct-go Address 0x0202_0024

If the value of the flag register (0x0202_0020) of the Direct-go function is 0xfcba_0d10

And the value of the address register (0x0202_0024) of the Direct-go function is also provided, then the program flow jumps to the address given in the 0x02020024 register for execution.

About the boot device, the code can be read by reading the OM pin the corresponding register, you can know which device is starting from, OM each value has the corresponding device as follows:

OM[5:1] 1st Device 2nd Device
2 (b ' 00010) Sdmmc_ch2 Usb
3 (b ' 00011) Emmc43_ch0 Usb
4 (b ' 00100) Emmc44_ch4 Usb
8 (b ' 01000) Nand_512_8ecc Usb
9 (b ' 01001) Nand_2kb_over Usb
(b ' 10011) Emmc43_ch0 Sdmmc_ch2
(b ' 10100) Emmc44_ch4 Sdmmc_ch2
(b ' 11000) Nand_512_8ecc Sdmmc_ch2
(b ' 11001) Nand_2kb_over Sdmmc_ch2

The following is an introduction to the BL1 process:

BL1 Read the startup mode register to determine which device to boot from, then read the BL2 from this device into the SRAM, and then check the integrity of the SRAM BL2. BL1 code should not be dependent on the configuration of the external platform, and the security context data should be inside the BL1,

BL1 also has the BL2 security check public key, BL2 's public key is used to verify whether the BL2 is the author's own unmodified program image, if not it will fail to start.

About the BL2 startup process:

BL2 Copy the OS image (BL3) into the DDR and check the integrity of the OS image.

The system clock and configuration initialization DDR are initialized in BL2, and UART, net, eMMC, SDcard, etc. can be initialized if necessary.

The process code in BL2 is not dependent on BL1, which means that BL2 will not go back to calling the BL1 process.

The start-up process at each stage is basically like this, the following describes the internal memory map that is how to divide the SRAM in the paragraphs, what is put in each paragraph?

The size of the BL1 is 8KB is 8192 bytes, the beginning of the SRAM start address 5KB is reserved for irom, BL1 code security context stored in 0x0202_3000 location, BL2 size can be modified BL1 to adjust, as long as BL1 multi-copy point BL2 can be amplified.

In (s.lsi?s reference Code of BL1) Samsung gives the BL1 specified in the BL2 is 14kb-4b,4b is stored BL2 check code, if you make BL2 dissatisfaction 14kb-4, then the dissatisfaction of those places should fill 0, BL2 's signature is located in the 0x0202_6c00,checksum for BL2 at 0X0202_6BFC in S.lsi?s reference code.

Irom to copy the BL1 into the SRAM, then it must have some functional interfaces such as (SDcard copy interface, EMMC copy interface, USB copy interface, etc.), then where are these interfaces?

The answer is 0x0202_0030 to 0x0202_0070. These addresses are the portals of a copy function function, which you can then call the corresponding copy function by pointing to an address and then using the function pointer.

Here's a description of these function functions:

Address Name Descripyion
0x02020030 Sdmmc_readblocks

return 1=true,0=false; parameters (U32 Srcblock, U32 numofsrcblock,void * dstbyte)

srcblock:start block number. (0 ~ N) The number of the copy starting block starts from 0

Numofsrcblock: Number of copy blocks

Dstbyte: Destination Address (System Memory)

0x0202003c Loadbl2fromemmc43ch0

This interface copies BL2 scandisk data from eMMC 4.3 to internal ram;

return 1=true,0=false; parameters (u32 srcblock,u32 * dstbyte)

0x02020040 Emmc43_endbootop_emmc

This interface ends eMMC 4.3 boot mode;

The return and parameters are both void

0x02020044 Msh_readfromfifo_emmc

This interface copies boot area data from eMMC 4.4 to the destination address;

return 1=true,0=false; parameters (U32 unumofblocks, void * udstaddr)

Unumofblocks: Total number of blocks transferred, 1 blocks =512b

udstaddr: Destination Address (System Memory)

0x02020048 Msh_endbootop_emmc

This interface ends eMMC 4.4 boot mode;

The return and arguments are void, and this function waits for the end of the read function above.

0x02020070 Loadimagefromusb

This interface copies data from USB, if the enumeration succeeds in Irom, this function can be used;

return 1=true,0=false; parameter void

Attention:

1. The clocks supplied to SDMMC and eMMC at startup are the 20MHZ,MPLL of these clocks.

2. If Sdmmc and eMMC are selected as boot devices, then SDMMC or EMMC copy functions in Irom are available in the BL1 and BL2 phases. If you want to use these two functions, please do not modify the SDMMC or eMMC clock before use.

Also do not modify the SDMMC or EMMC related PLL clock configuration. If you modify the SDMMC or EMMC related clock configuration, then the correct copy is not guaranteed.

The following is a reference to the SD boot example partition about SDcard:

About iTop4412 Start-up guide

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.