11.1Snisimura/*-
21.1Snisimura * Copyright (c) 2012 The NetBSD Foundation, Inc.
31.1Snisimura * All rights reserved.
41.1Snisimura *
51.1Snisimura * This code is derived from software contributed to The NetBSD Foundation
61.1Snisimura * by Paul Fleischer <paul@xpg.dk>
71.1Snisimura *
81.1Snisimura * Redistribution and use in source and binary forms, with or without
91.1Snisimura * modification, are permitted provided that the following conditions
101.1Snisimura * are met:
111.1Snisimura * 1. Redistributions of source code must retain the above copyright
121.1Snisimura *    notice, this list of conditions and the following disclaimer.
131.1Snisimura * 2. Redistributions in binary form must reproduce the above copyright
141.1Snisimura *    notice, this list of conditions and the following disclaimer in the
151.1Snisimura *    documentation and/or other materials provided with the distribution.
161.1Snisimura *
171.1Snisimura * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
181.1Snisimura * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
191.1Snisimura * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
201.1Snisimura * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
211.1Snisimura * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
221.1Snisimura * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
231.1Snisimura * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
241.1Snisimura * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
251.1Snisimura * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
261.1Snisimura * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
271.1Snisimura * POSSIBILITY OF SUCH DAMAGE.
281.1Snisimura */
291.1Snisimura
301.1Snisimura/* This file is based on arch/evbarm/smdk2xx0/smdk2410_start.S */
311.1Snisimura/*
321.1Snisimura * Copyright (c) 2002, 2003 Fujitsu Component Limited
331.1Snisimura * Copyright (c) 2002, 2003 Genetec Corporation
341.1Snisimura * All rights reserved.
351.1Snisimura *
361.1Snisimura * Redistribution and use in source and binary forms, with or without
371.1Snisimura * modification, are permitted provided that the following conditions
381.1Snisimura * are met:
391.1Snisimura * 1. Redistributions of source code must retain the above copyright
401.1Snisimura *    notice, this list of conditions and the following disclaimer.
411.1Snisimura * 2. Redistributions in binary form must reproduce the above copyright
421.1Snisimura *    notice, this list of conditions and the following disclaimer in the
431.1Snisimura *    documentation and/or other materials provided with the distribution.
441.1Snisimura * 3. Neither the name of The Fujitsu Component Limited nor the name of
451.1Snisimura *    Genetec corporation may not be used to endorse or promote products
461.1Snisimura *    derived from this software without specific prior written permission.
471.1Snisimura *
481.1Snisimura * THIS SOFTWARE IS PROVIDED BY FUJITSU COMPONENT LIMITED AND GENETEC
491.1Snisimura * CORPORATION ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
501.1Snisimura * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
511.1Snisimura * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
521.1Snisimura * DISCLAIMED.  IN NO EVENT SHALL FUJITSU COMPONENT LIMITED OR GENETEC
531.1Snisimura * CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
541.1Snisimura * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
551.1Snisimura * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
561.1Snisimura * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
571.1Snisimura * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
581.1Snisimura * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
591.1Snisimura * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
601.1Snisimura * SUCH DAMAGE.
611.1Snisimura */
621.1Snisimura
631.1Snisimura#include <machine/asm.h>
641.1Snisimura#include <arm/armreg.h>
651.1Snisimura#include <arm/arm32/pte.h>
661.1Snisimura#include <arm/arm32/pmap.h>		/* for PMAP_DOMAIN_KERNEL */
671.1Snisimura
681.1Snisimura#include <arm/s3c2xx0/s3c2440reg.h>	/* for S3C2440_SDRAM_START */
691.1Snisimura
701.1Snisimura/*
711.1Snisimura * Kernel start routine for Friendly ARM Mini2440.
721.1Snisimura * This code is excuted at the very first after the kernel is loaded
731.1Snisimura * by boot program.
741.1Snisimura */
751.1Snisimura	.text
761.1Snisimura
771.1Snisimura	.global	_C_LABEL(mini2440_start)
781.1Snisimura_C_LABEL(mini2440_start):
791.2Sandvar	/* r0 (argument 0) remains unchanged until initarm() is called */
801.1Snisimura
811.1Snisimura	/* Jump to kernel code in TRUE VA */
821.1Snisimura	adr	r1, Lstart
831.1Snisimura	ldr	pc, [r1]
841.1Snisimura
851.1Snisimura
861.1SnisimuraLstart:
871.1Snisimura	.word	start
88