diff options
author | gonzo <gonzo@FreeBSD.org> | 2013-09-04 20:34:36 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2013-09-04 20:34:36 +0000 |
commit | 1eec0c04d002462ffc14d1d3a0e51db88bcecc7b (patch) | |
tree | ada18ef269502d56adc3451a3fa29c4ebf6760c1 /sys/mips | |
parent | 059527f86c1f6894818d8ea99339b92ad2f425a7 (diff) | |
download | FreeBSD-src-1eec0c04d002462ffc14d1d3a0e51db88bcecc7b.zip FreeBSD-src-1eec0c04d002462ffc14d1d3a0e51db88bcecc7b.tar.gz |
Add 32-bit support for Gxemul's oldtestmips machine emulation
Original work by: kan@
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/conf/GXEMUL32 | 61 | ||||
-rw-r--r-- | sys/mips/gxemul/mpreg.h | 7 |
2 files changed, 68 insertions, 0 deletions
diff --git a/sys/mips/conf/GXEMUL32 b/sys/mips/conf/GXEMUL32 new file mode 100644 index 0000000..6bd756f --- /dev/null +++ b/sys/mips/conf/GXEMUL32 @@ -0,0 +1,61 @@ +# +# GXEMUL "oldtestmips" sample kernel configuration. +# +# $FreeBSD$ +# + +ident GXEMUL + +machine mips mips +cpu CPU_MIPS4KC + +options HZ=100 + +makeoptions KERNLOADADDR=0x80100000 + +include "../gxemul/std.gxemul" + +hints "GXEMUL.hints" #Default places to look for devices. + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +makeoptions MODULES_OVERRIDE="" + +options DDB +options KDB + +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + +options SCHED_ULE +options INET # InterNETworking +options INET6 # IPv6 communications protocols + +options FFS #Berkeley Fast Filesystem + +# Debugging for use in -current +#options DEADLKRES #Enable the deadlock resolver +options INVARIANTS #Enable calls of extra sanity checking +options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed + +options ROOTDEVNAME=\"ufs:gxemul_disk0\" + +device gxemul_cons +device gxemul_disk +device gxemul_ether + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +device tun # Packet tunnel. +device md # Memory "disks" +device gif # IPv6 and IPv4 tunneling +device faith # IPv6-to-IPv4 relaying (translation) + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter diff --git a/sys/mips/gxemul/mpreg.h b/sys/mips/gxemul/mpreg.h index e09946d..f562d07 100644 --- a/sys/mips/gxemul/mpreg.h +++ b/sys/mips/gxemul/mpreg.h @@ -43,10 +43,17 @@ #define GXEMUL_MP_DEV_IPI_READ 0x00c0 #define GXEMUL_MP_DEV_CYCLES 0x00d0 +#ifdef _LP64 #define GXEMUL_MP_DEV_FUNCTION(f) \ (volatile uint64_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) #define GXEMUL_MP_DEV_READ(f) \ (volatile uint64_t)*GXEMUL_MP_DEV_FUNCTION(f) +#else +#define GXEMUL_MP_DEV_FUNCTION(f) \ + (volatile uint32_t *)MIPS_PHYS_TO_DIRECT_UNCACHED(GXEMUL_MP_DEV_BASE + (f)) +#define GXEMUL_MP_DEV_READ(f) \ + (volatile uint32_t)*GXEMUL_MP_DEV_FUNCTION(f) +#endif #define GXEMUL_MP_DEV_WRITE(f, v) \ *GXEMUL_MP_DEV_FUNCTION(f) = (v) |