Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm More fixes as a step towards ARM_MMU_EXTENDED o...
details: https://anonhg.NetBSD.org/src/rev/38167c0f0b4e
branches: trunk
changeset: 331034:38167c0f0b4e
user: skrll <skrll%NetBSD.org@localhost>
date: Sun Jul 27 21:31:34 2014 +0000
description:
More fixes as a step towards ARM_MMU_EXTENDED on RPI.
- don't set CPU_CONTROL_SYST_ENABLE in arm11x6_setup for ARM_MMU_EXTENDED
- Use the new MMU defines for V6N
- pull in arm/cpuconf.h in vmparam s that VM_MAXUSER_ADDRESS gets set
correctly.
diffstat:
sys/arch/arm/arm/cpufunc.c | 7 ++++---
sys/arch/arm/include/arm32/pmap.h | 12 +++++++++---
sys/arch/arm/include/arm32/vmparam.h | 3 ++-
3 files changed, 15 insertions(+), 7 deletions(-)
diffs (96 lines):
diff -r 55e1d2c4c05a -r 38167c0f0b4e sys/arch/arm/arm/cpufunc.c
--- a/sys/arch/arm/arm/cpufunc.c Sun Jul 27 17:46:43 2014 +0000
+++ b/sys/arch/arm/arm/cpufunc.c Sun Jul 27 21:31:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufunc.c,v 1.147 2014/04/18 23:50:59 christos Exp $ */
+/* $NetBSD: cpufunc.c,v 1.148 2014/07/27 21:31:34 skrll Exp $ */
/*
* arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.147 2014/04/18 23:50:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.148 2014/07/27 21:31:34 skrll Exp $");
#include "opt_compat_netbsd.h"
#include "opt_cpuoptions.h"
@@ -3153,10 +3153,11 @@
CPU_CONTROL_32BP_ENABLE |
CPU_CONTROL_32BD_ENABLE |
CPU_CONTROL_LABT_ENABLE |
- CPU_CONTROL_SYST_ENABLE |
CPU_CONTROL_UNAL_ENABLE |
#ifdef ARM_MMU_EXTENDED
CPU_CONTROL_XP_ENABLE |
+#else
+ CPU_CONTROL_SYST_ENABLE |
#endif
CPU_CONTROL_IC_ENABLE;
diff -r 55e1d2c4c05a -r 38167c0f0b4e sys/arch/arm/include/arm32/pmap.h
--- a/sys/arch/arm/include/arm32/pmap.h Sun Jul 27 17:46:43 2014 +0000
+++ b/sys/arch/arm/include/arm32/pmap.h Sun Jul 27 21:31:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.133 2014/06/15 03:27:46 ozaki-r Exp $ */
+/* $NetBSD: pmap.h,v 1.134 2014/07/27 21:31:34 skrll Exp $ */
/*
* Copyright (c) 2002, 2003 Wasabi Systems, Inc.
@@ -739,6 +739,7 @@
#define L1_S_CACHE_MASK_generic (L1_S_B|L1_S_C)
#define L1_S_CACHE_MASK_xscale (L1_S_B|L1_S_C|L1_S_XS_TEX(TEX_XSCALE_X))
#define L1_S_CACHE_MASK_armv6 (L1_S_B|L1_S_C|L1_S_XS_TEX(TEX_ARMV6_TEX))
+#define L1_S_CACHE_MASK_armv6n (L1_S_B|L1_S_C|L1_S_XS_TEX(TEX_ARMV6_TEX)|L1_S_V6_S)
#define L1_S_CACHE_MASK_armv7 (L1_S_B|L1_S_C|L1_S_XS_TEX(TEX_ARMV6_TEX)|L1_S_V6_S)
#define L2_L_PROT_U_generic (L2_AP(AP_U))
@@ -764,6 +765,7 @@
#define L2_L_CACHE_MASK_generic (L2_B|L2_C)
#define L2_L_CACHE_MASK_xscale (L2_B|L2_C|L2_XS_L_TEX(TEX_XSCALE_X))
#define L2_L_CACHE_MASK_armv6 (L2_B|L2_C|L2_V6_L_TEX(TEX_ARMV6_TEX))
+#define L2_L_CACHE_MASK_armv6n (L2_B|L2_C|L2_V6_L_TEX(TEX_ARMV6_TEX)|L2_XS_S)
#define L2_L_CACHE_MASK_armv7 (L2_B|L2_C|L2_V6_L_TEX(TEX_ARMV6_TEX)|L2_XS_S)
#define L2_S_PROT_U_generic (L2_AP(AP_U))
@@ -822,7 +824,11 @@
#else
#define L2_S_PROTO_armv6c (L2_TYPE_S) /* XP=0, subpage APs */
#endif
+#ifdef ARM_MMU_EXTENDED
+#define L2_S_PROTO_armv6n (L2_TYPE_S|L2_XS_XN)
+#else
#define L2_S_PROTO_armv6n (L2_TYPE_S) /* with XP=1 */
+#endif
#ifdef ARM_MMU_EXTENDED
#define L2_S_PROTO_armv7 (L2_TYPE_S|L2_XS_XN)
#else
@@ -904,8 +910,8 @@
#define L2_L_PROT_RO L2_L_PROT_RO_armv6n
#define L2_L_PROT_MASK L2_L_PROT_MASK_armv6n
-#define L1_S_CACHE_MASK L1_S_CACHE_MASK_armv6
-#define L2_L_CACHE_MASK L2_L_CACHE_MASK_armv6
+#define L1_S_CACHE_MASK L1_S_CACHE_MASK_armv6n
+#define L2_L_CACHE_MASK L2_L_CACHE_MASK_armv6n
#define L2_S_CACHE_MASK L2_S_CACHE_MASK_armv6n
/* These prototypes make writeable mappings, while the other MMU types
diff -r 55e1d2c4c05a -r 38167c0f0b4e sys/arch/arm/include/arm32/vmparam.h
--- a/sys/arch/arm/include/arm32/vmparam.h Sun Jul 27 17:46:43 2014 +0000
+++ b/sys/arch/arm/include/arm32/vmparam.h Sun Jul 27 21:31:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.34 2014/03/31 01:48:37 matt Exp $ */
+/* $NetBSD: vmparam.h,v 1.35 2014/07/27 21:31:34 skrll Exp $ */
/*
* Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -44,6 +44,7 @@
* Virtual Memory parameters common to all arm32 platforms.
*/
+#include <arm/cpuconf.h>
#include <arm/arm32/pte.h> /* pt_entry_t */
#define USRSTACK VM_MAXUSER_ADDRESS
Home |
Main Index |
Thread Index |
Old Index