Skip to contentSkip to conversation

qemu/hw slavio_intctl.c slavio_timer.c sun4m.c

Qemu-devel Blue Swirl 3 participants 6 messages Dec 29, 2007 – Jan 1, 2008

lore
Share & tools
lore

Blue Swirl

author
#0 lore raw

CVSROOT: /cvsroot/qemu
Module name: qemu
Changes by: Blue Swirl <blueswir1> 07/12/29 20:09:57

Modified files:
hw : slavio_intctl.c slavio_timer.c sun4m.c

Log message:
Fix CPU timer interrupts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_intctl.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemu&r1=1.76&r2=1.77

#1 lore raw
Quoted 7 lines · Blue Swirl

CVSROOT: /cvsroot/qemu
Module name: qemu
Changes by: Blue Swirl <blueswir1> 07/12/29 20:09:57

Modified files:
hw : slavio_intctl.c slavio_timer.c sun4m.c

Quoted 8 lines

Log message:
Fix CPU timer interrupts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_intctl.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemu&r1=1.76&r2=1.77

Unfortunately this commit has broken SS-5 running Linux:

[sparc] Booting file 'disk' with parameters ''
Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
SILO Version 1.4.13
boot:
Uncompressing image...
Loaded kernel version 2.6.18
Loading initial ramdisk (3205804 bytes at 0x3000000 phys, 0x60000000 virt)...
PROMLIB: obio_ranges 1
Booting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.18-5-sparc32 (Debian 2.6.18.dfsg.1-13etch3) ([email protected]) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Wed Sep 26 17:37:21 UTC 2007
ARCH: SUN4M
TYPE: SPARCstation 5
Ethernet address: 0:16:3e:0:11:12
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek ([email protected]). Patching kernel for srmmu[Fujitsu TurboSparc]/iommu
63MB HIGHMEM available.
PROM: Built device tree with 21328 bytes of memory.
Power off control detected.
Built 1 zonelists. Total pages: 63944
Kernel command line: root=/dev/sda4 ro
PID hash table entries: 1024 (order: 10, 4096 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 250220k/261292k available (1640k kernel code, 10876k reserved, 404k data, 136k init, 64684k highmem)
Mount-cache hash table entries: 512
checking if image is initramfs... it is
Freeing initrd memory: 3130k freed
NET: Registered protocol family 16
IOMMU: impl 0 vers 5 table 0xf07c0000[262144 B] map [65536 b]
sbus0: Clock 21.1250 MHz
dma0: Revision 2
dma1: Revision 0
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 8192 bind 4096)
TCP reno registered
ioremap: done with statics, switching to malloc
apc: power management initialized
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 128x48
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@3,800000: TCX at 0:50800000, 8-bit only
ffd57454: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)
qemu: fatal: Trap 0x29 while interrupts disabled, Error state
pc: f0011c98 npc: f0011c9c
General Registers:

%g0: 00000000   %g1: f01d2400   %g2: f022d070   %g3: f0229c68
%g4: f001aea0   %g5: 05327f80   %g6: f3320000   %g7: ffffffff
Current Register Window:
%o0: 00000032   %o1: 00000000   %o2: f022d110   %o3: f33200a8
%o4: 00000000   %o5: 00000000   %o6: f331fff0   %o7: f0030144
%l0: f022d000   %l1: 00000000   %l2: f022d938   %l3: ffffffff
%l4: f022d538   %l5: 00004000   %l6: f3320000   %l7: 00000000
%i0: f01a6398   %i1: f0012f5c   %i2: f0012f60   %i3: f33201e0
%i4: 00000010   %i5: 00000000   %i6: f3320060   %i7: f001306c

Floating Point Registers:
%f00: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f04: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f08: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f12: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f16: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f20: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f24: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f28: 000000000.000000 000000000.000000 000000000.000000 000000000.000000
psr: 0x04001fc3 -> ---- SP- wim: 0x00000008
fsr: 0x00080000

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
author
#2 lore raw
Quoted 11 lines · Aurelien Jarno
Quoted 10 lines · Blue Swirl
CVSROOT:      /cvsroot/qemu
Module name:  qemu
Changes by:   Blue Swirl <blueswir1>  07/12/29 20:09:57

Modified files:
hw : slavio_intctl.c slavio_timer.c sun4m.c

Log message:
Fix CPU timer interrupts

Quoted 7 lines
Quoted 5 lines

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_intctl.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemu&r1=1.76&r2=1.77

Unfortunately this commit has broken SS-5 running Linux:

Thanks for the report, I can reproduce the bug. What a strange error!

The following patch hides the problem, but it also un-fixes the CPU timer. I have to think of a better solution.

slavio_intctl.c 1 Jan 2008 19:52:22 -0000 renamed from slavio_intctl.c 1 Jan 2008 17:06:38 -0000 1.28 +1 -1
diff -u -r1.28 slavio_intctl.c
@@ -257,7 +257,7 @@
                 if (pending & (1 << j))
                     pil_pending |= 1 << s->intbit_to_level[j];
             }
-            pil_pending |= s->intreg_pending[i] & CPU_HARDIRQ_MASK;
+            //pil_pending |= s->intreg_pending[i] & CPU_HARDIRQ_MASK;
         }
         pil_pending |= (s->intreg_pending[i] & CPU_SOFTIRQ_MASK) >> 16;
#3 lore raw
In reply to Aurelien Jarno

Am 01.01.2008 um 20:25 schrieb Aurelien Jarno:

Quoted 92 lines · Blue Swirl
Quoted 7 lines

