forked from Minki/linux
3070033a16
More information about the SEAD-3 platform can be found at <http://www.mips.com/products/development-kits/mips-sead-3/> on MTI's site. Currently, the M14K family of cores is what the SEAD-3 is utilised with. Signed-off-by: Douglas Leung <douglas@mips.com> Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Steven J. Hill <sjhill@mips.com>
47 lines
972 B
C
47 lines
972 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/string.h>
|
|
|
|
#include <asm/bootinfo.h>
|
|
|
|
extern int prom_argc;
|
|
extern int *_prom_argv;
|
|
|
|
/*
|
|
* YAMON (32-bit PROM) pass arguments and environment as 32-bit pointer.
|
|
* This macro take care of sign extension.
|
|
*/
|
|
#define prom_argv(index) ((char *)(long)_prom_argv[(index)])
|
|
|
|
char * __init prom_getcmdline(void)
|
|
{
|
|
return &(arcs_cmdline[0]);
|
|
}
|
|
|
|
void __init prom_init_cmdline(void)
|
|
{
|
|
char *cp;
|
|
int actr;
|
|
|
|
actr = 1; /* Always ignore argv[0] */
|
|
|
|
cp = &(arcs_cmdline[0]);
|
|
while (actr < prom_argc) {
|
|
strcpy(cp, prom_argv(actr));
|
|
cp += strlen(prom_argv(actr));
|
|
*cp++ = ' ';
|
|
actr++;
|
|
}
|
|
if (cp != &(arcs_cmdline[0])) {
|
|
/* get rid of trailing space */
|
|
--cp;
|
|
*cp = '\0';
|
|
}
|
|
}
|