Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/arm/arm Pull up revision 1.53 (requested by th...
details: https://anonhg.NetBSD.org/src/rev/7e3d2db66c1a
branches: netbsd-1-6
changeset: 529663:7e3d2db66c1a
user: he <he%NetBSD.org@localhost>
date: Sat Dec 07 19:40:24 2002 +0000
description:
Pull up revision 1.53 (requested by thorpej in ticket #703):
Enable branch prediction and write coalescing on XScale.
diffstat:
sys/arch/arm/arm/cpufunc.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r e6dca558fd0a -r 7e3d2db66c1a sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c Sat Dec 07 19:33:41 2002 +0000
+++ b/sys/arch/arm/arm/cpufunc.c Sat Dec 07 19:40:24 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.44.4.4 2002/11/18 02:19:33 he Exp $ */
+/* $NetBSD: cpufunc.c,v 1.44.4.5 2002/12/07 19:40:24 he Exp $ */
/*
* arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -1757,6 +1757,7 @@
xscale_setup(args)
char *args;
{
+ uint32_t auxctl;
int cpuctrl, cpuctrlmask;
/*
@@ -1768,7 +1769,8 @@
cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE
| CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE
| CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
- | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE;
+ | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE
+ | CPU_CONTROL_BPRD_ENABLE;
cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE
| CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE
| CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE
@@ -1797,5 +1799,12 @@
curcpu()->ci_ctrl = cpuctrl;
/* cpu_control(cpuctrlmask, cpuctrl);*/
cpu_control(0xffffffff, cpuctrl);
+
+ /* Make sure write coalescing is turned on */
+ __asm __volatile("mrc p15, 0, %0, c1, c0, 1"
+ : "=r" (auxctl));
+ auxctl &= ~XSCALE_AUXCTL_K;
+ __asm __volatile("mcr p15, 0, %0, c1, c0, 1"
+ : : "r" (auxctl));
}
#endif /* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 */
Home |
Main Index |
Thread Index |
Old Index