CVSROOT: /cvsroot/qemu
Module name: qemu
Changes by: Blue Swirl <blueswir1> 07/12/29 20:09:57

Modified files:
hw : slavio_intctl.c slavio_timer.c sun4m.c

Quoted 8 lines

Log message:
Fix CPU timer interrupts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_intctl.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemu&r1=1.76&r2=1.77

Unfortunately this commit has broken SS-5 running Linux:

[sparc] Booting file 'disk' with parameters ''
Not a bootable ELF image
Not a Linux kernel image
Loading a.out image...
Loaded 7680 bytes
entry point is 0x4000
Jumping to entry point...
SILO Version 1.4.13
boot:
Uncompressing image...
Loaded kernel version 2.6.18
Loading initial ramdisk (3205804 bytes at 0x3000000 phys, 0x60000000 virt)...
PROMLIB: obio_ranges 1
Booting Linux...
PROMLIB: Sun Boot Prom Version 3 Revision 2
Linux version 2.6.18-5-sparc32 (Debian 2.6.18.dfsg.1-13etch3) ([email protected]) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Wed Sep 26 17:37:21 UTC 2007
ARCH: SUN4M
TYPE: SPARCstation 5
Ethernet address: 0:16:3e:0:11:12
Boot time fixup v1.6. 4/Mar/98 Jakub Jelinek ([email protected]). Patching kernel for srmmu[Fujitsu TurboSparc]/iommu
63MB HIGHMEM available.
PROM: Built device tree with 21328 bytes of memory.
Power off control detected.
Built 1 zonelists. Total pages: 63944
Kernel command line: root=/dev/sda4 ro
PID hash table entries: 1024 (order: 10, 4096 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x25
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 250220k/261292k available (1640k kernel code, 10876k reserved, 404k data, 136k init, 64684k highmem)
Mount-cache hash table entries: 512
checking if image is initramfs... it is
Freeing initrd memory: 3130k freed
NET: Registered protocol family 16
IOMMU: impl 0 vers 5 table 0xf07c0000[262144 B] map [65536 b]
sbus0: Clock 21.1250 MHz
dma0: Revision 2
dma1: Revision 0
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 8192 bind 4096)
TCP reno registered
ioremap: done with statics, switching to malloc
apc: power management initialized
highmem bounce pool size: 64 pages
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 128x48
/iommu@0,10000000/sbus@0,10001000/SUNW,tcx@3,800000: TCX at 0:50800000, 8-bit only
ffd57454: ttyS0 at MMIO 0x71100000 (irq = 44) is a zs
Console: ttyS0 (SunZilog zs0)
qemu: fatal: Trap 0x29 while interrupts disabled, Error state
pc: f0011c98 npc: f0011c9c
General Registers:

%g0: 00000000   %g1: f01d2400   %g2: f022d070   %g3: f0229c68
%g4: f001aea0   %g5: 05327f80   %g6: f3320000   %g7: ffffffff
Current Register Window:
%o0: 00000032   %o1: 00000000   %o2: f022d110   %o3: f33200a8
%o4: 00000000   %o5: 00000000   %o6: f331fff0   %o7: f0030144
%l0: f022d000   %l1: 00000000   %l2: f022d938   %l3: ffffffff
%l4: f022d538   %l5: 00004000   %l6: f3320000   %l7: 00000000
%i0: f01a6398   %i1: f0012f5c   %i2: f0012f60   %i3: f33201e0
%i4: 00000010   %i5: 00000000   %i6: f3320060   %i7: f001306c
Quoted 11 lines

Floating Point Registers:
%f00: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f04: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f08: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f12: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f16: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f20: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f24: 000000000.000000 000000000.000000 000000000.000000 000000000.000000 %f28: 000000000.000000 000000000.000000 000000000.000000 000000000.000000
psr: 0x04001fc3 -> ---- SP- wim: 0x00000008
fsr: 0x00080000

On Solaris/amd64 it continues until "Starting periodic command scheduler: crond." and then hangs. (previously I got a lot of esp0 issues during fsck, this is now fixed, thanks)

author
#4 lore raw
In reply to Aurelien Jarno
Quoted 11 lines · Aurelien Jarno
Quoted 10 lines · Blue Swirl
CVSROOT:      /cvsroot/qemu
Module name:  qemu
Changes by:   Blue Swirl <blueswir1>  07/12/29 20:09:57

Modified files:
hw : slavio_intctl.c slavio_timer.c sun4m.c

Log message:
Fix CPU timer interrupts

Quoted 7 lines
Quoted 5 lines

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_intctl.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemu&r1=1.76&r2=1.77

Unfortunately this commit has broken SS-5 running Linux:

The fix is now in CVS, please give it a test.

#5 lore raw
Quoted 18 lines · Blue Swirl
Quoted 17 lines · Aurelien Jarno
Quoted 15 lines · Blue Swirl
CVSROOT:      /cvsroot/qemu
Module name:  qemu
Changes by:   Blue Swirl <blueswir1>  07/12/29 20:09:57

Modified files:
hw : slavio_intctl.c slavio_timer.c sun4m.c

Log message:
Fix CPU timer interrupts

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_intctl.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/slavio_timer.c?cvsroot=qemu&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/sun4m.c?cvsroot=qemu&r1=1.76&r2=1.77

Quoted 4 lines
Quoted 1 line

Unfortunately this commit has broken SS-5 running Linux:

The fix is now in CVS, please give it a test.

I confirm that it works. Thanks a lot for the quick fix.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net