Re: Yes, NetBSD still boots on pretty ancient Alphas...

Istvan Gyenes <[email protected]> Sun, 25 Jul 2021 20:25:49 +0200
Newsgroups gmane.os.netbsd.ports.alpha
Message-ID <CADxH_9_JvUXW25mWyL6WEBe_GHDOSLLKKJPe9Y6+_VyJxq7skA@mail.gmail.com>
Hello Jason,

Nice catch :) and thanks for the good explanation!
So I have built the current sources and...

DEC 2000 Model 300 AXP - ROM Version 2.2
Copyright (c) 1993 Digital Equipment Corporation.

Alpha AXP SRM Firmware Version - 370
VMS PAL X5.48/OSF PAL X1.35 - Built on 12-FEB-1996 13:08:14.13

Eisa Info       Devnam      Devstat
---------       ------      -------
               CPU         OK EV4 P3.0 6.6ns
               MEM         OK 64MB
               NVR         OK
               SCC         OK
               IT          OK
               KBD         OK
               LPT         OK
1 CPQ3111       VGA         OK
2
3 ADP0001       SCSI        OK
4 DEC4220       NI          OK 08-00-2B-3D-48-F1
5
6 ADP0002       SCSI        OK

>>> sho dev

 BOOTDEV      ADDR      DEVTYPE    RM/FX    DEVNAM      REV     NUMBYTES
 -------      ----      -------    -----    ------      ---     --------
 ERA0         08-00-2B-3D-48-F1
 DVA0         PC Floppy DISK       RM
 SCSI Devices..
 HOST         A/7/0     PROC                AHA1740A    G.2
 DKB0         B/0/0     DISK       FX       RZ28        D41C      2.10GB
 DKB100       B/1/0     DISK       FX       RZ28        441C      2.10GB
 DKB200       B/2/0     DISK       FX       RZ28M       0568      2.10GB
 DKB400       B/4/0     RODISK     RM       RRD46       1337    ......
 HOST         B/7/0     PROC                AHA1742A    G.2

>>> b dkb400
INIT-S-CPU...
AUDIT_BOOT_STARTS ...
AUDIT_CHECKSUM_GOOD
AUDIT_LOAD_BEGINS
AUDIT_LOAD_DONE


NetBSD/alpha 9.99.87 ustar Bootstrap, Revision 1.3 (Sun Jul 25 17:15:20 UTC
2021)

VMS PAL rev: 0x100010530
OSF PAL rev: 0x20123
Switch to OSF PAL code succeeded.

Boot flags: 0,0
11176544+185088=0xad5da0

Entering netbsd at 0xfffffc0000a01410...
[   1.0000000] Unrecognized boot flag '0'.
[   1.0000000] Unrecognized boot flag ','.
[   1.0000000] Unrecognized boot flag '0'.
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002,
2003, 2004, 2005,
[   1.0000000]     2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016, 2017,
[   1.0000000]     2018, 2019, 2020, 2021 The NetBSD Foundation, Inc.  All
rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights
reserved.

[   1.0000000] NetBSD 9.99.87 (INSTALL) #1: Sun Jul 25 19:26:16 CEST 2021
[   1.0000000]
igyenes@thinkpad:/mnt/netbsd/alphaobj/sys/arch/alpha/compile/INSTALL

