Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/pmax/pmax - Correct uninitialized pointer issue I m...
details: https://anonhg.NetBSD.org/src/rev/1c7b562714eb
branches: trunk
changeset: 473322:1c7b562714eb
user: nisimura <nisimura%NetBSD.org@localhost>
date: Sat May 29 09:31:02 1999 +0000
description:
- Correct uninitialized pointer issue I made.
- Put a comment why the original prodtype detection logic made no trouble.
diffstat:
sys/arch/pmax/pmax/dec_3maxplus.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r 96add8b96ace -r 1c7b562714eb sys/arch/pmax/pmax/dec_3maxplus.c
--- a/sys/arch/pmax/pmax/dec_3maxplus.c Sat May 29 07:12:11 1999 +0000
+++ b/sys/arch/pmax/pmax/dec_3maxplus.c Sat May 29 09:31:02 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3maxplus.c,v 1.21 1999/05/29 07:10:36 simonb Exp $ */
+/* $NetBSD: dec_3maxplus.c,v 1.22 1999/05/29 09:31:02 nisimura Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.21 1999/05/29 07:10:36 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.22 1999/05/29 09:31:02 nisimura Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -140,11 +140,10 @@
{
u_int32_t prodtype;
- /* Initialise ioasic_base early on so we can determine product type */
- ioasic_base = MIPS_PHYS_TO_KSEG1(KN03_SYS_ASIC);
-
- prodtype = *(u_int32_t *)(ioasic_base + IOASIC_INTR);
+ /* we can determine product type with INTR register. */
+ prodtype = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_REG_INTR);
prodtype &= KN03_INTR_PROD_JUMPER;
+ /* the bit persists even after INTR register is assigned with 0. */
platform.iobus = "tc3maxplus";
@@ -174,7 +173,7 @@
*(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0;
kn03_wbflush();
- /* XXX: ioasic_base initialised in dec_3maxplus_init() */
+ ioasic_base = MIPS_PHYS_TO_KSEG1(KN03_SYS_ASIC);
mips_hardware_intr = dec_3maxplus_intr;
tc_enable_interrupt = dec_3maxplus_enable_intr; /* XXX */
mcclock_addr = (void *)(ioasic_base + IOASIC_SLOT_8_START);
Home |
Main Index |
Thread Index |
Old Index