Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179155
b: refs/heads/master
c: 0833c76
h: refs/heads/master
i:
  179153: 9a3a65e
  179151: c8874ca
v: v3
  • Loading branch information
Yoichi Yuasa authored and Ralf Baechle committed Jan 12, 2010
1 parent 6afbca6 commit edf385f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6a3c851a287980e47b45bf191a3b78d9d8508e2
refs/heads/master: 0833c76bd894b797f353e32c5eadfe16855bcf69
24 changes: 8 additions & 16 deletions trunk/arch/mips/cobalt/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,26 +97,18 @@ void __init plat_mem_setup(void)

void __init prom_init(void)
{
int narg, indx, posn, nchr;
unsigned long memsz;
int argc, i;
char **argv;

memsz = fw_arg0 & 0x7fff0000;
narg = fw_arg0 & 0x0000ffff;

if (narg) {
arcs_cmdline[0] = '\0';
argv = (char **) fw_arg1;
posn = 0;
for (indx = 1; indx < narg; ++indx) {
nchr = strlen(argv[indx]);
if (posn + 1 + nchr + 1 > sizeof(arcs_cmdline))
break;
if (posn)
arcs_cmdline[posn++] = ' ';
strcpy(arcs_cmdline + posn, argv[indx]);
posn += nchr;
}
argc = fw_arg0 & 0x0000ffff;
argv = (char **)fw_arg1;

for (i = 1; i < argc; i++) {
strlcat(arcs_cmdline, argv[i], COMMAND_LINE_SIZE);
if (i < (argc - 1))
strlcat(arcs_cmdline, " ", COMMAND_LINE_SIZE);
}

add_memory_region(0x0, memsz, BOOT_MEM_RAM);
Expand Down

0 comments on commit edf385f

Please sign in to comment.