[   1.0000000] DEC2000 model 300, 150MHz, s/n
[   1.0000000] 8192 byte page size, 1 processor.
[   1.0000000] total memory = 65536 KB
[   1.0000000] (2048 KB reserved for PROM, 63488 KB used by NetBSD)
[   1.0000000] avail memory = 51288 KB
[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0: ID 0 (primary), 21064-0 (EV4)
[   1.0000000] jensenio0 at mainbus0
[   1.0000000] pckbc0 at jensenio0 port 0x60
[   1.0000000] com0 at jensenio0 port 0x3f8: ns8250 or ns16450, no fifo
[   1.0000000] com0: console
[   1.0000000] com0: interrupting at vector 0x900
[   1.0000000] com1 at jensenio0 port 0x2f8: ns8250 or ns16450, no fifo
[   1.0000000] com1: interrupting at vector 0x920
[   1.0000000] lpt0 at jensenio0 port 0x3bc
[   1.0000000] lpt0: interrupting at eisa irq 1
[   1.0000000] mcclock0 at jensenio0 port 0x170: mc146818 compatible
time-of-day clock
[   1.0000000] eisa0 at jensenio0
[   1.0000000] device CPQ3111 at eisa0 slot 1 not configured
[   1.0000000] ahb0 at eisa0 slot 3: Adaptec AHA-1740A SCSI
[   1.0000000] ahb0: interrupting at eisa irq 12 (edge trigger)
[   1.0000000] scsibus0 at ahb0: 8 targets, 8 luns per target
[   1.0000000] depca2 at eisa0 slot 4: DEC DE422 Ethernet
[   1.0000000] depca2: shared memory at 0xd0000-0xdffff
[   1.0000000] le0 at depca2
[   1.0000000] le0: failed to clear memory at 0 (0xff != 0xaa)
[   1.0000000] ahb1 at eisa0 slot 6: Adaptec AHA-1742A SCSI
[   1.0000000] ahb1: interrupting at eisa irq 14 (edge trigger)
[   1.0000000] scsibus1 at ahb1: 8 targets, 8 luns per target
[   1.0000000] isa0 at jensenio0
[   1.0000000] vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
[   1.0000000] wsdisplay0 at vga0 (kbdmux ignored)
[   1.0000000] fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
[   1.0000000] entropy: WARNING: extracting entropy too early
[   1.0053666] scsibus0: waiting 2 seconds for devices to settle...
[   1.0763652] scsibus1: waiting 2 seconds for devices to settle...
[   3.3998922] fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
[   4.9155283] sd0 at scsibus1 target 0 lun 0: <DEC, RZ28     (C) DEC,
D41C> disk fixed
[   5.0112145] sd0: 2007 MB, 3045 cyl, 16 head, 84 sec, 512 bytes/sect x
4110480 sectors
[   5.1176768] sd1 at scsibus1 target 1 lun 0: <DEC, RZ28     (C) DEC,
441C> disk fixed
[   5.2133648] sd1: 2007 MB, 3045 cyl, 16 head, 84 sec, 512 bytes/sect x
4110480 sectors
[   5.3178716] sd2 at scsibus1 target 2 lun 0: <DEC, RZ28M    (C) DEC,
0568> disk fixed
[   5.4194330] sd2: 2007 MB, 3045 cyl, 16 head, 84 sec, 512 bytes/sect x
4110480 sectors
[   5.7719750] cd0 at scsibus1 target 4 lun 0: <DEC, RRD46   (C) DEC, 1337>
cdrom removable
[   6.4770424] WARNING: 2 errors while detecting hardware; check system
log.
[   6.7016639] root on md0a dumps on md0b
[   6.7465883] root file system type: ffs
[   6.7905274] kern.module.path=/stand/alpha/9.99.87/modules
[   6.8549961] WARNING: preposterous TOD clock time
[   6.9101580] WARNING: using filesystem time
[   6.9591224] WARNING: CHECK AND RESET THE DATE!
Terminal type? [vt100]

Have to tried to istall but will do hopefully tomorrow!

Thanks again,

--
istvan

On Sat, Jul 24, 2021 at 5:23 PM Jason Thorpe <[email protected]> wrote:

>
> > On Jul 24, 2021, at 7:51 AM, Jason Thorpe <[email protected]> wrote:
> >
> > Anyway, I’m almost convinced it’s something to do with how we’re
> configuring the SCSI controller.  I’m doing a little more investigation
> today and hopefully will have something to try out in a little while.
>
> Ok, let me explain what I mean here.
>
> There are two types interrupt triggers on EISA… edge trigger and level
> trigger.
>
> With edge trigger, the PIC detects the interrupt on the RISING EDGE (i.e.
> transition from low-to-high) of the interrupt line.
>
> With level trigger, the PIC detects the interrupt so long as the interrupt
> line is driven low (i.e. the line has a pull-up resistor enabled in this
> mode, and the interrupt lines on the devices are open-drain).
>
> Our “ahb” driver is always registering the interrupt handler as level
> triggered.
>
> The 1740 controller has a configuration register for its interrupts,
> INTDEF, where we can read the IRQ that it’s configured to use (we could
> also read this from the ECU data on Alpha, and I would like to enhance the
> driver to do that, but that can wait for another day).  One of the bits in
> that register is called INTHIGH.  There is a comment in the ahbreg.h file:
>
> #define INTHIGH 0x08            /* int high=ACTIVE (else edge) */
>
> I believe this comment is **incorrect**.  Well, *partially* incorrect.  I
> do believe it means “IRQ signal is active-high”, but as I have explained
> above, active-high (well, transition from low-to-high) is how edge
> triggered interrupts work, so “else edge” doesn’t make sense… what that
> really should say is “else level”.  I double-checked what Linux does with
> this bit, and while they don’t define a name for it, their driver treats
> this bit as "edge trigger".
>
> So, what I think is that the firmware has configured the SCSI controller
> for an active-high (i.e. “edge triggered”) interrupt, which tells the
> microcontroller on the card to hold the interrupt line low.  But we’re
> registering the handler as “level triggered”, and thus causing the PIC to
> be programmed to signal an interrupt so long as that line is low.
>
> Remember how there was previously evidence of an interrupt storm?  :-)
>
> -- thorpej
>
>