2 * PROJECT: ReactOS Boot Loader
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: boot/armllb/boot.s
5 * PURPOSE: Implements the entry point for ARM machines
6 * PROGRAMMERS: ReactOS Portable Systems Group
9 .title "ARM LLB Entry Point"
10 .include "ntoskrnl/include/internal/arm/kxarm.h"
11 .include "ntoskrnl/include/internal/arm/ksarm.h"
16 #ifdef _BEAGLE_ // This is only used for TI BootROM on Beagle/Emulator for now
18 * On Beagle, the boot is directly from TI BootROM that reads NAND flash.
19 * First word is size of program to load.
20 * Second word is load address of program. Since DDR is not initialized,
21 * we load to SDRAM at 40200000h. Max 64K.
27 * On ZOOM2, we currently load from u-boot to make bring-up easier.
29 * In order to get ATAG and all that goodness, we have to fool u-boot into
30 * thinking we are a Linux ARM kernel.
32 * So this is a 'fake' uImage-format header, which will make u-boot grok our
33 * image and correctly execute it.
35 * Note that a data checksum is in the header, but thankfully we can disable
38 * There's also a header checksum, but as long as there's no need to modify
39 * this header, we can leave it static.
41 * Finally, note that the "Image String" is sized as a 32-byte array in the
42 * uImage header format. The string chosen below is not only accurate, but
43 * also happens to fit exactly in 32 bytes, meaning we don't need to pad.
45 .word 0x56190527 // Header Magic
46 .word 0x5E4B8444 // Checksum
47 .word 0x483BE54C // Timestamp
48 .word 0x0CA10000 // Image size (64K)
49 .word 0x00000081 // Load address
50 .word 0x40000081 // Entrypoint
51 .word 0x90873DD8 // Data Checksum ('setenv verify n' must be set!)
55 .byte 0 // No compression
56 .ascii "ReactOS ARM Low-Level Bootloader"
59 /* Load C entrypoint and setup LLB stack */
61 ldr sp, L_BootStackEnd
66 #ifdef _BEAGLE_ // This is only used for TI BootROM on Beagle/Emulator for now
68 #elif _ZOOM2_ // On ZOOM2 RAM starts at 0x80000000, not 0
71 #error Stack Address Not Defined