Subject: "-mcpu=21264a" for kernel compile?
To: None <port-alpha@NetBSD.org>
From: Hiroshi Hakoyama <hhako@seagreen.ocn.ne.jp>
List: port-alpha
Date: 12/12/2004 17:46:55
Hi all,

Can I use the flag "-mcpu=21264a" safely for kernel compile?  
/usr/pkg/bin/cpuflags provides this flag for my box, UP1000. I am not  
sure, but a kernel compiled without "-mcpu=21264a" seems to be more  
stable on the box.

When I tried to compile a GENERIC kernel (# ./build.sh tools  
kernel=GENERIC), a kernel of NetBSD 2.0 compiled with "-mcpu=21264a" on  
UP1000  showed following kernel panic. This kernel panic may be related  
to send-pr #27139 (I also used "-mcpu=21264a" for kernel compile).

The kernel is GENERIC-based one forced to use PIO-mode; I modified a  
line in the config file(/usr/src/sys/arch/alpha/conf/GENERIC_PIO):

aceride* at pci? dev ? function ? flags 0x0002  # Acer Lab IDE  
controllers

I used PIO-mode to get a core, because UDMA-mode is unstable for UP1000  
and fails syncing the disk.


Best Regards,

Hiroshi Hakoyama

*******************

# less /var/log/messages
....
CPU 0: fatal kernel trap:

CPU 0    trap entry = 0x2 (memory management fault)
CPU 0    a0         = 0xdeadbef7
CPU 0    a1         = 0x1
CPU 0    a2         = 0x1
CPU 0    pc         = 0xfffffc000052df60
CPU 0    ra         = 0xfffffc000052df48
CPU 0    pv         = 0xfffffc0000538dc0
CPU 0    curlwp    = 0xfffffc0001ab9950
CPU 0        pid = 18397, comm = sh

panic: trap
Begin traceback...
alpha trace requires known PC =eject=
End traceback...
syncing disks...
CPU 0: fatal kernel trap:

CPU 0    trap entry = 0x2 (memory management fault)
CPU 0    a0         = 0xdeadbf87
CPU 0    a1         = 0x1
CPU 0    a2         = 0x0
CPU 0    pc         = 0xfffffc000054adb0
CPU 0    ra         = 0xfffffc000054b054
CPU 0    pv         = 0xfffffc000054c6c0
CPU 0    curlwp    = 0xfffffc0001ab8780
CPU 0        pid = 9, comm = aiodoned

panic: trap
Begin traceback...
alpha trace requires known PC =eject=
End traceback...

dumping to dev 4,1 offset 1575875
dump 768 ... 1 succeeded

rebooting
...

# gdb
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.
This GDB was configured as "alpha--netbsd".
(gdb) file netbsd.7
Reading symbols from netbsd.7...(no debugging symbols found)...done.
(gdb) target kcore netbsd.7.core
panic: trap
#0  0xfffffc000070b4d8 in dumpsys ()
(gdb) bt
#0  0xfffffc000070b4d8 in dumpsys ()
#1  0xfffffc000070b188 in cpu_reboot ()
#2  0xfffffc000055d814 in panic ()
#3  0xfffffc00007122b0 in trap ()
#4  0xfffffc0000300400 in XentMM ()
#5  0xfffffc000054b054 in schedcpu ()
can not access 0xfffffffd, invalid translation (invalid L1 PTE)
can not access 0xfffffffd, invalid translation (invalid L1 PTE)
Cannot access memory at address 0xfffffffffffffffd
(gdb) info registers
v0             0x0      0
t0             0x0      0
t1             0x0      0
t2             0x0      0
t3             0x0      0
t4             0x0      0
t5             0x0      0
t6             0x0      0
t7             0x0      0
s0             0xfffffc000091e5c4       -4398036949564
s1             0xfffffc000091e634       -4398036949452
s2             0xfffffe001139bbc8       -2198734259256
s3             0xfffffc000093cd50       -4398036824752
s4             0x1      1
s5             0xdeadbf87       3735928711
fp             0x104    260
a0             0x0      0
a1             0x0      0
a2             0x0      0
a3             0x0      0
a4             0x0      0
a5             0x0      0
t8             0x0      0
t9             0x0      0
t10            0x0      0
t11            0x0      0
ra             0x0      0
t12            0x0      0
at             0x0      0
gp             0x0      0
sp             0xfffffe001139b9f8       -2198734259720
zero           0x0      0
fpcr           0x0      0
pc             0xfffffc000070b4d8       -4398039124776
vfp            0x0      0
(gdb) q

