Teacher Zhu Arm bare Metal Study Notes (iv): S5PV210 START process

Source: Internet
Author: User
Common device features

Memory:
SRAM static memory is characterized by small capacity, high price, the advantage is not required software initialization directly on the power can be used
DRAM dynamic memory is characterized by large capacity, low price, the disadvantage is that the power can not be used directly after the software is initialized to use.

Single-chip microcomputer: Memory demand is small, and hope to develop as simple as possible, suitable for all with SRAM
Embedded systems: Large memory requirements and no bootable media such as Norflash
PC: High memory demand, and software complexity, do not care about the initial cost of DRAM, suitable for all DRAM

External memory
Norflash: The characteristic is the small capacity, the price is high, the advantage is can and the CPU direct bus type to connect, the CPU can be read directly after electricity, therefore generally serves as the starting medium.
Nandflash (like hard disk): the characteristics of large capacity, low price, the disadvantage is not bus-type access, that is, the CPU can not be read directly, the CPU needs to run some initialization software, and then read and write through the timing interface.

So the general PC is: very small capacity of the BIOS (Norflash) + very large capacity of the hard disk (similar to Nandflash) + high-capacity dram
General microcontroller: Very small capacity of Norflash + very small capacity SRAM
Embedded system: Because Norflash is very expensive, so many embedded systems now tend to not norflash,
Direct use: External large-capacity NAND + external large-capacity DRAM + SOC built-in SRAM

S5PV210 uses the Startup method is: External large capacity NAND + external large capacity DRAM + SOC built-in SRAM s5pv210 Overview of the boot process

With regard to the start-up process and manner of the s5pv210, Samsung specifically provided a document, "S5pv210_irom_application Note", which is translated by most of the following start-up process from this manual.

In this diagram, you can see that s5pv210 's launch can be roughly divided into five steps.
1. Irom Stage (BL0)
2. BL1 Stage
3. BL2 Stage
4. Copy OS to SDRAM
5. Start the OS

Samsung solidified a piece of code in the Irom inside the s5pv210 to initialize the clock, identify the user-selected startup mode, and copy the Boot-loader first-stage code into the SRAM from the appropriate place. In addition, Samsung also integrates 96KB internal SRAM inside the s5pv210, since SRAM does not need to be initialized, power up can be used, so it can be considered as the code running space before the DRAM is initialized. what the Irom have done.

1, close the watchdog;
2, the initialization of Icache;
3, initialize the stack;
4, initialize the heap;
5, initialize the block device copy function ;
6, initialize the PLL, set the system clock;
7, copy the BL1 to the internal SRAM area;
8, check the BL1 checksum;
9, check whether it is safe boot mode;
10. Jump to the start code of BL1.

At the beginning of the s5pv210 startup process, there was a place that always wondered: Boot-loader code is stored in Flash, Irom is how to not initialize Flash and copy BL1 to SRAM (Nand Flash Initialization code was executed at the BL1 stage), and then read through the S5pv210_irom_application Note before you know it. Irom has cured a series of block device copy Functions , the block device copy function, is used to initialize the different kinds of NAND and copy the code, about these functions manual section 2.7 has introduced
s5pv210 start Flowchart


As you can see from the Figure 210, the first thing to know when booting up is whether the system wakes up from hibernation or just power up, deciding whether to reboot the system or jump directly to the OS before resuming the hibernation code.

And then there's a "Checksum OK?" Judgment, if the BL1 code validation error will automatically jump to try to start with "2nd" mode .

S5PV210 also provides a "secure boot" mode for secure boot.

S5PV210 provides a variety of start-up methods, where "1st Start" can be pin-selected, when "1st Boot" failure will attempt to start from "2nd", that is, from the SD card Channel 2, the SD card boot mode. If "2nd boot" still fails, it attempts to start from "Uart boot" and if it still fails it will attempt to boot from "USB boot". irom 2nd boot-up sequence when 1st Bootfail (2nd START process after 1st boot failure)

Start-up mode selection PIN configuration

distribution of bootloader, Kernel, filesystem, etc. in NAND

s5pv210 start way many kinds, the first time to learn to understand so much, to do a record, I believe that with the deep understanding of learning will not be the same, then come back to update.

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.