osdir.com
mailing list archive

Subject: GCC code generation...? - msg#00002

List: os.netbsd.ports.vax

Date: Prev Next Index Thread: Prev Next Index
We've been told that gcc today is so much better than of old, which is why we should accept that it takes much longer to compile things today.

However, while trying to find why -current crashes, I found this code snippet:

netbsd:update_pcbs: halt
netbsd:update_pcbs+0x1: halt
netbsd:update_pcbs+0x2: subl2 $4, sp
netbsd:update_pcbs+0x5: movl 4(ap), r2
netbsd:update_pcbs+0x9: movl 8(r2), r1
netbsd:update_pcbs+0xd: *beql update_pcbs+0x50
netbsd:update_pcbs+0xf: movl 4(r1), r0
netbsd:update_pcbs+0x13: movl 12(r2), 80(r0)
netbsd:update_pcbs+0x18: movl 4(r1), r0
netbsd:update_pcbs+0x1c: bisl3 $0x4000000, 16(r2), 84(r0)
netbsd:update_pcbs+0x26: movl 4(r1), r0
netbsd:update_pcbs+0x2a: movl 20(r2), 88(r0)
netbsd:update_pcbs+0x2f: movl 4(r1), r0
netbsd:update_pcbs+0x33: movl 24(r2), 92(r0)
netbsd:update_pcbs+0x38: movl (r1), r1
netbsd:update_pcbs+0x3b: *bneq update_pcbs+0xf

Notice how it reloads r0 with the same value several times. At +0xf, +0x18, +0x26 and +0x2f. What is going on here???

This is the while-loop in update_pcbs() in pmap.c. And ignore that beql at +0xd, that's been modified by me to hunt a bug.

Johnny

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt@xxxxxxxxxx || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol



Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: KA53 asc/clock bug

On Sun, Jul 29, 2007 at 11:05:22AM +0200, Hans Rosenfeld wrote: > In asc_vsbus_attach() the SCSI id for the controller is read from some > clock chip NVRAM. This causes a segv in kernel mode for the KA53 which > seems to lack the clock chip. OpenBSD uses a hardcoded SCSI id 6 for all > systems but KA46, but since the existing code works with KA48 and KA49 > too I made the hardcoded value a special case for the KA53. I just noticed that the patch doesn't work as intended for kernel configurations which exclude KA46, KA48 and KA49. The clk_page is still referenced, but since it is not defined anywhere the kernel cannot be linked. I made a new patch that references clk_page only if VAX46, VAX48 or VAX49 are defined. -- %SYSTEM-F-ANARCHISM, The operating system has been overthrown asc_vsbus.diff Description: Text document

Next Message by Date: click to view message preview

System hung...

