/*1* arch/score/kernel/head.S2*3* Score Processor version.4*5* Copyright (C) 2009 Sunplus Core Technology Co., Ltd.6* Chen Liqin <[email protected]>7* Lennox Wu <[email protected]>8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License as published by11* the Free Software Foundation; either version 2 of the License, or12* (at your option) any later version.13*14* This program is distributed in the hope that it will be useful,15* but WITHOUT ANY WARRANTY; without even the implied warranty of16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17* GNU General Public License for more details.18*19* You should have received a copy of the GNU General Public License20* along with this program; if not, see the file COPYING, or write21* to the Free Software Foundation, Inc.,22* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA23*/24#include <linux/init.h>25#include <linux/linkage.h>2627#include <asm/asm-offsets.h>2829.extern start_kernel30.global init_thread_union31.global kernelsp3233__INIT34ENTRY(_stext)35la r30, __bss_start /* initialize BSS segment. */36la r31, _end37xor r8, r8, r838391: cmp.c r31, r3040beq 2f4142sw r8, [r30] /* clean memory. */43addi r30, 444b 1b45462: la r28, init_thread_union /* set kernel stack. */47mv r0, r2848addi r0, KERNEL_STACK_SIZE - 3249la r30, kernelsp50sw r0, [r30]51subi r0, 4*452xor r30, r30, r3053ori r30, 0x02 /* enable MMU. */54mtcr r30, cr455nop56nop57nop58nop59nop60nop61nop6263/* there is no parameter */64xor r4, r4, r465xor r5, r5, r566xor r6, r6, r667xor r7, r7, r768la r30, start_kernel /* jump to init_arch */69br r30707172