Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300 With a quick test, HP9000/362 doesn't seem to...
details: https://anonhg.NetBSD.org/src/rev/35770be72879
branches: trunk
changeset: 760110:35770be72879
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon Dec 27 15:23:36 2010 +0000
description:
With a quick test, HP9000/362 doesn't seem to have frodo utility chip,
so probe code to identify HP362 taken from OpenBSD has never worked.
Identify HP362 by probing device IDs of the on-board framebuffer instead.
---
>> NetBSD/hp300 Primary Boot, Revision 1.16 (from NetBSD 5.99.41)
>> HP 9000/362 SPU
>> Enter "reset" to reset system.
Boot: [[[sd0a:]netbsd][-a][-c][-d][-s][-v][-q]] :-
2836828+148212 [343504+216292]=0x361b24
Start @ 0xff003400 [1=0xff2dac50-0x361b24]...
Entry point: 0xff003400
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 5.99.41 (GENERIC) #135: Mon Dec 27 23:30:21 JST 2010
tsutsui@mirage:/usr/src/sys/arch/hp300/compile/GENERIC
HP 9000/362 (25MHz MC68030 CPU+MMU, 25MHz MC68882 FPU)
total memory = 16372 KB
avail memory = 11480 KB
:
diffstat:
sys/arch/hp300/hp300/genassym.cf | 11 ++++++++---
sys/arch/hp300/hp300/locore.s | 18 ++++++++++++------
sys/arch/hp300/stand/common/srt0.S | 13 ++++++++++---
3 files changed, 30 insertions(+), 12 deletions(-)
diffs (97 lines):
diff -r 413c9c843e92 -r 35770be72879 sys/arch/hp300/hp300/genassym.cf
--- a/sys/arch/hp300/hp300/genassym.cf Mon Dec 27 15:10:33 2010 +0000
+++ b/sys/arch/hp300/hp300/genassym.cf Mon Dec 27 15:23:36 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.42 2010/12/20 00:25:33 matt Exp $
+# $NetBSD: genassym.cf,v 1.43 2010/12/27 15:23:36 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -58,6 +58,8 @@
include <machine/pte.h>
include <hp300/dev/intioreg.h>
+include <hp300/dev/dioreg.h>
+include <hp300/dev/diodevs.h>
include <hp300/hp300/clockreg.h>
# values for mmutype
@@ -257,8 +259,11 @@
define CLKMSB1 CLKMSB1
define CLKMSB3 CLKMSB3
-# frodo utility chip address (to identify HP362)
-define FRODO_BASE FRODO_BASE
+# DIO macro (to identify HP362)
+define DIOII_BASE DIOII_BASE
+define DIO_IDOFF DIO_IDOFF
+define DIO_SECIDOFF DIO_SECIDOFF
+define DIO_DEVICE_ID_FRAMEBUFFER DIO_DEVICE_ID_FRAMEBUFFER
# SVR4 binary compatibility
ifdef COMPAT_SVR4
diff -r 413c9c843e92 -r 35770be72879 sys/arch/hp300/hp300/locore.s
--- a/sys/arch/hp300/hp300/locore.s Mon Dec 27 15:10:33 2010 +0000
+++ b/sys/arch/hp300/hp300/locore.s Mon Dec 27 15:23:36 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.155 2010/12/20 00:25:33 matt Exp $ */
+/* $NetBSD: locore.s,v 1.156 2010/12/27 15:23:36 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -251,14 +251,20 @@
Lisa36x:
/*
* If we found a 360, we need to check for a 362 (neither the 360
- * nor the 362 have a nonzero mmuid). Since the 362 has a frodo
- * utility chip in the DIO hole, check for it.
+ * nor the 362 have a nonzero mmuid). Identify 362 by checking
+ * on-board VRX framebuffer which has secid 0x11 at dio scode 132.
*/
- movl #(INTIOBASE + FRODO_BASE),%a0
+ movl #DIOII_BASE,%a0 | probe dio scode 132
ASRELOC(phys_badaddr,%a3)
jbsr %a3@
- tstl %d0 | found a frodo?
- jne Lstart1 | no, really a 360
+ tstl %d0 | device at scode 132?
+ jne Lstart1 | no, not 362, assume 360
+ movb %a0@(DIO_IDOFF),%d0
+ cmpb #DIO_DEVICE_ID_FRAMEBUFFER,%d0 | framebuffer?
+ jne Lstart1 | no, not 362, assume 360
+ movb %a0@(DIO_SECIDOFF),%d0
+ cmpb #0x11,%d0 | VRX sti on 362?
+ jne Lstart1 | no, not 362, assume 360
RELOC(machineid,%a0)
movl #HP_362,%a0@
jra Lstart1
diff -r 413c9c843e92 -r 35770be72879 sys/arch/hp300/stand/common/srt0.S
--- a/sys/arch/hp300/stand/common/srt0.S Mon Dec 27 15:10:33 2010 +0000
+++ b/sys/arch/hp300/stand/common/srt0.S Mon Dec 27 15:23:36 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: srt0.S,v 1.15 2006/07/20 13:21:38 tsutsui Exp $ */
+/* $NetBSD: srt0.S,v 1.16 2010/12/27 15:23:37 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@@ -183,11 +183,18 @@
movl #HP_400,%a0@ /* must be a 400 */
jra ihpibcheck
isa36x:
- movl #0x41c000,%sp@- /* check (INTIOBASE + FRODO_BASE) */
+ movl #0x01000000,%sp@- /* check DIOII_BASE (scode 132) */
jbsr _C_LABEL(badaddr)
addql #4,%sp
tstl %d0
- jne ihpibcheck
+ jne ihpibcheck /* no device, assume 360 */
+ movl #0x01000000,%a0
+ movb %a0@(0x01),%d0 /* check device ID at DIO_IDOFF */
+ cmpb #0x39,%d0 /* framebuffer? */
+ jne ihpibcheck /* no, assume 360 */
+ movb %a0@(0x15),%d0 /* check sec ID at DIO_SECIDOFF */
+ cmpb #0x11,%d0 /* VRX sti on 362? */
+ jne ihpibcheck /* no, assume 360 */
lea _C_LABEL(machineid),%a0
movl #HP_362,%a0@
jra ihpibcheck
Home |
Main Index |
Thread Index |
Old Index