Running 4.99.27 (cross-built kernel from another architecture) kernel, with 4.99.20 userspace. I'm trying to build the whole system from source, but partway through the build, the whole systems hangs. I have the machine in this state right now, and can try whatever people would suggest. I was running build.sh -x build kernel=GENERIC in one terminal window (connected through ssh). The output was directed to a file, and I was running a tail -f on that file. Another window was running top. That's it. And NIS is running on the machine, and /usr/src is mounted through nfs. The build log file is also written at /usr/src. As I said, the system is hung. The last update in top looks like this: -----------------top-------------- load averages: 1.12, 1.09, 1.08 up 0 days, 6:10 18:30:47 44 processes: 1 runnable, 42 sleeping, 1 on processor CPU states: 78.3% user, 0.0% nice, 16.7% system, 0.0% interrupt, 4.9% idle Memory: 50M Act, 33M Inact, 3336K Wired, 5180K Exec, 57M File, 19M Free Swap: 128M Total, 128M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 24376 root 59 0 3936K 4800K RUN 0:05 91.09% 23.63% ld 10524 bqt 28 0 288K 1044K CPU 1:53 0.00% 0.00% top ------------------------------------ And the tail -f got to this: -----------------tail-------------- cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld -I../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld/../intl -I../intl -O -DLOCALEDIR="\"/usr/src/obj/tooldir.NetBSD-4.99.27-vax/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c evaxnbsd.c /bin/sh ./libtool --mode=link cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -o ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32vax.o evaxnbsd.o ../bfd/libbfd.la ../libiberty/libiberty.a mkdir .libs cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -o ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32vax.o evaxnbsd.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a NOT REBUILDING /usr/src/tools/binutils/../../gnu/dist/binutils/ld/ldver.texi NOT REBUILDING /usr/src/tools/binutils/../../gnu/dist/binutils/ld/ld.1 -------------------------------------- No response from either terminal, nor the console. Breaking into ddb on the console tells me this: -----------------console-------------- Starting cron. Wed Aug 8 12:21:05 CEST 2007 NetBSD/vax (Gnat.BQTnet.SE) (console) login: Stopped in pid 1523.1 (nbmake) at netbsd:cpu_Debugger+0x15: mfpr $ 18, r1 db> bt Not a panic, no active process, ignored. db> ps PID PPID PGRP UID S FLAGS LWPS COMMAND WAIT 22946 391 391 12 2 0x4100 1 pickup >1523 11736 430 0 2 0x4000 1 nbmake 11736 22926 430 0 2 0x4000 1 sh wait 22926 27093 430 0 2 0x4000 1 nbmake wait 27093 25337 430 0 2 0x4000 1 sh wait 25337 160 430 0 2 0x4000 1 nbmake wait 160 3806 430 0 2 0x4000 1 sh wait 10524 14662 10524 2026 2 0x4000 1 top 14662 23760 14662 2026 2 0x4000 1 tcsh pause 23760 11781 11781 2026 2 0x100 1 sshd select 11781 292 11781 0 2 0x4101 1 sshd netio 3806 430 430 0 2 0x4000 1 nbmake wait 437 421 437 0 2 0x4000 1 tail kqread 430 421 430 0 2 0x4000 1 sh wait 421 316 421 0 2 0x4000 1 tcsh pause 316 335 316 2026 2 0x4000 1 tcsh pause 335 362 362 2026 2 0x100 1 sshd select 362 292 362 0 2 0x4101 1 sshd netio 396 391 391 12 2 0x4100 1 qmgr 413 1 413 0 2 0x4000 1 getty 407 1 407 0 2 0 1 cron 409 1 409 0 2 0 1 inetd kqread 391 1 391 0 2 0x4100 1 master 292 1 292 0 2 0 1 sshd select 283 1 283 0 2 0 1 rwhod 269 1 269 0 2 0 1 ntpd 169 1 169 0 2 0 1 ypbind 168 1 168 0 2 0 1 rpcbind 102 1 102 0 2 0 1 syslogd 1 0 1 0 2 0x4001 1 init wait 0 -1 0 0 2 0x20002 13 system * db> ------------------------------------------ Any one who have any thoughts? It's been sitting still like this for atleast four hours now, so I don't think it will wake up... Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@xxxxxxxxxx || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol

Previous Message by Thread: click to view message preview

Re: KA53 asc/clock bug

On Sun, Jul 29, 2007 at 11:05:22AM +0200, Hans Rosenfeld wrote: > In asc_vsbus_attach() the SCSI id for the controller is read from some > clock chip NVRAM. This causes a segv in kernel mode for the KA53 which > seems to lack the clock chip. OpenBSD uses a hardcoded SCSI id 6 for all > systems but KA46, but since the existing code works with KA48 and KA49 > too I made the hardcoded value a special case for the KA53. I just noticed that the patch doesn't work as intended for kernel configurations which exclude KA46, KA48 and KA49. The clk_page is still referenced, but since it is not defined anywhere the kernel cannot be linked. I made a new patch that references clk_page only if VAX46, VAX48 or VAX49 are defined. -- %SYSTEM-F-ANARCHISM, The operating system has been overthrown asc_vsbus.diff Description: Text document

Next Message by Thread: click to view message preview

System hung...

