qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c
@ 2007-12-29 20:09 Blue Swirl
  2008-01-01 19:25 ` Aurelien Jarno
  0 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2007-12-29 20:09 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c
  2007-12-29 20:09 [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c Blue Swirl
@ 2008-01-01 19:25 ` Aurelien Jarno
  2008-01-01 20:00   ` Blue Swirl
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Aurelien Jarno @ 2008-01-01 19:25 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

On Sat, Dec 29, 2007 at 08:09:57PM +0000, Blue Swirl wrote:
> 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
> 

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) (dannf@debian.org) (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 (jj@ultra.linux.cz). 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


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c
  2008-01-01 19:25 ` Aurelien Jarno
@ 2008-01-01 20:00   ` Blue Swirl
  2008-01-01 20:25   ` Andreas Färber
  2008-01-01 21:00   ` Blue Swirl
  2 siblings, 0 replies; 6+ messages in thread
From: Blue Swirl @ 2008-01-01 20:00 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

On 1/1/08, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Sat, Dec 29, 2007 at 08:09:57PM +0000, Blue Swirl wrote:
> > 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
> >
>
> 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.

diff -u -r1.28 slavio_intctl.c
--- hw/slavio_intctl.c  1 Jan 2008 17:06:38 -0000       1.28
+++ hw/slavio_intctl.c  1 Jan 2008 19:52:22 -0000
@@ -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;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c
  2008-01-01 19:25 ` Aurelien Jarno
  2008-01-01 20:00   ` Blue Swirl
@ 2008-01-01 20:25   ` Andreas Färber
  2008-01-01 21:00   ` Blue Swirl
  2 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2008-01-01 20:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl


Am 01.01.2008 um 20:25 schrieb Aurelien Jarno:

> On Sat, Dec 29, 2007 at 08:09:57PM +0000, Blue Swirl wrote:
>> 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
>>
>
> 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) (dannf@debian.org 
> ) (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 (jj@ultra.linux.cz).  
> 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

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c
  2008-01-01 19:25 ` Aurelien Jarno
  2008-01-01 20:00   ` Blue Swirl
  2008-01-01 20:25   ` Andreas Färber
@ 2008-01-01 21:00   ` Blue Swirl
  2008-01-01 21:26     ` Aurelien Jarno
  2 siblings, 1 reply; 6+ messages in thread
From: Blue Swirl @ 2008-01-01 21:00 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

On 1/1/08, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Sat, Dec 29, 2007 at 08:09:57PM +0000, Blue Swirl wrote:
> > 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
> >
>
> Unfortunately this commit has broken SS-5 running Linux:

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c
  2008-01-01 21:00   ` Blue Swirl
@ 2008-01-01 21:26     ` Aurelien Jarno
  0 siblings, 0 replies; 6+ messages in thread
From: Aurelien Jarno @ 2008-01-01 21:26 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

On Tue, Jan 01, 2008 at 11:00:46PM +0200, Blue Swirl wrote:
> On 1/1/08, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > On Sat, Dec 29, 2007 at 08:09:57PM +0000, Blue Swirl wrote:
> > > 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
> > >
> >
> > 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.

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-01 21:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-29 20:09 [Qemu-devel] qemu/hw slavio_intctl.c slavio_timer.c sun4m.c Blue Swirl
2008-01-01 19:25 ` Aurelien Jarno
2008-01-01 20:00   ` Blue Swirl
2008-01-01 20:25   ` Andreas Färber
2008-01-01 21:00   ` Blue Swirl
2008-01-01 21:26     ` Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).