# dmesg
consinit: not using prom console
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
     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 2.0 (GENERIC_PIO) #0: Sun Dec 12 15:09:01 JST 2004
          
hako@eco-math20.nrifs.affrc.go.jp:/usr/obj/sys/arch/alpha/compile/ 
GENERIC_PIO
API UP1000 699 MHz, s/n
8192 byte page size, 1 processor.
total memory = 768 MB
(2680 KB reserved for PROM, 765 MB used by NetBSD)
avail memory = 744 MB
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21264A-8
cpu0: Architecture extensions: 307<PAT,MVI,CIX,FIX,BWX>
irongate0 at mainbus0: AMD 751 Core Logic + AGP Chipset, rev. 37
agp0 at irongate0pci_mem_find: void region
: can't map aperture
pci0 at irongate0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
ppb0 at pci0 dev 1 function 0: Advanced Micro Devices AMD751 PCI-to-PCI  
Bridge (rev. 0x01)
pci1 at ppb0 bus 2
pci1: i/o space, memory space enabled
sio0 at pci0 dev 7 function 0: Acer Labs M1543 PCI-ISA Bridge (rev.  
0xc3)
vga0 at pci0 dev 8 function 0: 3D Labs GLINT Permedia 2V (rev. 0x01)
wsdisplay0 at vga0 (kbdmux ignored): console (80x25, vt100 emulation)
tlp0 at pci0 dev 10 function 0: Lite-On 82C169 Ethernet, pass 2.1
tlp0: interrupting at isa irq 10
tlp0: Ethernet address 00:a0:cc:3a:ee:a6
lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 0
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
aceride0 at pci0 dev 16 function 0
aceride0: Acer Labs M5229 UDMA IDE Controller (rev. 0xc1)
aceride0: bus-master DMA support present, but unused (forced off by  
config file)
aceride0: primary channel configured to compatibility mode
aceride0: primary channel interrupting at isa irq 14
atabus0 at aceride0 channel 0
aceride0: secondary channel configured to compatibility mode
aceride0: secondary channel interrupting at isa irq 15
atabus1 at aceride0 channel 1
Acer Labs M7101 Power Management Controller (miscellaneous prehistoric)  
at pci0 dev 17 function 0 not configured
isa0 at sio0
lpt0 at isa0 port 0x3bc-0x3bf irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 (mux ignored): console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 (mux ignored)
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fdc0: can't set up ISA DMA map
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible
Kernelized RAIDframe activated
wd0 at atabus0 drive 0: <IBM-DTLA-307030>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 29314 MB, 59560 cyl, 16 head, 63 sec, 512 bytes/sect x 60036480  
sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd1 at atabus0 drive 1: <IBM-DTLA-307030>
wd1: drive supports 16-sector PIO transfers, LBA addressing
wd1: 29314 MB, 59560 cyl, 16 head, 63 sec, 512 bytes/sect x 60036480  
sectors
wd1: 32-bit data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(aceride0:0:0): using PIO mode 4
wd1(aceride0:0:1): using PIO mode 4
atapibus0 at atabus1: 2 targets
cd0 at atapibus0<3>stray isa irq 15
  drive 1: <Pioneer CD-ROM ATAPI Model DR-944   010, , E1.07> cdrom  
removable
cd0: 32-bit data port
stray isa irq 15
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(aceride0:1:1): using PIO mode 4
root on wd0a dumps on wd0b
root file system type: ffs