OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [i960/] [kernel/] [head.c] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1623 jcastillo
/*
2
 *   FILE: head.c
3
 * AUTHOR: kma
4
 *  DESCR: Initialization code for the i960.
5
 */
6
 
7
#ident "$Id: head.c,v 1.1 2005-12-20 09:42:38 jcastillo Exp $"
8
 
9
#include <linux/autoconf.h>
10
#include <linux/kernel.h>
11
 
12
/*
13
 * So here we are! Running at ipl 31, in supervisor mode, on mon960's user
14
 * stack. Do we need to do much here? Let's just get right into start_kernel.
15
 */
16
 
17
int main(void)
18
{
19
        long oldac;
20
 
21
        extern void start_kernel(void);
22
 
23
        /* 64-bit math routines need the overflow mask bit set */
24
        __asm__ __volatile__
25
                ("modac %1, %1, %1" : "=r"(oldac) : "0"(1 << 12));
26
 
27
        /* Make the i960 think it's in an interrupt handler. This has the effect
28
         * of not switching to the interrupt stack for every interrupt. Of
29
         * course, we wouldn't need this if there were a sensible way of
30
         * specifying an interrupt stack short of reinitializing the CPU, but
31
         * such is life.
32
         *
33
         * XXX: this has the effect of using user stacks for interrupts too.
34
         * The world's a scary place.
35
         */
36
        __asm__ __volatile__ ("modpc    %1, %1, %1" : "=r"(oldac) : "0"(1<<13));
37
 
38
#ifdef CONFIG_CMDLINE_PROMPT
39
        /* do crazy command-line obtainments... */
40
#endif
41
 
42
        start_kernel();
43
 
44
        printk("XXX: start_kernel returned!!!\n");
45
        for(;;) ;
46
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.