Running 4.99.27 (cross-built kernel from another architecture) kernel, with 4.99.20 userspace. I'm trying to build the whole system from source, but partway through the build, the whole systems hangs. I have the machine in this state right now, and can try whatever people would suggest. I was running build.sh -x build kernel=GENERIC in one terminal window (connected through ssh). The output was directed to a file, and I was running a tail -f on that file. Another window was running top. That's it. And NIS is running on the machine, and /usr/src is mounted through nfs. The build log file is also written at /usr/src. As I said, the system is hung. The last update in top looks like this: -----------------top-------------- load averages: 1.12, 1.09, 1.08 up 0 days, 6:10 18:30:47 44 processes: 1 runnable, 42 sleeping, 1 on processor CPU states: 78.3% user, 0.0% nice, 16.7% system, 0.0% interrupt, 4.9% idle Memory: 50M Act, 33M Inact, 3336K Wired, 5180K Exec, 57M File, 19M Free Swap: 128M Total, 128M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 24376 root 59 0 3936K 4800K RUN 0:05 91.09% 23.63% ld 10524 bqt 28 0 288K 1044K CPU 1:53 0.00% 0.00% top ------------------------------------ And the tail -f got to this: -----------------tail-------------- cc -DHAVE_CONFIG_H -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld -I. -D_GNU_SOURCE -I. -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld -I../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld/../bfd -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld/../include -I/usr/src/tools/binutils/../../gnu/dist/binutils/ld/../intl -I../intl -O -DLOCALEDIR="\"/usr/src/obj/tooldir.NetBSD-4.99.27-vax/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -c evaxnbsd.c /bin/sh ./libtool --mode=link cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -o ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32vax.o evaxnbsd.o ../bfd/libbfd.la ../libiberty/libiberty.a mkdir .libs cc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O -o ld-new ldgram.o ldlex.o lexsup.o ldlang.o mri.o ldctor.o ldmain.o ldwrite.o ldexp.o ldemul.o ldver.o ldmisc.o ldfile.o ldcref.o eelf32vax.o evaxnbsd.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a NOT REBUILDING /usr/src/tools/binutils/../../gnu/dist/binutils/ld/ldver.texi NOT REBUILDING /usr/src/tools/binutils/../../gnu/dist/binutils/ld/ld.1 -------------------------------------- No response from either terminal, nor the console. Breaking into ddb on the console tells me this: -----------------console-------------- Starting cron. Wed Aug 8 12:21:05 CEST 2007 NetBSD/vax (Gnat.BQTnet.SE) (console) login: Stopped in pid 1523.1 (nbmake) at netbsd:cpu_Debugger+0x15: mfpr $ 18, r1 db> bt Not a panic, no active process, ignored. db> ps PID PPID PGRP UID S FLAGS LWPS COMMAND WAIT 22946 391 391 12 2 0x4100 1 pickup >1523 11736 430 0 2 0x4000 1 nbmake 11736 22926 430 0 2 0x4000 1 sh wait 22926 27093 430 0 2 0x4000 1 nbmake wait 27093 25337 430 0 2 0x4000 1 sh wait 25337 160 430 0 2 0x4000 1 nbmake wait 160 3806 430 0 2 0x4000 1 sh wait 10524 14662 10524 2026 2 0x4000 1 top 14662 23760 14662 2026 2 0x4000 1 tcsh pause 23760 11781 11781 2026 2 0x100 1 sshd select 11781 292 11781 0 2 0x4101 1 sshd netio 3806 430 430 0 2 0x4000 1 nbmake wait 437 421 437 0 2 0x4000 1 tail kqread 430 421 430 0 2 0x4000 1 sh wait 421 316 421 0 2 0x4000 1 tcsh pause 316 335 316 2026 2 0x4000 1 tcsh pause 335 362 362 2026 2 0x100 1 sshd select 362 292 362 0 2 0x4101 1 sshd netio 396 391 391 12 2 0x4100 1 qmgr 413 1 413 0 2 0x4000 1 getty 407 1 407 0 2 0 1 cron 409 1 409 0 2 0 1 inetd kqread 391 1 391 0 2 0x4100 1 master 292 1 292 0 2 0 1 sshd select 283 1 283 0 2 0 1 rwhod 269 1 269 0 2 0 1 ntpd 169 1 169 0 2 0 1 ypbind 168 1 168 0 2 0 1 rpcbind 102 1 102 0 2 0 1 syslogd 1 0 1 0 2 0x4001 1 init wait 0 -1 0 0 2 0x20002 13 system * db> ------------------------------------------ Any one who have any thoughts? It's been sitting still like this for atleast four hours now, so I don't think it will wake up... Johnny -- Johnny Billquist || "I'm on a bus || on a psychedelic trip email: bqt@xxxxxxxxxx || Reading murder books pdp is alive! || tryin' to stay hip" - B. Idol
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by