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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [sparc64/] [prom/] [bootstr.c] - Blame information for rev 1275

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

Line No. Rev Author Line
1 1275 phoenix
/* $Id: bootstr.c,v 1.1.1.1 2004-04-15 01:33:55 phoenix Exp $
2
 * bootstr.c:  Boot string/argument acquisition from the PROM.
3
 *
4
 * Copyright(C) 1995 David S. Miller (davem@caip.rutgers.edu)
5
 * Copyright(C) 1996,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
6
 */
7
 
8
#include <linux/string.h>
9
#include <linux/init.h>
10
#include <asm/oplib.h>
11
 
12
/* WARNING: The boot loader knows that these next three variables come one right
13
 *          after another in the .data section.  Do not move this stuff into
14
 *          the .bss section or it will break things.
15
 */
16
 
17
#define BARG_LEN  256
18
struct {
19
        int bootstr_len;
20
        int bootstr_valid;
21
        char bootstr_buf[BARG_LEN];
22
} bootstr_info = {
23
        .bootstr_len = BARG_LEN,
24
};
25
 
26
char * __init
27
prom_getbootargs(void)
28
{
29
        /* This check saves us from a panic when bootfd patches args. */
30
        if (bootstr_info.bootstr_valid)
31
                return bootstr_info.bootstr_buf;
32
        prom_getstring(prom_chosen_node, "bootargs",
33
                       bootstr_info.bootstr_buf, BARG_LEN);
34
        bootstr_info.bootstr_valid = 1;
35
        return bootstr_info.bootstr_buf;
36
}

powered by: WebSVN 2.1.0

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