Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/prep Use PLATFORM_*
details: https://anonhg.NetBSD.org/src/rev/95df8b33c3b4
branches: trunk
changeset: 526329:95df8b33c3b4
user: nonaka <nonaka%NetBSD.org@localhost>
date: Thu May 02 14:58:36 2002 +0000
description:
Use PLATFORM_*
diffstat:
sys/arch/prep/conf/GENERIC | 9 +++++++--
sys/arch/prep/conf/INSTALL | 7 ++++++-
sys/arch/prep/conf/NATSUMI | 8 ++++++--
sys/arch/prep/conf/files.prep | 12 ++++++++----
sys/arch/prep/prep/ibm_machdep.c | 11 +++++++++--
sys/arch/prep/prep/mot_machdep.c | 11 ++++++++---
sys/arch/prep/prep/mot_ulmb60xa.c | 4 ++--
sys/arch/prep/prep/platform.c | 17 +++++++----------
8 files changed, 53 insertions(+), 26 deletions(-)
diffs (244 lines):
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/conf/GENERIC
--- a/sys/arch/prep/conf/GENERIC Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/conf/GENERIC Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.49 2002/05/02 14:36:42 nonaka Exp $
+# $NetBSD: GENERIC,v 1.50 2002/05/02 14:58:36 nonaka Exp $
#
# GENERIC machine description file
#
@@ -22,10 +22,15 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.49 $"
+#ident "GENERIC-$Revision: 1.50 $"
maxusers 32
+# Platform support
+options PLATFORM_IBM_6050 # IBM Personal Power Series 830
+options PLATFORM_IBM_7248 # IBM RS/6000 7248-100/120/133
+options PLATFORM_MOTOROLA_ULMB60XA # Motorola ULMB60xA (?)
+
# Standard system options
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/conf/INSTALL
--- a/sys/arch/prep/conf/INSTALL Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/conf/INSTALL Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.17 2002/04/25 15:06:36 atatat Exp $
+# $NetBSD: INSTALL,v 1.18 2002/05/02 14:58:36 nonaka Exp $
#
# INSTALL -- Installation kernel
#
@@ -16,6 +16,11 @@
maxusers 8
+# Platform support
+options PLATFORM_IBM_6050 # IBM Personal Power Series 830
+options PLATFORM_IBM_7248 # IBM RS/6000 7248-100/120/133
+options PLATFORM_MOTOROLA_ULMB60XA # Motorola ULMB60xA (?)
+
# Compatibility options
#options COMPAT_13 # NetBSD 1.3,
options COMPAT_14 # NetBSD 1.4,
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/conf/NATSUMI
--- a/sys/arch/prep/conf/NATSUMI Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/conf/NATSUMI Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NATSUMI,v 1.17 2002/04/25 15:06:36 atatat Exp $
+# $NetBSD: NATSUMI,v 1.18 2002/05/02 14:58:36 nonaka Exp $
#
# for development
#
@@ -7,9 +7,13 @@
#options INCLUDE_CONFIG_FILE # embed config file in kernel binary
+makeoptions COPTS="-O2 -pipe"
+
maxusers 32
-makeoptions COPTS="-O2 -pipe"
+# Platform support
+options PLATFORM_IBM_6050 # IBM Personal Power Series 830
+options PLATFORM_IBM_7248 # IBM RS/6000 7248-100/120/133
# Standard system options
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/conf/files.prep
--- a/sys/arch/prep/conf/files.prep Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/conf/files.prep Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.prep,v 1.32 2002/05/02 14:44:17 nonaka Exp $
+# $NetBSD: files.prep,v 1.33 2002/05/02 14:58:36 nonaka Exp $
#
# prep-specific configuration info
#
@@ -8,14 +8,18 @@
defflag opt_residual.h RESIDUAL_DATA_DUMP
+defflag opt_platform.h PLATFORM_IBM_6050
+ PLATFORM_IBM_7248
+ PLATFORM_MOTOROLA_ULMB60XA
+
# IBM
file arch/prep/prep/ibm_machdep.c
-file arch/prep/prep/ibm_6050.c
-file arch/prep/prep/ibm_7248.c
+file arch/prep/prep/ibm_6050.c platform_ibm_6050
+file arch/prep/prep/ibm_7248.c platform_ibm_7248
# Motorola
file arch/prep/prep/mot_machdep.c
-file arch/prep/prep/mot_ulmb60xa.c
+file arch/prep/prep/mot_ulmb60xa.c platform_motorola_ulmb60xa
file arch/prep/prep/platform.c
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/prep/ibm_machdep.c
--- a/sys/arch/prep/prep/ibm_machdep.c Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/prep/ibm_machdep.c Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ibm_machdep.c,v 1.4 2002/05/02 14:48:27 nonaka Exp $ */
+/* $NetBSD: ibm_machdep.c,v 1.5 2002/05/02 14:58:37 nonaka Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -36,6 +36,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "opt_platform.h"
+
#include <sys/param.h>
#include <sys/systm.h>
@@ -43,12 +45,17 @@
#include <machine/platform.h>
static struct platform *platform_ibm[] = {
+#if defined(PLATFORM_IBM_6050)
&platform_ibm_6050,
+#endif
+#if defined(PLATFORM_IBM_7248)
&platform_ibm_7248,
+#endif
+ NULL
};
struct plattab plattab_ibm = {
- platform_ibm, sizeof(platform_ibm)/sizeof(platform_ibm[0])
+ platform_ibm, sizeof(platform_ibm)/sizeof(platform_ibm[0]) - 1
};
void
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/prep/mot_machdep.c
--- a/sys/arch/prep/prep/mot_machdep.c Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/prep/mot_machdep.c Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mot_machdep.c,v 1.1 2002/02/26 16:09:15 kleink Exp $ */
+/* $NetBSD: mot_machdep.c,v 1.2 2002/05/02 14:58:37 nonaka Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -36,15 +36,20 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "opt_platform.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <machine/platform.h>
static struct platform *platform_mot[] = {
- &platform_mot_ulmb60xa
+#if defined(PLATFORM_MOTOROLA_ULMB60XA)
+ &platform_mot_ulmb60xa,
+#endif
+ NULL
};
struct plattab plattab_mot = {
- platform_mot, sizeof(platform_mot)/sizeof(platform_mot[0])
+ platform_mot, sizeof(platform_mot)/sizeof(platform_mot[0]) - 1
};
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/prep/mot_ulmb60xa.c
--- a/sys/arch/prep/prep/mot_ulmb60xa.c Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/prep/mot_ulmb60xa.c Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mot_ulmb60xa.c,v 1.2 2002/05/02 14:48:27 nonaka Exp $ */
+/* $NetBSD: mot_ulmb60xa.c,v 1.3 2002/05/02 14:58:37 nonaka Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -87,7 +87,7 @@
{
uint8_t cputype;
- if (p->model == NULL)
+ if (p == NULL || p->model == NULL)
return 0;
if (strcmp(res->VitalProductData.PrintableModel, p->model) != 0)
return 0;
diff -r c66c29cf0ab0 -r 95df8b33c3b4 sys/arch/prep/prep/platform.c
--- a/sys/arch/prep/prep/platform.c Thu May 02 14:48:27 2002 +0000
+++ b/sys/arch/prep/prep/platform.c Thu May 02 14:58:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: platform.c,v 1.5 2002/05/02 14:48:27 nonaka Exp $ */
+/* $NetBSD: platform.c,v 1.6 2002/05/02 14:58:37 nonaka Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
#include <machine/residual.h>
static struct platform platform_unknown = {
- NULL, /* model */
+ "", /* model */
platform_generic_match, /* match */
prep_pci_get_chipset_tag_indirect, /* pci_setup */
pci_intr_nofixup, /* pci_intr_fixup */
@@ -64,7 +64,7 @@
int
ident_platform(void)
{
- struct plattab *p;
+ struct plattab *p = &plattab_unknown;
int matched = -1, match = 0;
int i, rv;
@@ -80,8 +80,6 @@
else if (strncmp(res->VitalProductData.PrintableModel,
"BULL ESTRELLA (e0) (e0)", 31) == 0) /* XXX */
p = &plattab_mot;
- else
- p = &plattab_unknown;
for (i = 0; i < p->num; i++) {
rv = (*p->platform[i]->match)(p->platform[i]);
@@ -99,14 +97,13 @@
platform_generic_match(struct platform *p)
{
- if (p->model == NULL)
+ if (p == NULL || p->model == NULL)
return 0;
- if (strcmp(res->VitalProductData.PrintableModel, p->model) == 0)
- return 1;
- return 0;
+ if (strcmp(res->VitalProductData.PrintableModel, p->model) != 0)
+ return 0;
+ return 1;
}
-
/* ARGUSED */
void
pci_intr_nofixup(int busno, int device, int *intr)
Home |
Main Index |
Thread Index |
Old Index