Port-alpha archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NetBSD/alpha on qemu-system-alpha
Recently I've been trying to get NetBSD/alpha running under qemu-system-alpha. So far I've fixed a few bugs in Qemu's Alpha emulation:
- The Typhoon / Clipper emulation was not creating a PCI device node for the PCI-ISA bridge, which prevented ISA devices from being probed. I corrected this by inserting a minimal i82378 SIO node into the Typhoon device tree, just enough to satisfy the kernel.
- The Typhoon / Clipper emulation was creating the PCI VGA device as a PCI IdSel not valid on a Clipper system. I corrected this by allowing the board-specific code to specify the minimum PCI devfn to the Typhoon module, which in turn passes this along when it creates the PCI bus node.
- Fixed 2 bugs in the mc146818 emulation that tripped up the "mcclock" driver: (a) the PF bit needs to be set in REG_C every time the periodic timer expires, regardless of the PIE bit in REG_B (i.e. even if it won't raise an IRQ), and (b) the periodic timer needs to be started as soon as the mc146818 is instantiated, because the default state of REG_A specifies a non-zero period.
...and there are several bugs in the Qemu-supplied PALcode that needed to be fixed:
- The HWRPB primary_cpu_id field was not being initialized properly. It was being set to the CPU type, not the CPU ID of the primary CPU.
- The HWRPB lacked a Console Terminal Block descriptor, so the kernel was not able to find it's console device. I added code to provide this, but have only tested it with an emulated serial console for now.
- There was a bug in the PCI bus configuration code that resulted in incorrect BAR configuration of the "cmdide" device.
- There was no PCI interrupt mapping support in the PCI bus configuration code; NetBSD/alpha relies on the firmware / PALcode to do this, rather than having a PCI interrupt mapping table for every possible system variant.
- Calling into the PALcode's ROM services isn't working, and results in a hard hang. I haven't debugged this yet, but have instead just worked around it for now by avoiding ROM calls if I detect Qemu.
Anyway, I still have a more work to do, but I thought it was worth a teaser:
netbsd-vm:thorpej 16$ qemu-system-alpha -nographic -kernel ./netbsd-alpha -bios ./palcode-clipper
PCI: 00:01:0 class 0300 id 1013:00b8
PCI: region 0 (BAR 10): 10000000
PCI: region 1 (BAR 14): 12000000
PCI: intr pin 0 -> irq 8
PCI: 00:02:0 class 0200 id 8086:100e
PCI: region 0 (BAR 10): 12020000
PCI: region 1 (BAR 14): 0000c000
PCI: intr pin 1 -> irq 12
PCI: 00:03:0 class 0101 id 1095:0646
PCI: region 0 (BAR 10): 0000c040
PCI: region 1 (BAR 14): 0000c048
PCI: region 2 (BAR 18): 0000c050
PCI: region 3 (BAR 1c): 0000c058
PCI: region 4 (BAR 20): 0000c060
PCI: intr pin 1 -> irq 16
PCI: 00:07:0 class 0601 id 8086:0484
PCI: intr pin 1 -> irq 255
[ 1.0000000] [ Kernel symbol table missing! ]
[ 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 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.47 (GENERIC-$Revision: 1.400 $) #33: Sun Feb 23 20:57:49 PST 2020
[ 1.0000000] thorpej@netbsd-vm:/home/thorpej/NetBSD/current/src/sys/arch/alpha/compile/GENERIC
[ 1.0000000] 6600 family, unknown model variation 0x1400, 250MHz, s/n QEMU
[ 1.0000000] 8192 byte page size, 1 processor.
[ 1.0000000] total memory = 128 MB
[ 1.0000000] (120 KB reserved for PROM, 127 MB used by NetBSD)
[ 1.0000000] avail memory = 114 MB
[ 1.0000000] running cgd selftest aes-xts-256 aes-xts-512 done
[ 1.0000000] mainbus0 (root)
[ 1.0000000] cpu0 at mainbus0: ID 0 (primary), 21264A-0
[ 1.0000000] cpu0: Architecture extensions: 0x1307<PAT,MVI,CIX,FIX,BWX>
[ 1.0000000] tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
[ 1.0000000] tsc0: 2 Dchips, 1 memory bus of 16 bytes
[ 1.0000000] tsc0: arrays present: 0MB, 0MB, 0MB, 0MB, Dchip 0 rev 0
[ 1.0000000] tsp0 at tsc0
[ 1.0000000] tsp0: window 0: 0/base 0/mask 0 reinitialized
[ 1.0000000] tsp0: window 1: 0/base 0/mask 0 reinitialized
[ 1.0000000] pci0 at tsp0 bus 0
[ 1.0000000] vga0 at pci0 dev 1 function 0: vendor 1013 product 00b8 (rev. 0x00)
[ 1.0000000] wsdisplay1 at vga0 kbdmux 1
[ 1.0000000] drm at vga0 not configured
[ 1.0000000] wm0 at pci0 dev 2 function 0: Intel i82540EM 1000BASE-T Ethernet (rev. 0x03)
[ 1.0000000] wm0: interrupting at dec 6600 irq 12
[ 1.0000000] wm0: Ethernet address 52:54:00:12:34:56
[ 1.0000000] makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 0
[ 1.0000000] makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
[ 1.0000000] cmdide0 at pci0 dev 3 function 0: CMD Technology PCI0646 (rev. 0x07)
[ 1.0000000] cmdide0: primary channel configured to native-PCI mode, channel non-independant
[ 1.0000000] cmdide0: using dec 6600 irq 16 for native-PCI interrupt
[ 1.0000000] atabus0 at cmdide0 channel 0
[ 1.0000000] cmdide0: secondary channel configured to native-PCI mode, channel non-independant
[ 1.0000000] cmdide0: secondary channel ignored (disabled)
[ 1.0000000] sio0 at pci0 dev 7 function 0: vendor 8086 product 0484 (rev. 0x03)
[ 1.0000000] isa0 at sio0
[ 1.0000000] com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
[ 1.0000000] com0: console
[ 1.0000000] com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
[ 1.0000000] pckbc0 at isa0 port 0x60-0x64
[ 1.0000000] pckbd0 at pckbc0 (kbd slot)
[ 1.0000000] pckbc0: using irq 1 for kbd slot
[ 1.0000000] wskbd0 at pckbd0 mux 1
[ 1.0000000] pms0 at pckbc0 (aux slot)
[ 1.0000000] pckbc0: using irq 12 for aux slot
[ 1.0000000] wsmouse0 at pms0 mux 0
[ 1.0000000] attimer0 at isa0 port 0x40-0x43
[ 1.0000000] fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
[ 1.0000000] mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
[ 1.0000000] tsciic0 at tsc0
[ 1.0000000] iic0 at tsciic0: I2C bus
[ 1.0000000] stray isa irq 1
[ 6.7535778] fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
[ 12.5334668] fd1 at fdc0 drive 1: 1.44MB, 80 cyl, 2 head, 18 sec
[ 12.5334668] WARNING: can't figure what device matches ""
[ 12.5334668] root device:
-- thorpej
Home |
Main Index |
Thread Index |
Old Index