Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.

Slides:



Advertisements
Similar presentations
PC bootup Presented by: Rahul Garg (2003CS10183) Rajat Sahni (2003CS10184) Varun Gulshan(2003CS10191)
Advertisements

Net+OS Initialization Initialization Sequence Initialization Routine Roles ROM Image Compression/Decompression.
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 1.
Embedded Systems Programming
7/23 Coldfire Exceptions and Interrupts Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee
Introduction to Kernel
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
ARM 7 Datapath. Has “BIGEND” input bit, which defines whether the memory is big or little endian Modes: ARM7 supports six modes of operation: (1) User.
1 Process Description and Control Chapter 3 = Why process? = What is a process? = How to represent processes? = How to control processes?
WANs and Routers Routers. Router Description Specialized computer Like a general purpose PC, a router has:  CPU  Memory  System Bus Connecting Internal.
Software Development and Software Loading in Embedded Systems.
The ARM Programmer’s Model
© 2004 Cisco Systems, Inc. All rights reserved. Managing Your Network Environment Managing Router Startup and Configuration INTRO v2.0—9-1.
NET+OS 6.1 Training. BSP NET+OS 6.1 BSP Initialization Memory map New features Debugging Porting Issues.
Exception and Interrupt Handling
Introduction to Embedded Systems
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose:  This training module provides a technical description of Renesas.
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
CORTEX-M0 Structure Discussion 2 – Core Peripherals
LPC2148 Programming Using BLUEBOARD
Chap 5 Startup and Setup Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
DOS  In the 1980s or early 1990s, the operating system that shipped with most PCs was a version of the Disk Operating System (DOS) created by Microsoft:
Samsung ARM S3C4510B Product overview System manager
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction Purpose  This course provides an overview of the CPU architecture.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
S&IP Consortium Course Material Standard I/O and Core Peripherals Speaker: Tian-Sheuan Chang July, 2004.
Lab I Real-Time Embedded Operating System for a SoC System.
SOC Consortium Course Material Core Peripherals National Taiwan University Adopted from National Chiao-Tung University IP Core Design.
SAM9260-EK WinCE DEMO AT91 SAM9 Product Group. Version 1.0 October 2006.
SAM9260-EK WinCE DEMO AT91 SAM9 Product Group. Version 1.0 October 2006.
1.4 Hardware Review. CPU  Fetch-decode-execute cycle 1. Fetch 2. Bump PC 3. Decode 4. Determine operand addr (if necessary) 5. Fetch operand from memory.
Advanced x86: BIOS and System Management Mode Internals Boot Process Xeno Kovah && Corey Kallenberg LegbaCore, LLC.
AT91 C-startup. 2 For reasons of modularity and portability most application code for an embedded application is written in C The application entry point.
Hardware process When the computer is powered up, it begins to execute fetch-execute cycle for the program that is stored in memory at the boot strap entry.
1 CCNA Semester 2 Introduction to Routers Unit 2 Review JEOPARDY.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Bootable Programs Building an O/S. Basic Requirements of any O/S Respond to interrupts (all kinds) Preserve user environment Protect users and self from.
Linux Boot Process on the Raspberry Pi 2 1 David Ferry, Chris Gill CSE 522S - Advanced Operating Systems Washington University in St. Louis St. Louis,
U-boot 실행 Sequence 망고 100 보드로 놀아보자 -8
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
The World Leader in High Performance Signal Processing Solutions Das U-Boot: Blackfin Guts.
DATE S. S.. Sandstone The sandstone carries out the following tasks: 1. Set up target platform environment, 2. Load a bootable image into memory, 3. Relinquish.
Real Time Systems Lab. rtlab.knu.ac.kr Progress Report Kim Jung Kil.
Introduction to Kernel
CCNA 2 v3 JEOPARDY Module 2 CCNA2 v3 Module 2 K. Martin.
Interrupts and signals
EMBEDDED LINUX #2.
Timer and Interrupts.
Improvement of startup time using Software Suspend - Project Update -
ARM Cortex-M3 RTLAB 박 유 진.
MCF5249 Software Examples Bootable example code for the MCF5249
Architecture Background
The Hardware Interface
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Configuring a Router Module 3 Semester 2.
Speaker: Tian-Sheuan Chang July, 2004
AT91 C-startup This training module describes the C-Startup sequence, which performs initialization of the microcontroller from the reset up to the calling.
Introduction to the Intel x86’s support for “virtual” memory
Chapter 9 Bootloader.
ARM Introduction.
Lecture 3 - Instruction Set - Al
Lecture9: Embedded Network Operating System: cisco IOS
Computer System Laboratory
Computer System Laboratory
Architectural Support for OS
CPU Structure and Function
Lecture 10 review Booting sequence in Brief
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

Chap. 4 ARM Boot Loader Internals

2 S3C2500 ARM940T Core module ARM9TDMI CoreIC

3 S3C2500B Block Diagram

