2 * Copyright 2001 MontaVista Software Inc.
3 * Author: jsun@mvista.com or jsun@junsun.net
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
10 #include <linux/init.h>
12 #include <linux/sched.h>
13 #include <linux/bootmem.h>
15 #include <asm/addrspace.h>
16 #include <asm/bootinfo.h>
19 int (*open) (char*, int, int);
21 int (*read) (int, void*, int);
22 int (*write) (int, void*, int);
23 off_t (*lseek) (int, off_t, int);
24 int (*printf) (const char*, ...);
25 void (*cacheflush) (void);
26 char* (*gets) (char*);
29 struct callvectors* debug_vectors;
30 char arcs_cmdline[CL_SIZE];
32 extern unsigned long gt64120_base;
34 const char *get_system_type(void)
36 return "Momentum Ocelot";
39 /* [jsun@junsun.net] PMON passes arguments in C main() style */
40 void __init prom_init(int argc, char **arg, char** env, struct callvectors *cv)
45 /* save the PROM vectors for debugging use */
48 /* arg[0] is "g", the rest is boot parameters */
49 arcs_cmdline[0] = '\0';
50 for (i = 1; i < argc; i++) {
51 if (strlen(arcs_cmdline) + strlen(arg[i] + 1)
52 >= sizeof(arcs_cmdline))
54 strcat(arcs_cmdline, arg[i]);
55 strcat(arcs_cmdline, " ");
58 mips_machgroup = MACH_GROUP_MOMENCO;
59 mips_machtype = MACH_MOMENCO_OCELOT;
62 if (strncmp("gtbase", *env, 6) == 0) {
63 gt64120_base = simple_strtol(*env + strlen("gtbase="),
70 debug_vectors->printf("Booting Linux kernel...\n");
72 /* All the boards have at least 64MiB. If there's more, we
73 detect and register it later */
74 add_memory_region(0, 64 << 20, BOOT_MEM_RAM);
77 void __init prom_free_prom_memory(void)
81 void __init prom_fixup_mem_map(unsigned long start, unsigned long end)