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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [arch/] [sparc/] [prom/] [bootstr.c] - Blame information for rev 1777

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1624 jcastillo
/* $Id: bootstr.c,v 1.1 2005-12-20 09:49:32 jcastillo Exp $
2
 * bootstr.c:  Boot string/argument acquisition from the PROM.
3
 *
4
 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
5
 */
6
 
7
#include <linux/config.h>
8
#include <asm/oplib.h>
9
 
10
static char barg_buf[256];
11
 
12
char *
13
prom_getbootargs(void)
14
{
15
        int iter;
16
        char *cp;
17
 
18
        switch(prom_vers) {
19
        case PROM_V0:
20
                cp = barg_buf;
21
                for(iter = 0; iter < 8; iter++) {
22
                        strcpy(cp, (*(romvec->pv_v0bootargs))->argv[iter]);
23
                        cp += strlen(cp); *cp++=' ';
24
                }
25
                *cp = 0;
26
                break;
27
        case PROM_V2:
28
        case PROM_V3:
29
                cp = barg_buf;
30
                strcpy(cp, *romvec->pv_v2bootargs.bootpath);
31
                cp += strlen(cp);
32
                *cp++ = ' ';
33
                strcpy(cp, *romvec->pv_v2bootargs.bootargs);
34
                cp += strlen(cp);
35
                *cp = 0;
36
                break;
37
        case PROM_AP1000:
38
          /*
39
           * Get message from host boot process.
40
           */
41
#if CONFIG_AP1000
42
                ap_getbootargs(barg_buf);
43
#endif          
44
                break;
45
        default:
46
                barg_buf[0] = 0;
47
                break;
48
        }
49
        return barg_buf;
50
}

powered by: WebSVN 2.1.0

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