4 ARM940T Block Diagram

5  Introduction  What does the bootloader do before entering C code.  Bootloader assembly code

6 Introduction #1/2  The main purpose of bootloader is to initialize the target system,and load the operating system to execute.  The bootloader is usually the first piece of code that will be executed on any hardware.  Bootloader has absolutely high dependence on the target system. On different target system, despite of the same CPU, you usually need to modify the bootloader.

7 Introduction #2/2  A more friendly and powerful bootloader can include the following extra function. 1. Power on Self Test (POST) 2. Support console operate 3. Support download kernel image or file from serial port, Ethernet, even USB. 4. Support write / erase kernel image or file to flash. 5. Setting up IP, MAC, System Time, etc. 6. Support Accessing I/O, memory, register.  The universal bootloader, U-boot and Blog, are such examples of powerful bootloaders.

8 Boot Init Flow 0x x C Exception Vector Table B Reset_Handle Reset_Handle Hardware Environment configuration Big Endian System Configuration Set Internal clock Disable peripheral clock Disable interrupt Protection Region Unit Disable Disable protection unit Disable ICache Disable DCache SDRAM Initialize clock, refresh, wait cycle EEPROM/Flash/SRAM init Copy ROM image to SDRAM Remap Stack Intialize Initial variable depend on develop environment copy the static data IRQ disable Call C function call execute the loader Init the consol UART Init the Ethernet Load the program file from the tftp server to the 0x200000

9 Copy ROM image to SDRAM(1)  由 memory address 0x (FLASH) 開始的地方複製 128KB 的資料 到 address 0x (SDRAM) 開始 的地方 0x x x x KB

10 Flash EXT I/O Bank #1 EXT I/O Bank #2 EXT I/O Bank #3 EXT I/O Bank #4 EXT I/O Bank #5 EXT I/O Bank #6 EXT I/O Bank #7 Reserved SDRAM #0 Reserved SDRAM #1 Reserved Internal Register 0x x x x x x x x x x x x x xF xFFFFFFFF Flash EXT I/O Bank #1 EXT I/O Bank #2 EXT I/O Bank #3 EXT I/O Bank #4 EXT I/O Bank #5 EXT I/O Bank #6 EXT I/O Bank #7 Reserved SDRAM #0 Reserved SDRAM #1 Reserved Internal Register 0x x x x x x x x x x x x x xF xFFFFFFFF remap

11 STACK area USR_STACK UDF_STACK ABT_STACK IRQ_STACK FIQ_STACK SUP_STACK ﹜ 4KBytes ﹜ ﹜ ﹜ 1KBytes ﹜ ﹜ 4KBytes STACK area

12 Initializing Memory required by run time Environment IMPORT |Image$$RO$$Limit| ;// End of ROM code (=start of ROM data) IMPORT |Image$$RW$$Base| ;// Base of RAM to initialise IMPORT |Image$$ZI$$Base| ;// Base and limit of area IMPORT |Image$$ZI$$Limit| ;// to zero initialise Static data dynamic data Zero initial data code RO region RW region Image.rom ZI region Stack region 0x00 RO Limit RW Base STACK_BASE

13 EXT I/O Bank #0 EXT I/O Bank #1 EXT I/O Bank #2 EXT I/O Bank #3 EXT I/O Bank #4 EXT I/O Bank #5 EXT I/O Bank #6 EXT I/O Bank #7 Reserved SDRAM #0 Reserved SDRAM #1 Reserved Internal Register 0x x x x x x x x x x x x x xF xFFFFFFFF After remap, the memory map Exception Handler Vector Table Code Area RW data ZERO initial data STACK area User area 0x Flash 0x RO data 0x x DSP 0x x ﹜ 18KBytes

14 Memory Map change process

15 7.Set interrupt stack pointer #2/5 Undefined Abort Supervisor IRQ FIQ USR  After initializing stacks, the memory map will be as following.  You can set stack size of each mode at init_gun.h file. That will describe letter. SDRAM

16 What does the bootloader do before entering C code.  The part of bootloader before entering C code is written in ARM assembly code. Its main purpose is to initialize the target system and prepare the environment for C language. 1.Stop all Interrupts : To prevent from interrupt before completing initial process. 2.Initial memory, which includes enable memory banks, initializing memory configuration registers, and so on. 3.Disable instruction / data caches. 4.Copy RO_RW section to SDRAM (according to CPU). 5.Clear ZI section. 6.Memory banks Remap (according to CPU). 7.Set interrupt stack pointer : prepare for executing C code. 8.Branch to the entry point of C code.

17 Bootloader assembly code  We take the bootloader example on target system that use S3C2500 CPU.  The target system have 2MB Flash and 16MB SDRAM.  The complete bootloader source example is at the attached file.

18 Branch to the entry point of C code.  Now, we can branch to C code. And use C language to achieve powerful function of bootloader and load OS kernel. IMPORT C_Entry B C_Entry ; "System Start !"