Root/nandboot/src/head.S

1/*
2 * head.S
3 *
4 * Entry of n-boot
5 *
6 * Copyright (c) 2005-2008 Ingenic Semiconductor Inc.
7 * Author: <jlwei@ingenic.cn>
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 */
14#include <config.h>
15#ifdef CONFIG_JZ4740
16#include <jz4740.h>
17#include <jz4740_board.h>
18#endif
19
20    .text
21    .set noreorder
22    .global startup
23startup:
24#ifdef CONFIG_JZ4740
25    .word JZ4740_NANDBOOT_CFG /* fetched by CPU during NAND Boot */
26#endif
27    /*
28     * Disable all interrupts
29     */
30    la $8, 0xB0001004 /* INTC_IMR */
31    li $9, 0xffffffff
32    sw $9, 0($8)
33
34    /*
35     * CU0=UM=EXL=IE=0, BEV=ERL=1, IP2~7=1
36     */
37    li $26, 0x0040FC04
38    mtc0 $26, $12 /* CP0_STATUS */
39
40    /* IV=1, use the specical interrupt vector (0x200) */
41    li $26, 0x00800000
42    mtc0 $26, $13 /* CP0_CAUSE */
43
44    /* Setup stack pointer */
45    la $29, 0x80004000
46
47    /* Jump to the nand boot routine */
48    j nand_boot
49    nop
50    .set reorder
51

Archive Download this file



interactive