/*1* Startup code for use with the u-boot bootloader.2*3* Copyright (C) 2004-2006 Atmel Corporation4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#include <asm/setup.h>1011/*12* The kernel is loaded where we want it to be and all caches13* have just been flushed. We get two parameters from u-boot:14*15* r12 contains a magic number (ATAG_MAGIC)16* r11 points to a tag table providing information about17* the system.18*/19.section .init.text,"ax"20.global _start21_start:22/* Check if the boot loader actually provided a tag table */23lddpc r0, magic_number24cp.w r12, r025brne no_tag_table2627/* Initialize .bss */28lddpc r2, bss_start_addr29lddpc r3, end_addr30mov r0, 031mov r1, 0321: st.d r2++, r033cp r2, r334brlo 1b3536/*37* Save the tag table address for later use. This must be done38* _after_ .bss has been initialized...39*/40lddpc r0, tag_table_addr41st.w r0[0], r114243/* Jump to loader-independent setup code */44rjmp kernel_entry4546.align 247magic_number:48.long ATAG_MAGIC49tag_table_addr:50.long bootloader_tags51bss_start_addr:52.long __bss_start53end_addr:54.long _end5556no_tag_table:57sub r12, pc, (. - 2f)58bral panic592: .asciz "Boot loader didn't provide correct magic number\n"606162