To determine CPU architecture and product, add cpu_arch and cpu_prduct variables.
these are initialized by sh_cpu_init()@sh3/sh3_machdep.c (see sh3/include/cputypes.h for detail.) add "options SH3" for SH3 kernel config file.
This commit is contained in:
parent
14bcf8c92a
commit
6e0794b560
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: COMPUTEXEVB,v 1.13 2002/01/27 13:23:15 jdolecek Exp $
|
||||
# $NetBSD: COMPUTEXEVB,v 1.14 2002/02/17 20:59:35 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -17,6 +17,7 @@ options MINIROOTSIZE=3074 # size of memory disk, in blocks
|
|||
maxusers 32 # estimated number of users
|
||||
|
||||
# CPU support. At least one is REQUIRED.
|
||||
options SH3
|
||||
options SH7709A,SH7709A_BROKEN_IPR # 100MHz
|
||||
options PCLOCK=25000000 # 25.000MHz
|
||||
options IOM_ROM_BEGIN=0x00000000
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: CQREEKSH3,v 1.14 2002/01/27 13:23:15 jdolecek Exp $
|
||||
# $NetBSD: CQREEKSH3,v 1.15 2002/02/17 20:59:35 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -19,6 +19,7 @@ options ROMIMAGE
|
|||
maxusers 32 # estimated number of users
|
||||
|
||||
# CPU support. At least one is REQUIRED.
|
||||
options SH3
|
||||
options SH7708 # 100MHz
|
||||
options PCLOCK=15000000 # 15.000MHz
|
||||
options IOM_ROM_BEGIN=0x00000000
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.18 2002/02/11 17:18:35 uch Exp $
|
||||
# $NetBSD: GENERIC,v 1.19 2002/02/17 20:59:35 uch Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
|
@ -30,12 +30,11 @@ options KLOADER_DEBUG
|
|||
#options HD64461VIDEO_DEBUG
|
||||
#options HD64461PCMCIA_DEBUG
|
||||
|
||||
options SH7709A # 133MHz
|
||||
options SH7709A_BROKEN_IPR
|
||||
options SH3
|
||||
|
||||
options DDB # in-kernel debugger
|
||||
#options DIAGNOSTIC # extra kernel debugging checks
|
||||
#options DEBUG # extra kernel debugging support
|
||||
options DIAGNOSTIC # extra kernel debugging checks
|
||||
options DEBUG # extra kernel debugging support
|
||||
options KTRACE # system call tracing support
|
||||
options MSGBUFSIZE=65534
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: HP620LX,v 1.7 2002/01/27 13:23:17 jdolecek Exp $
|
||||
# $NetBSD: HP620LX,v 1.8 2002/02/17 20:59:36 uch Exp $
|
||||
#
|
||||
# HP620LX
|
||||
#
|
||||
|
@ -7,8 +7,7 @@ include "arch/hpcsh/conf/std.hpcsh"
|
|||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
options SH7709A # 133MHz
|
||||
options SH7709A_BROKEN_IPR
|
||||
options SH3
|
||||
options PCLOCK=18432000 # 18MHz
|
||||
|
||||
options DDB # in-kernel debugger
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: HPW650PA,v 1.2 2002/02/13 16:25:35 uch Exp $
|
||||
# $NetBSD: HPW650PA,v 1.3 2002/02/17 20:59:36 uch Exp $
|
||||
#
|
||||
# HITACHI PERSONA HPW650PA
|
||||
#
|
||||
|
@ -10,8 +10,7 @@ maxusers 32 # estimated number of users
|
|||
options KLOADER_KERNEL_PATH="\"/netbsd\""
|
||||
options KLOADER_DEBUG
|
||||
|
||||
options SH7750
|
||||
options SH4
|
||||
options SH4
|
||||
|
||||
options INTERRUPT_MONITOR
|
||||
options HPC_DEBUG_LCD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: JORNADA690,v 1.14 2002/02/11 17:18:35 uch Exp $
|
||||
# $NetBSD: JORNADA690,v 1.15 2002/02/17 20:59:36 uch Exp $
|
||||
#
|
||||
# JORNADA690 uch's Jornada 690
|
||||
#
|
||||
|
@ -7,10 +7,7 @@ include "arch/hpcsh/conf/std.hpcsh"
|
|||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
options KLOADER_KERNEL_PATH="\"/netbsd\""
|
||||
|
||||
options SH7709A # 133MHz
|
||||
options SH7709A_BROKEN_IPR
|
||||
options SH3
|
||||
options PCLOCK=22000000 # 22MHz
|
||||
|
||||
options DDB # in-kernel debugger
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.32 2002/01/27 13:23:21 jdolecek Exp $
|
||||
# $NetBSD: GENERIC,v 1.33 2002/02/17 20:59:36 uch Exp $
|
||||
#
|
||||
# GENERIC machine description file
|
||||
#
|
||||
|
@ -20,11 +20,12 @@
|
|||
|
||||
include "arch/mmeye/conf/std.mmeye"
|
||||
|
||||
#ident "GENERIC-$Revision: 1.32 $"
|
||||
#ident "GENERIC-$Revision: 1.33 $"
|
||||
|
||||
maxusers 16 # estimated number of users
|
||||
|
||||
# CPU support
|
||||
options SH3
|
||||
options SH7708R # 100MHz
|
||||
options MMEYE
|
||||
options MMEYE_NEW_INT
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: MMEYE,v 1.9 2002/01/27 13:23:21 jdolecek Exp $
|
||||
# $NetBSD: MMEYE,v 1.10 2002/02/17 20:59:37 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -8,6 +8,7 @@ include "arch/mmeye/conf/std.mmeye"
|
|||
maxusers 16 # estimated number of users
|
||||
|
||||
# CPU support
|
||||
options SH3
|
||||
options SH7708R # 100MHz
|
||||
options MMEYE
|
||||
options MMEYE_NEW_INT
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: MMTA,v 1.11 2002/02/10 17:37:00 wiz Exp $
|
||||
# $NetBSD: MMTA,v 1.12 2002/02/17 20:59:37 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -14,6 +14,7 @@ include "arch/mmeye/conf/std.mmeye"
|
|||
maxusers 32 # estimated number of users
|
||||
|
||||
# Standard system options
|
||||
options SH3
|
||||
options SH7708R # 100MHz
|
||||
options PCLOCK=33330000 # 33.33MHz
|
||||
options INITTODR_ALWAYS_USE_RTC
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: MMTAICE,v 1.10 2002/02/10 17:37:00 wiz Exp $
|
||||
# $NetBSD: MMTAICE,v 1.11 2002/02/17 20:59:37 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -17,6 +17,7 @@ maxusers 32 # estimated number of users
|
|||
#options I386_CPU
|
||||
#options I486_CPU
|
||||
#options I586_CPU
|
||||
options SH3
|
||||
options SH7708 # 60MHz
|
||||
#options SH7708R # 100MHz
|
||||
#options I686_CPU
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: MMTANEW,v 1.10 2002/02/10 17:37:00 wiz Exp $
|
||||
# $NetBSD: MMTANEW,v 1.11 2002/02/17 20:59:37 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -14,6 +14,7 @@ include "arch/mmeye/conf/std.mmeye"
|
|||
maxusers 32 # estimated number of users
|
||||
|
||||
# Standard system options
|
||||
options SH3
|
||||
options SH7708R # 100MHz
|
||||
options PCLOCK=33330000 # 33.33MHz
|
||||
options MMEYE_NEW_INT
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: MMTAROMNEW,v 1.10 2002/02/10 17:37:01 wiz Exp $
|
||||
# $NetBSD: MMTAROMNEW,v 1.11 2002/02/17 20:59:37 uch Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -15,6 +15,7 @@ options ROMIMAGE
|
|||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
options SH3
|
||||
options PCLOCK=33330000 # 33.33MHz
|
||||
options MMEYE_NEW_INT
|
||||
#options MMEYE_NO_CACHE
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* $NetBSD: cputypes.h,v 1.1 1999/09/13 10:31:16 itojun Exp $ */
|
||||
/* $NetBSD: cputypes.h,v 1.2 2002/02/17 20:59:33 uch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Christopher G. Demetriou
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -12,49 +12,60 @@
|
|||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Classes of Processor. CPU identification code depends on
|
||||
* this starting at 0, and having an increment of one.
|
||||
*/
|
||||
#ifndef _SH3_CPUTYPES_H_
|
||||
#define _SH3_CPUTYPES_H_
|
||||
#ifdef _KERNEL
|
||||
|
||||
#define CPUCLASS_SH3 0
|
||||
#define CPU_ARCH_SH3 3
|
||||
#define CPU_ARCH_SH4 4
|
||||
|
||||
/*
|
||||
* Kinds of Processor. Only the first 1 are used, as they are processors
|
||||
* that might not have a cpuid instruction.
|
||||
*/
|
||||
#define CPU_PRODUCT_UNKNOWN 0
|
||||
/* SH3 series */
|
||||
#define CPU_PRODUCT_7708 1
|
||||
#define CPU_PRODUCT_7708S 2
|
||||
#define CPU_PRODUCT_7708R 3
|
||||
#define CPU_PRODUCT_7709 4
|
||||
#define CPU_PRODUCT_7709A 5
|
||||
/* SH4 series */
|
||||
#define CPU_PRODUCT_7750 6
|
||||
#define CPU_PRODUCT_7750S 7
|
||||
|
||||
#define CPU_SH3 0 /* Hitachi SH3 */
|
||||
|
||||
/*
|
||||
* CPU vendors
|
||||
*/
|
||||
|
||||
#define CPUVENDOR_UNKNOWN -1
|
||||
#define CPUVENDOR_HITACHI 0
|
||||
|
||||
/*
|
||||
* Some other defines, dealing with values returned by cpuid.
|
||||
*/
|
||||
|
||||
#if 0
|
||||
#define CPU_MAXMODEL 15 /* Models within family range 0-15 */
|
||||
#define CPU_DEFMODEL 16 /* Value for unknown model -> default */
|
||||
#define CPU_MINFAMILY 4 /* Lowest that cpuid can return (486) */
|
||||
#define CPU_MAXFAMILY 6 /* Highest we know (686) */
|
||||
#ifndef _LOCORE
|
||||
extern int cpu_arch;
|
||||
extern int cpu_product;
|
||||
#if defined(SH3) && defined(SH4)
|
||||
#define CPU_IS_SH3 (cpu_arch == CPU_ARCH_SH3)
|
||||
#define CPU_IS_SH4 (cpu_arch == CPU_ARCH_SH4)
|
||||
#elif defined(SH3)
|
||||
#define CPU_IS_SH3 1
|
||||
#define CPU_IS_SH4 0
|
||||
#elif defined(SH4)
|
||||
#define CPU_IS_SH3 0
|
||||
#define CPU_IS_SH4 1
|
||||
#else
|
||||
#error "define SH3 and/or SH4"
|
||||
#endif
|
||||
#endif /* !_LOCORE */
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_SH3_CPUTYPES_H_ */
|
||||
|
|
Loading…
Reference in New Issue