Mon Jul 6 13:10:19 2020 UTC ()
Set cpu_psluserset, cpu_pslusermod, cpu_pslusermask for MODULAR.


(rin)
diff -r1.31 -r1.32 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c

cvs diff -r1.31 -r1.32 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c (expand / switch to unified diff)

--- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c 2020/07/06 10:34:23 1.31
+++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c 2020/07/06 13:10:19 1.32
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ibm4xx_machdep.c,v 1.31 2020/07/06 10:34:23 rin Exp $ */ 1/* $NetBSD: ibm4xx_machdep.c,v 1.32 2020/07/06 13:10:19 rin Exp $ */
2/* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */ 2/* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
3 3
4/* 4/*
5 * Copyright 2001, 2002 Wasabi Systems, Inc. 5 * Copyright 2001, 2002 Wasabi Systems, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc. 8 * Written by Eduardo Horvath and Simon Burge for Wasabi Systems, Inc.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -58,27 +58,27 @@ @@ -58,27 +58,27 @@
58 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 58 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
59 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 59 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
60 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 60 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 61 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
62 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 62 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
63 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 63 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
64 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 64 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
65 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 65 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
66 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 66 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
67 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 67 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68 */ 68 */
69 69
70#include <sys/cdefs.h> 70#include <sys/cdefs.h>
71__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.31 2020/07/06 10:34:23 rin Exp $"); 71__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.32 2020/07/06 13:10:19 rin Exp $");
72 72
73#include "ksyms.h" 73#include "ksyms.h"
74 74
75#ifdef _KERNEL_OPT 75#ifdef _KERNEL_OPT
76#include "opt_ddb.h" 76#include "opt_ddb.h"
77#include "opt_kgdb.h" 77#include "opt_kgdb.h"
78#include "opt_modular.h" 78#include "opt_modular.h"
79#endif 79#endif
80 80
81#include <sys/param.h> 81#include <sys/param.h>
82#include <sys/msgbuf.h> 82#include <sys/msgbuf.h>
83#include <sys/proc.h> 83#include <sys/proc.h>
84#include <sys/cpu.h> 84#include <sys/cpu.h>
@@ -105,26 +105,32 @@ __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machd @@ -105,26 +105,32 @@ __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machd
105#include <powerpc/ibm4xx/cpu.h> 105#include <powerpc/ibm4xx/cpu.h>
106 106
107/* 107/*
108 * Global variables used here and there 108 * Global variables used here and there
109 */ 109 */
110paddr_t msgbuf_paddr; 110paddr_t msgbuf_paddr;
111vaddr_t msgbuf_vaddr; 111vaddr_t msgbuf_vaddr;
112char msgbuf[MSGBUFSIZE]; 112char msgbuf[MSGBUFSIZE];
113 113
114#if NKSYMS || defined(DDB) || defined(MODULAR) 114#if NKSYMS || defined(DDB) || defined(MODULAR)
115void *startsym, *endsym; 115void *startsym, *endsym;
116#endif 116#endif
117 117
 118#ifdef MODULAR
 119register_t cpu_psluserset = PSL_USERSET;
 120register_t cpu_pslusermod = PSL_USERMOD;
 121register_t cpu_pslusermask = PSL_USERMASK;
 122#endif
 123
118/* 124/*
119 * Trap vectors 125 * Trap vectors
120 */ 126 */
121extern const uint32_t defaulttrap[], defaultsize; 127extern const uint32_t defaulttrap[], defaultsize;
122extern const uint32_t sctrap[], scsize; 128extern const uint32_t sctrap[], scsize;
123extern const uint32_t accesstrap[], accesssize; 129extern const uint32_t accesstrap[], accesssize;
124extern const uint32_t criticaltrap[], criticalsize; 130extern const uint32_t criticaltrap[], criticalsize;
125extern const uint32_t tlbimiss4xx[], tlbim4size; 131extern const uint32_t tlbimiss4xx[], tlbim4size;
126extern const uint32_t tlbdmiss4xx[], tlbdm4size; 132extern const uint32_t tlbdmiss4xx[], tlbdm4size;
127extern const uint32_t pitfitwdog[], pitfitwdogsize; 133extern const uint32_t pitfitwdog[], pitfitwdogsize;
128extern const uint32_t errata51handler[], errata51size; 134extern const uint32_t errata51handler[], errata51size;
129#if defined(DDB) 135#if defined(DDB)
130extern const uint32_t ddblow[], ddbsize; 136extern const uint32_t ddblow[], ddbsize;