Re: [Qemu-devel] Sparc32 network problems
On 6/8/07, Andreas Färber <[EMAIL PROTECTED]> wrote: It is not okay. It works on ppc but on Intel applied to 0.9.0 s->ds- >bgr does not evaluate to true so OpenBIOS and Tux are blue again... (tested i386 and sparc guests; my console output indicates rgb_to_pixel32 is called for tcx) Maybe the bgr detection logic in sdl.c is flawed. Is this patch any better? Index: qemu/hw/pixel_ops.h === --- /dev/null 1970-01-01 00:00:00.0 + +++ qemu/hw/pixel_ops.h 2007-06-08 17:09:59.0 + @@ -0,0 +1,41 @@ +static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); +} + +static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); +} + +static inline unsigned int rgb_to_pixel15bgr(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((b >> 3) << 10) | ((g >> 3) << 5) | (r >> 3); +} + +static inline unsigned int rgb_to_pixel16(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); +} + +static inline unsigned int rgb_to_pixel16bgr(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((b >> 3) << 11) | ((g >> 2) << 5) | (r >> 3); +} + +static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, + unsigned int b) +{ +return (r << 16) | (g << 8) | b; +} + +static inline unsigned int rgb_to_pixel32bgr(unsigned int r, unsigned int g, + unsigned int b) +{ +return (b << 16) | (g << 8) | r; +} Index: qemu/hw/tcx.c === --- qemu.orig/hw/tcx.c 2007-06-08 16:40:44.0 + +++ qemu/hw/tcx.c 2007-06-08 17:09:59.0 + @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "vl.h" +#include "pixel_ops.h" #define MAXX 1024 #define MAXY 768 @@ -47,27 +48,6 @@ static void tcx_invalidate_display(void *opaque); static void tcx24_invalidate_display(void *opaque); -/* XXX: unify with vga draw line functions */ -static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); -} - -static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); -} - -static inline unsigned int rgb_to_pixel16(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); -} - -static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, unsigned b) -{ -return (r << 16) | (g << 8) | b; -} - static void update_palette_entries(TCXState *s, int start, int end) { int i; @@ -78,13 +58,22 @@ s->palette[i] = rgb_to_pixel8(s->r[i], s->g[i], s->b[i]); break; case 15: -s->palette[i] = rgb_to_pixel15(s->r[i], s->g[i], s->b[i]); +if (s->ds->bgr) +s->palette[i] = rgb_to_pixel15bgr(s->r[i], s->g[i], s->b[i]); +else +s->palette[i] = rgb_to_pixel15(s->r[i], s->g[i], s->b[i]); break; case 16: -s->palette[i] = rgb_to_pixel16(s->r[i], s->g[i], s->b[i]); +if (s->ds->bgr) +s->palette[i] = rgb_to_pixel16bgr(s->r[i], s->g[i], s->b[i]); +else +s->palette[i] = rgb_to_pixel16(s->r[i], s->g[i], s->b[i]); break; case 32: -s->palette[i] = rgb_to_pixel32(s->r[i], s->g[i], s->b[i]); +if (s->ds->bgr) +s->palette[i] = rgb_to_pixel32bgr(s->r[i], s->g[i], s->b[i]); +else +s->palette[i] = rgb_to_pixel32(s->r[i], s->g[i], s->b[i]); break; } } Index: qemu/hw/vga.c === --- qemu.orig/hw/vga.c 2007-06-08 16:40:44.0 + +++ qemu/hw/vga.c 2007-06-08 18:56:32.0 + @@ -23,6 +23,7 @@ */ #include "vl.h" #include "vga_int.h" +#include "pixel_ops.h" //#define DEBUG_VGA //#define DEBUG_VGA_MEM @@ -812,37 +813,20 @@ typedef void vga_draw_line_func(VGAState *s1, uint8_t *d, const uint8_t *s, int width); -static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); -} - -static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); -} - -static
Re: [Qemu-devel] Sparc32 network problems
On 6/9/07, Blue Swirl <[EMAIL PROTECTED]> wrote: On 6/8/07, Andreas Färber <[EMAIL PROTECTED]> wrote: > It is not okay. It works on ppc but on Intel applied to 0.9.0 s->ds- > >bgr does not evaluate to true so OpenBIOS and Tux are blue again... > (tested i386 and sparc guests; my console output indicates > rgb_to_pixel32 is called for tcx) Maybe the bgr detection logic in sdl.c is flawed. Is this patch any better? Except that on OSX the correct place to fix this would be in cocoa.m, right? Is there some better way to detect BGR than using the host endianness like in this version? Index: qemu/hw/pixel_ops.h === --- /dev/null 1970-01-01 00:00:00.0 + +++ qemu/hw/pixel_ops.h 2007-06-08 17:09:59.0 + @@ -0,0 +1,41 @@ +static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); +} + +static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); +} + +static inline unsigned int rgb_to_pixel15bgr(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((b >> 3) << 10) | ((g >> 3) << 5) | (r >> 3); +} + +static inline unsigned int rgb_to_pixel16(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); +} + +static inline unsigned int rgb_to_pixel16bgr(unsigned int r, unsigned int g, + unsigned int b) +{ +return ((b >> 3) << 11) | ((g >> 2) << 5) | (r >> 3); +} + +static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, + unsigned int b) +{ +return (r << 16) | (g << 8) | b; +} + +static inline unsigned int rgb_to_pixel32bgr(unsigned int r, unsigned int g, + unsigned int b) +{ +return (b << 16) | (g << 8) | r; +} Index: qemu/hw/tcx.c === --- qemu.orig/hw/tcx.c 2007-06-08 16:40:44.0 + +++ qemu/hw/tcx.c 2007-06-08 17:09:59.0 + @@ -22,6 +22,7 @@ * THE SOFTWARE. */ #include "vl.h" +#include "pixel_ops.h" #define MAXX 1024 #define MAXY 768 @@ -47,27 +48,6 @@ static void tcx_invalidate_display(void *opaque); static void tcx24_invalidate_display(void *opaque); -/* XXX: unify with vga draw line functions */ -static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 5) << 5) | ((g >> 5) << 2) | (b >> 6); -} - -static inline unsigned int rgb_to_pixel15(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3); -} - -static inline unsigned int rgb_to_pixel16(unsigned int r, unsigned int g, unsigned b) -{ -return ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); -} - -static inline unsigned int rgb_to_pixel32(unsigned int r, unsigned int g, unsigned b) -{ -return (r << 16) | (g << 8) | b; -} - static void update_palette_entries(TCXState *s, int start, int end) { int i; @@ -78,13 +58,22 @@ s->palette[i] = rgb_to_pixel8(s->r[i], s->g[i], s->b[i]); break; case 15: -s->palette[i] = rgb_to_pixel15(s->r[i], s->g[i], s->b[i]); +if (s->ds->bgr) +s->palette[i] = rgb_to_pixel15bgr(s->r[i], s->g[i], s->b[i]); +else +s->palette[i] = rgb_to_pixel15(s->r[i], s->g[i], s->b[i]); break; case 16: -s->palette[i] = rgb_to_pixel16(s->r[i], s->g[i], s->b[i]); +if (s->ds->bgr) +s->palette[i] = rgb_to_pixel16bgr(s->r[i], s->g[i], s->b[i]); +else +s->palette[i] = rgb_to_pixel16(s->r[i], s->g[i], s->b[i]); break; case 32: -s->palette[i] = rgb_to_pixel32(s->r[i], s->g[i], s->b[i]); +if (s->ds->bgr) +s->palette[i] = rgb_to_pixel32bgr(s->r[i], s->g[i], s->b[i]); +else +s->palette[i] = rgb_to_pixel32(s->r[i], s->g[i], s->b[i]); break; } } Index: qemu/hw/vga.c === --- qemu.orig/hw/vga.c 2007-06-08 16:40:44.0 + +++ qemu/hw/vga.c 2007-06-08 18:56:32.0 + @@ -23,6 +23,7 @@ */ #include "vl.h" #include "vga_int.h" +#include "pixel_ops.h" //#define DEBUG_VGA //#define DEBUG_VGA_MEM @@ -812,37 +813,20 @@ typedef void vga_draw_line_func(VGAState *s1, uint8_t *d, const uint8_t *s, int width); -static inline unsigned int rgb_to_pixel8(unsigned int r, unsigned int g, unsigned b)
Re: [Qemu-devel] Sparc32 network problems
Am 09.06.2007 um 10:05 schrieb Blue Swirl: Maybe the bgr detection logic in sdl.c is flawed. Is this patch any better? Except that on OSX the correct place to fix this would be in cocoa.m, right? For qemu yes. Works fine on ppc (and if ds->bgr is manually set to 1, shows the blue-footed penguin on ppc). [If the ds->bgr initialization is omitted it hangs with a black screen and the spinning color wheel. That's strange since bgr == 0 would be okay and any other value should lead to a blue-footed penguin only.] For Q's interface I derived a patch against host-cocoa/cocoaQemu.m. That works fine on OS X i386 and ppc hosts. Is there some better way to detect BGR than using the host endianness like in this version? I have no idea... But are you sure that we do not need 8-bit bgr? Q's patch inverted that, too. How would I test that? Andreas Q_bgr.diff Description: Binary data
Re: [Qemu-devel] Sparc32 network problems
Am 07.06.2007 um 13:47 schrieb Andreas Färber: > Using Q 0.9.0d88 on a Mac OS X i386 host I was able to boot into > debian-40r0-sparc-netinst.iso with qemu-system-sparc, have the NIC > configured through DHCP and install to about 73% where I repeatedly > got a kernel panic "Aiee". I should add that when I tried the interrupt checking patch proposed on this list (http://lists.gnu.org/archive/html/qemu-devel/2007-03/ msg00153.html) then instead of the kernel panic I got a qemu crash. Would this happen to be the same bug as in this report: http://marc.info/?l=qemu-devel&m=117768736212439&w=2 Yes, a similar one, except that the kernel panic did somehow mention the code I quoted above. When using debian-40r0-sparc-DVD-1.iso on PPC, configuring network manually and selecting the desktop option it crashed at 69% Okay, I got it installed now through the following procedure: use same DVD as above configure network manually do not select desktop option then after a reboot I was able to install additional packages from the DVD using apt-get, aptitude and - after similar crashes as before - dpkg --configure -a Is Debian correct is saying that TCX supports 8-bit only? Don't we have 15, 16 and 32 bit there, too? I modified xorg.conf to use suntcx instead of sunffb; depths of 24, 16 and 15 did not work, with 8 bit I got the Blue Swirl. ;-) Looks a little ugly at 8bpp, and without Lance working I can't use XDMCP or VNC instead. Andreas
[Qemu-devel] qemu/target-mips translate_init.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/06/09 12:29:32 Modified files: target-mips: translate_init.c Log message: R5k has PX implemented. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/translate_init.c?cvsroot=qemu&r1=1.13&r2=1.14
[Qemu-devel] qemu/hw pl181.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Paul Brook 07/06/09 14:07:54 Modified files: hw : pl181.c Log message: ARM PL181 MMCI fixes. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pl181.c?cvsroot=qemu&r1=1.4&r2=1.5
[Qemu-devel] qemu arm-semi.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Paul Brook 07/06/09 14:44:00 Modified files: . : arm-semi.c Log message: ARM GDB semihosting fixes CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/arm-semi.c?cvsroot=qemu&r1=1.3&r2=1.4
Re: [Qemu-devel] Sparc32 network problems
Blue Swirl wrote: > On 6/8/07, Thiemo Seufer <[EMAIL PROTECTED]> wrote: > >Blue Swirl wrote: > >[snip] > >> >I haven't been able to test the new patch yet. > >> > > >> >Q's patch and my adaptation for tcx just reversed the order of the > >> >colors, just like BlueSwirl's patch except that they used #if > >> >__LITTLE_ENDIAN__ in place of #ifdef WORDS_BIGENDIAN, and this worked > >> >for both i386 and sparc32 guests on i386 host (but is not applied for > >> >ppc host). > >> > > >> >http://www.kju-app.org/proj/browser/trunk/patches/q_vga.c_02.diff > >> > >> I think this is not correct either, instead the DisplayState bgr > >> attribute should be used. This version should work like before, and on > >> BGR displays the colours should be correct. VGA needs a similar change > >> for 15 and 16 bit depths if I'm correct. > > > >This one doesn't change anything for my testcases, so I guess it > >is ok for me. > > Could you test if this version fixes the 16/15 bit PPC host case? Again, no change for me. Thiemo
[Qemu-devel] qemu/hw mips_malta.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/06/09 15:44:26 Modified files: hw : mips_malta.c Log message: Don't try to use "vt" output in nographic mode. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/mips_malta.c?cvsroot=qemu&r1=1.37&r2=1.38
[Qemu-devel] qemu/target-m68k op.c op_helper.c translate.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Paul Brook 07/06/09 20:48:46 Modified files: target-m68k: op.c op_helper.c translate.c Log message: M68K status register fixes. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/op.c?cvsroot=qemu&r1=1.9&r2=1.10 http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/op_helper.c?cvsroot=qemu&r1=1.4&r2=1.5 http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/translate.c?cvsroot=qemu&r1=1.15&r2=1.16
[Qemu-devel] qemu/target-m68k op-hacks.h op.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Paul Brook 07/06/09 20:50:01 Modified files: target-m68k: op-hacks.h op.c Log message: Workaround dyngen problems with m68k conditional branch ops. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/op-hacks.h?cvsroot=qemu&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/op.c?cvsroot=qemu&r1=1.10&r2=1.11
[Qemu-devel] [PATCH] Flush debug file at exit
Hi, This patch flushes the debug file when qemu stops when calling cpu_abort(). If you don't do it, last lines of the debug are not written to the file. Hervé flush_debug.diff Description: Binary data
[Qemu-devel] [PATCH] Add memory-mapped interface to parallel port #2
Hi, This patch adds a memory-mapped interface for the parallel port. It is not as complete as I/O interface (no EPP/ECP), but I didn't want to add lots of code for very little use. Use it in the MIPS PICA 61 machine. Hervé parallel_mm.diff Description: Binary data
[Qemu-devel] [PATCH] Add a 7 segments + led display
Hi, This patch adds a 7-segments + led display device emulation to Qemu. A picture of the original thing can be found at http://www.sensi.org/~alec/mips/images/acer_pica_io_3.jpg Use the device in the MIPS PICA 61 machine. Hervé jazz_led.diff Description: Binary data
[Qemu-devel] qemu/target-m68k translate.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Paul Brook 07/06/09 21:30:14 Modified files: target-m68k: translate.c Log message: M68K watchpoint hacks. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-m68k/translate.c?cvsroot=qemu&r1=1.16&r2=1.17