Upload
johnson-chou
View
2.283
Download
4
Embed Size (px)
Citation preview
Introduction of OMAP4 Booting Sequence
Jiahe Jou, 2012/09/13
RevisionsDATE AUTHOR DESCRIPTION
2012/09/13 Jiahe Jou Draft.
Outlines
● Booting Types● Booting Overview● Before Booting● Peripheral Booting● Memory Booting● Memory Map● Make A Bootable SD Card● OMAP Bootloader Overview
Booting Types
● To start a initialization software(bootstrap)
● Peripheral Booting○ UART○ USB
● Memory Booting○ XIP(eXecution In Place)
■ NOR○ Non-XIP
■ MMC(eMMC)■ SD(eSD)■ NAND
Booting Types
● sys_boot[5:0]
● Peripheral Preferred Booting○ 0b0xxxxx
● Memory Preferred Booting○ 0b1xxxxx
sys_boot[5:0] 1st 2nd 3rd 4th
0b010110 USB UART MMC1 MMC2(1)
0b110110 MMC2(1) USB UART MMC1
Booting OverviewROM code
start
Start up and configuration
Booting
Copying or download
successful?
More devices in list?
Image execution
Setup booting device list
Select device from the list
Yes
NoNo
Yes
Wait for reset
Failed or returned
Booting OverviewBooting
Permanent device?
CH present?
CH sent?
Download Image
Is XIP device?
Copy and excute CH
Copy to RAM
Copy and excute CH
Image execution
Yes
Yes
No Yes
No
Yes
No
No
Before Booting
● Start up and configuration○ Reading SYSBOOT pins○ Software booting configuration
● Setup booting device list○ sys_boot[5:0]○ Redefined by software booting configuration
● Select device from list○ Select a device to start booting procedure
Before Booting
● Software booting configuration structure○ Store in SAR RAM memory○ PUBLIC_SW_BOOT_CFG_ADDR(0x4A326A00)
■ Be 0 if cold reset■ Address of configuration structure on else
● Software booting configuration○ Device booting list○ Clock setting○ Time-out mechanism of peripheral booting
Peripheral Booting
● Types○ UART ○ USB
● Download a flash loader(Pre-flashing)
● Initial flash memories
● Update firmware
Peripheral Booting
Peipheral Booting
USB Initialization
UART or
USB
UART Initialization
Synchronization Phase
Transfer Phase
Failed
USB
UART
Time-out
Time-out
Synchronized
SuccessedTransfered
Peripheral BootingSynchronization Phase of USB
USB enumeration
Get ASIC ID
ASIC ID
Booting message
3s time-out
3s time-out
Peripheral BootingSynchronization Phase of UART
Get ASIC ID
ASIC ID
Booting message300ms time-out
ASIC ID
Peripheral BootingTransfer Phase
Image size
Image1min time-out
1min time-out
Peripheral Booting
● ASIC ID structure○ Items, number of sub-blocks○ ID sub-block, device identification○ Checksum sub-block, CRC(not for UART)○ 3 reserved sub-blocks
● Booting message○ Peripheral booting, 0xF0030002○ Change device, 0xF003xx06○ Next device, 0xFFFFFFFF○ Memory booting, Others
■ Get ASIC ID, 0xF003 0003
Memory Booting
● Types○ XIP(eXecution In Place)
■ NOR○ Non-XIP
■ MMC(eMMC)■ SD(eSD)
● Code shadowing for Non-XIP○ Copying code to RAM
Memory Booting
Memory Booting
Copy image to RAM
Is XIP dev?
Execute image
No
Yes
Memory BootingSD/MMC Booting
Initilization
Configure card address
(RCA)
Is raw mode?
Find and get booting file
Get raw data
Successed
Yes
No
Memory Booting
● SDMMCx interfaces○ SDMMC1(SDCard)
■ Raw■ File system
○ SDMMC2(eMMC)■ Raw
● Avoid boot time penalty
Memory Booting
● Raw○ Read image directly from sectors○ Four consecutive location, offset 128KB
■ 0x00000(bytes)■ 0x20000■ 0x40000■ 0x60000
● File system(FAT16, FAT32)○ Read image from a booting file○ SDMMC1 only○ File name must be "MLO"
Memory Map
48KB
Make A Bootable SD Card
● http://code.google.com/p/beagleboard/wiki/LinuxBootDiskFormat
● Tool○ fdisk○ mkfs
● Procedure○ Step 1. Prepre a SD card○ Step 2. Delete all partitions○ Step 3. Configure SD card
■ Heads, sectors, cylinders○ Step 4. Create a FAT32 partition○ Step 5. Mark it as bootable○ Step 6. Format the partition
OMAP Bootloader Overview
● http://omappedia.org/wiki/Bootloader_Project
● Two stages○ x-loader○ u-boot
ROM code x-loader u-boot Linux kernel
1st stage 2nd stage
End