Module Name: src
Committed By: matt
Date: Mon Jan 17 07:47:20 UTC 2011
Modified Files:
src/sys/arch/evbppc/conf [matt-nb5-pq3]: RB800
src/sys/arch/evbppc/mpc85xx [matt-nb5-pq3]: machdep.c mpc85xx_start.S
Log Message:
Enable SPE for RB800.
Add SPE tidbits for mpc85xx.
To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbppc/conf/RB800
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/evbppc/mpc85xx/machdep.c \
src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbppc/conf/RB800
diff -u src/sys/arch/evbppc/conf/RB800:1.1.2.1 src/sys/arch/evbppc/conf/RB800:1.1.2.2
--- src/sys/arch/evbppc/conf/RB800:1.1.2.1 Fri Jan 7 01:40:36 2011
+++ src/sys/arch/evbppc/conf/RB800 Mon Jan 17 07:47:20 2011
@@ -1,4 +1,4 @@
-# $NetBSD: RB800,v 1.1.2.1 2011/01/07 01:40:36 matt Exp $
+# $NetBSD: RB800,v 1.1.2.2 2011/01/17 07:47:20 matt Exp $
#
# RB800 -- everything that's currently supported
#
@@ -7,7 +7,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-ident "RB800-$Revision: 1.1.2.1 $"
+ident "RB800-$Revision: 1.1.2.2 $"
maxusers 32
@@ -15,6 +15,7 @@
#options UVMHIST_PRINT
options MPC8544
+options PPC_HAVE_SPE
# Options for necessary to use MD
#options MEMORY_DISK_HOOKS
@@ -40,11 +41,10 @@
# Diagnostic/debugging support options
#options VERBOSE_INITPPC
options DIAGNOSTIC # cheap kernel consistency checks
-options DEBUG # expensive debugging checks/support
+#options DEBUG # expensive debugging checks/support
#options SYSCALL_DEBUG # syscall debugging
options DDB # in-kernel debugger
options DDB_HISTORY_SIZE=512 # enable history editing in DDB
-options TRAP_PANICWAIT
options SYMTAB_SPACE=410000 # size for embedded symbol table
makeoptions DEBUG="-g" # compile full symbol table
Index: src/sys/arch/evbppc/mpc85xx/machdep.c
diff -u src/sys/arch/evbppc/mpc85xx/machdep.c:1.1.2.1 src/sys/arch/evbppc/mpc85xx/machdep.c:1.1.2.2
--- src/sys/arch/evbppc/mpc85xx/machdep.c:1.1.2.1 Fri Jan 7 01:40:36 2011
+++ src/sys/arch/evbppc/mpc85xx/machdep.c Mon Jan 17 07:47:20 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.1.2.1 2011/01/07 01:40:36 matt Exp $ */
+/* $NetBSD: machdep.c,v 1.1.2.2 2011/01/17 07:47:20 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -39,7 +39,9 @@
__KERNEL_RCSID(0, "$NetSBD$");
#include "opt_mpc85xx.h"
+#include "opt_altivec.h"
#include "opt_pci.h"
+#include "opt_ddb.h"
#include "gpio.h"
#include "pci.h"
@@ -65,6 +67,7 @@
#include <prop/proplib.h>
#include <machine/stdarg.h>
+#include <powerpc/pcb.h>
#include <dev/cons.h>
@@ -247,7 +250,7 @@
{ "spi", SPI_BASE, SPI_SIZE, 0, 1,
{ ISOURCE_SPI },
1 + ilog2(DEVDISR_SPI) },
- { "esdhc", ESDHC_BASE, ESDHC_SIZE, 0, 1,
+ { "sdhc", ESDHC_BASE, ESDHC_SIZE, 0, 1,
{ ISOURCE_ESDHC },
1 + ilog2(DEVDISR_ESDHC) },
#endif
@@ -730,6 +733,17 @@
#endif
/*
+ * Initialize a few things in lwp0.
+ */
+ lwp0.l_md.md_veccpu = curcpu();
+ lwp0.l_md.md_fpucpu = curcpu();
+ {
+ extern void *proc0paddr;
+ lwp0.l_addr = proc0paddr;
+ }
+ lwp0.l_md.md_utf = trapframe(&lwp0);
+
+ /*
* Set some more MD helpers
*/
cpu_md_ops.md_cpunode_locs = mpc8548_cpunode_locs;
@@ -748,7 +762,7 @@
}
#endif
- printf(" initppc done!\n");
+ printf(" initppc done!\n");
}
#ifdef MPC8548
@@ -850,7 +864,7 @@
{
struct cpu_info * const ci = curcpu();
- booke_cpu_startup();
+ booke_cpu_startup(socname(mfspr(SPR_SVR)));
uint32_t v = cpu_read_4(GLOBAL_BASE + PORPLLSR);
uint32_t plat_ratio = PLAT_RATIO_GET(v);
Index: src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S
diff -u src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S:1.1.2.1 src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S:1.1.2.2
--- src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S:1.1.2.1 Fri Jan 7 01:40:36 2011
+++ src/sys/arch/evbppc/mpc85xx/mpc85xx_start.S Mon Jan 17 07:47:20 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mpc85xx_start.S,v 1.1.2.1 2011/01/07 01:40:36 matt Exp $ */
+/* $NetBSD: mpc85xx_start.S,v 1.1.2.2 2011/01/17 07:47:20 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#include <powerpc/asm.h>
-RCSID("$NetBSD: mpc85xx_start.S,v 1.1.2.1 2011/01/07 01:40:36 matt Exp $")
+RCSID("$NetBSD: mpc85xx_start.S,v 1.1.2.2 2011/01/17 07:47:20 matt Exp $")
#include "opt_ddb.h"
#include "opt_ipkdb.h"
@@ -47,6 +47,7 @@
#include "opt_multiprocessor.h"
#include "opt_ppcarch.h"
#include "opt_ppcparam.h"
+#include "opt_altivec.h"
#include "ksyms.h"
@@ -62,7 +63,7 @@
#define INTSTK 0
- .machine e500
+ .machine e500x2
/*
* This symbol is here for the benefit of kvm_mkdb, and is supposed to
* mark the start of kernel text.
@@ -273,6 +274,9 @@
#include <powerpc/booke/trap_subr.S>
#include <powerpc/powerpc/locore_subr.S>
#include <powerpc/powerpc/pio_subr.S>
+#ifdef PPC_HAVE_SPE
+#include <powerpc/booke/spe_subr.S>
+#endif
#if 0
.p2align 5