[PATCH] Add vga font init for qemu/ia64

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Add vga font init for qemu/ia64

Yu, Ke
Signed-off-by Yu Ke <[hidden email]>
Signed-off-by Tian Kevin <[hidden email]>

# HG changeset patch
# User Yu Ke <[hidden email]>
# Node ID 56a0ba1c8ba6024fe36cf25e29b1cc1dac74d9af
# Parent  0ee00faf332d4f9eb828ab1ca7b846787d77b2ca
This patch add font initialization for qemu/ia64.
Qemu need font data in vga ram to draw text. In x86, vga bios will
initialize the font data. However, in ia64, there is no vga bios , thus
no font data . This patch adds the lacking logic for ia64.

diff -r 0ee00faf332d -r 56a0ba1c8ba6 tools/ioemu/hw/vga.c
--- a/tools/ioemu/hw/vga.c Wed Nov 23 21:23:28 2005
+++ b/tools/ioemu/hw/vga.c Tue Nov 29 09:38:42 2005
@@ -1718,6 +1718,19 @@
     cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
 }
 
+#ifdef __ia64__
+#include "vgafont.h"
+static void vga_font_init(VGAState* s)    
+{
+    int i,j;
+    for (i=0; i<256; i++){
+        for (j=0; j<16; j++){
+            s->vram_ptr[(i*32+j)*4+2] = vgafont16[i*16+j];
+        }
+    }
+}
+#endif // __ia64__
+                
 /* do the same job as vgabios before vgabios get ready */
 void vga_bios_init(VGAState *s)
 {
@@ -1844,6 +1857,10 @@
         fclose(qemuf);
     }
 
+#ifdef __ia64__
+    vga_font_init(s);
+#endif
+
 }
 
 void vga_common_init(VGAState *s, DisplayState *ds, uint8_t
*vga_ram_base,

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel

qemu-ia64-vga-font.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [PATCH] Add vga font init for qemu/ia64

Dan Magenheimer
Hi Ke --

This is a fix for ia64 but the file is generic so the patch
should be submitted to xen-devel.

It would probably be better to use a more general ifdef
(for example, #ifdef ARCH_NEED_VGA_FONT_INIT) in case
other arch's need this in the future.  Perhaps a
test for ia64 can be put in tools/ioemu/configure to
properly define this.

Thanks,
Dan

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of Yu, Ke
> Sent: Tuesday, November 29, 2005 3:01 AM
> To: [hidden email]
> Subject: [Xen-ia64-devel] [PATCH] Add vga font init for qemu/ia64
>
> Signed-off-by Yu Ke <[hidden email]>
> Signed-off-by Tian Kevin <[hidden email]>
>
> # HG changeset patch
> # User Yu Ke <[hidden email]>
> # Node ID 56a0ba1c8ba6024fe36cf25e29b1cc1dac74d9af
> # Parent  0ee00faf332d4f9eb828ab1ca7b846787d77b2ca
> This patch add font initialization for qemu/ia64.
> Qemu need font data in vga ram to draw text. In x86, vga bios will
> initialize the font data. However, in ia64, there is no vga
> bios , thus
> no font data . This patch adds the lacking logic for ia64.
>
> diff -r 0ee00faf332d -r 56a0ba1c8ba6 tools/ioemu/hw/vga.c
> --- a/tools/ioemu/hw/vga.c Wed Nov 23 21:23:28 2005
> +++ b/tools/ioemu/hw/vga.c Tue Nov 29 09:38:42 2005
> @@ -1718,6 +1718,19 @@
>      cpu_register_physical_memory(addr, s->vram_size, s->vram_offset);
>  }
>  
> +#ifdef __ia64__
> +#include "vgafont.h"
> +static void vga_font_init(VGAState* s)    
> +{
> +    int i,j;
> +    for (i=0; i<256; i++){
> +        for (j=0; j<16; j++){
> +            s->vram_ptr[(i*32+j)*4+2] = vgafont16[i*16+j];
> +        }
> +    }
> +}
> +#endif // __ia64__
> +                
>  /* do the same job as vgabios before vgabios get ready */
>  void vga_bios_init(VGAState *s)
>  {
> @@ -1844,6 +1857,10 @@
>          fclose(qemuf);
>      }
>  
> +#ifdef __ia64__
> +    vga_font_init(s);
> +#endif
> +
>  }
>  
>  void vga_common_init(VGAState *s, DisplayState *ds, uint8_t
> *vga_ram_base,
>

_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel
Reply | Threaded
Open this post in threaded view
|

RE: [PATCH] Add vga font init for qemu/ia64

Yu, Ke
In reply to this post by Yu, Ke
 Thanks for your comments. I will revise it and send to xen-devel.

Magenheimer, Dan (HP Labs Fort Collins) wrote:

> Hi Ke --
>
> This is a fix for ia64 but the file is generic so the patch
> should be submitted to xen-devel.
>
> It would probably be better to use a more general ifdef
> (for example, #ifdef ARCH_NEED_VGA_FONT_INIT) in case
> other arch's need this in the future.  Perhaps a
> test for ia64 can be put in tools/ioemu/configure to
> properly define this.
>
> Thanks,
> Dan
>
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf
>> Of Yu, Ke
>> Sent: Tuesday, November 29, 2005 3:01 AM
>> To: [hidden email]
>> Subject: [Xen-ia64-devel] [PATCH] Add vga font init for qemu/ia64
>>
>> Signed-off-by Yu Ke <[hidden email]>
>> Signed-off-by Tian Kevin <[hidden email]>
>>
>> # HG changeset patch
>> # User Yu Ke <[hidden email]>
>> # Node ID 56a0ba1c8ba6024fe36cf25e29b1cc1dac74d9af
>> # Parent  0ee00faf332d4f9eb828ab1ca7b846787d77b2ca
>> This patch add font initialization for qemu/ia64.
>> Qemu need font data in vga ram to draw text. In x86, vga bios will
>> initialize the font data. However, in ia64, there is no vga
>> bios , thus
>> no font data . This patch adds the lacking logic for ia64.
>>
>> diff -r 0ee00faf332d -r 56a0ba1c8ba6 tools/ioemu/hw/vga.c
>> --- a/tools/ioemu/hw/vga.c Wed Nov 23 21:23:28 2005
>> +++ b/tools/ioemu/hw/vga.c Tue Nov 29 09:38:42 2005 @@ -1718,6
>>      +1718,19 @@ cpu_register_physical_memory(addr, s->vram_size,
>> s->vram_offset);  }
>>
>> +#ifdef __ia64__
>> +#include "vgafont.h"
>> +static void vga_font_init(VGAState* s)
>> +{
>> +    int i,j;
>> +    for (i=0; i<256; i++){
>> +        for (j=0; j<16; j++){
>> +            s->vram_ptr[(i*32+j)*4+2] = vgafont16[i*16+j]; +      
>> } +    }
>> +}
>> +#endif // __ia64__
>> +
>>  /* do the same job as vgabios before vgabios get ready */
>>  void vga_bios_init(VGAState *s)
>>  {
>> @@ -1844,6 +1857,10 @@
>>          fclose(qemuf);
>>      }
>>
>> +#ifdef __ia64__
>> +    vga_font_init(s);
>> +#endif
>> +
>>  }
>>
>>  void vga_common_init(VGAState *s, DisplayState *ds, uint8_t
>> *vga_ram_base,


_______________________________________________
Xen-ia64-devel mailing list
[hidden email]
http://lists.xensource.com/xen-ia64-devel