Commit c78cbf49 authored by Ralf Baechle's avatar Ralf Baechle
Browse files

Support for MIPSsim, the cycle accurate MIPS simulator.

parent b288f135
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -448,6 +448,17 @@ config MOMENCO_OCELOT_3
	  The Ocelot-3 is based off Discovery III System Controller and
	  PMC-Sierra Rm79000 core.

config MIPS_SIM
	bool 'Support for MIPS simulator (MIPSsim)'
	select DMA_NONCOHERENT
	select IRQ_CPU
	select SYS_SUPPORTS_32BIT_KERNEL
	select SYS_SUPPORTS_BIG_ENDIAN
	select SYS_SUPPORTS_LITTLE_ENDIAN
	help
	  This option enables support for MIPS Technologies MIPSsim software
	  emulator.

config MOMENCO_JAGUAR_ATX
	bool "Support for Momentum Jaguar board"
	select BOOT_ELF32
+7 −0
Original line number Diff line number Diff line
@@ -436,6 +436,13 @@ load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
core-$(CONFIG_MIPS_SEAD)	+= arch/mips/mips-boards/sead/
load-$(CONFIG_MIPS_SEAD)	+= 0xffffffff80100000

#
# MIPS SIM
#
core-$(CONFIG_MIPS_SIM)		+= arch/mips/mips-boards/sim/
cflags-$(CONFIG_MIPS_SIM)	+= -Iinclude/asm-mips/mach-sim
load-$(CONFIG_MIPS_SIM)		+= 0x80100000

#
# Momentum Ocelot board
#
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@
EXPORT(stext)					# used for profiling
EXPORT(_stext)

#ifdef CONFIG_QEMU
#if defined(CONFIG_QEMU) || defined(CONFIG_MIPS_SIM)
	/*
	 * Give us a fighting chance of running if execution beings at the
	 * kernel load address.  This is needed because this platform does
+20 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2005 MIPS Technologies, Inc.  All rights reserved.
#
# This program is free software; you can distribute it and/or modify it
# under the terms of the GNU General Public License (Version 2) as
# published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
#

obj-y := sim_setup.o sim_mem.o sim_time.o sim_printf.o sim_int.o sim_irq.o \
	sim_cmdline.o
obj-$(CONFIG_SMP) += sim_smp.o
+59 −0
Original line number Diff line number Diff line
/*
 * Carsten Langgaard, carstenl@mips.com
 * Copyright (C) 1999,2000 MIPS Technologies, Inc.  All rights reserved.
 *
 * This program is free software; you can distribute it and/or modify it
 * under the terms of the GNU General Public License (Version 2) as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
 *
 * Kernel command line creation using the prom monitor (YAMON) argc/argv.
 */
#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 *)(((int *)(int)_prom_argv)[(index)]))

char arcs_cmdline[CL_SIZE];

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';
}
Loading