All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [Xen-devel] [PATCH] Add lost logic for VGA initialization
@ 2006-07-26  5:38 Zhang, Xiantao
  2006-07-26 19:19 ` Alex Williamson
  0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Xiantao @ 2006-07-26  5:38 UTC (permalink / raw)
  To: Alex Williamson; +Cc: xen-devel, xen-ia64-devel

Hi Alex,
	With this fix and previous patches, we can boot VTi successfully with new Qemu on xen-ia64-unstable.hg 's tip(10784). Should we make xen-unstable.hg sync with xen-ia64-unstable.hg happen next step?  
Thanks & Best Regards
-Xiantao

OTC,Intel Corporation

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Zhang, Xiantao
> Sent: 2006年7月26日 12:47
> To: xen-devel@lists.xensource.com
> Cc: xen-ia64-devel@lists.xensource.com
> Subject: [Xen-devel] [PATCH] Add lost logic for VGA initialization
> 
> This patch adds lost logic for vga initialization. It was lost after
> changing to new Qemu.
> Signed-off-by : Kevin Tian <kevin.tian@intel.com>
> Signed-off-by : Zhang Xiantao <xiantao.zhang@intel.com>
> 
> Thanks & Best Regards
> -Xiantao
> 
> OTC,Intel Corporation

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: [PATCH] Add lost logic for VGA initialization
@ 2006-07-27  1:47 Zhang, Xiantao
  2006-07-27 10:12 ` Christian Limpach
  0 siblings, 1 reply; 7+ messages in thread
From: Zhang, Xiantao @ 2006-07-27  1:47 UTC (permalink / raw)
  To: Christian.Limpach; +Cc: xen-devel, xen-ia64-devel

Hi, Christian
	Thank you for your comments. But I check the patch on tip. Seems the following line not in upstream. I don't know why this part was lost when check-in.
diff -r 254c090854de tools/ioemu/hw/vga.c
--- a/tools/ioemu/hw/vga.c      Wed Jul 26 15:59:36 2006 -0600
+++ b/tools/ioemu/hw/vga.c      Thu Jul 27 09:27:03 2006 +0800
@@ -1953,6 +1953,7 @@ void vga_common_init(VGAState *s, Displa
                          vga_screen_dump, s);
     /* XXX: currently needed for display */
     vga_state = s;
+    vga_bios_init(s);
 }
Thanks & Best Regards
-Xiantao

OTC,Intel Corporation

> -----Original Message-----
> From: Christian Limpach [mailto:christian.limpach@gmail.com]
> Sent: 2006年7月26日 22:23
> To: Zhang, Xiantao
> Cc: xen-devel@lists.xensource.com; xen-ia64-devel@lists.xensource.com
> Subject: Re: [Xen-devel] [PATCH] Add lost logic for VGA initialization
> 
> On 7/26/06, Zhang, Xiantao <xiantao.zhang@intel.com> wrote:
> > This patch adds lost logic for vga initialization. It was lost after
> > changing to new Qemu.
> > Signed-off-by : Kevin Tian <kevin.tian@intel.com>
> > Signed-off-by : Zhang Xiantao <xiantao.zhang@intel.com>
> 
> I've applied this -- it would be nice if you could cleanup the code
> some more to use arrays to initialize s->sr[], s->gr[], s->ar[] and
> s->cr[].  Thanks!
> 
>     christian

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] Add lost logic for VGA initialization
@ 2006-07-26  4:46 Zhang, Xiantao
  2006-07-26  7:15 ` Keir Fraser
  2006-07-26 14:22 ` Christian Limpach
  0 siblings, 2 replies; 7+ messages in thread
From: Zhang, Xiantao @ 2006-07-26  4:46 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-ia64-devel

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

This patch adds lost logic for vga initialization. It was lost after
changing to new Qemu.
Signed-off-by : Kevin Tian <kevin.tian@intel.com>
Signed-off-by : Zhang Xiantao <xiantao.zhang@intel.com>

Thanks & Best Regards
-Xiantao

OTC,Intel Corporation


[-- Attachment #2: qemu_vga_fix.patch --]
[-- Type: application/octet-stream, Size: 4396 bytes --]

This patch adds lost logic for vga init. it was lost after
changing to new Qemu.

Signed-off-by : Kevin Tian <kevin.tian@intel.com>
Signed-off-by : Zhang Xiantao <xiantao.zhang@intel.com>

diff -r bbabdebc54ad tools/ioemu/hw/vga.c
--- a/tools/ioemu/hw/vga.c	Wed Jul 19 21:13:36 2006 +0100
+++ b/tools/ioemu/hw/vga.c	Wed Jul 26 09:28:52 2006 +0800
@@ -1772,6 +1772,125 @@ static void vga_map(PCIDevice *pci_dev, 
     }
 }
 
+/* do the same job as vgabios before vgabios get ready */
+void vga_bios_init(VGAState *s)
+{
+    uint8_t palette_model[192] = {
+        0,   0,   0,   0,   0, 170,   0, 170,   0,   0, 170, 170, 170,   0,   0, 170,
+        0, 170, 170,  85,   0, 170, 170, 170,  85,  85,  85,  85,  85, 255,  85, 255,
+        85, 85, 255, 255, 255,  85,  85, 255,  85, 255, 255, 255,  85, 255, 255, 255,
+        0,  21,   0,   0,  21,  42,   0,  63,   0,   0,  63,  42,  42,  21,   0,  42,
+        21, 42,  42,  63,   0,  42,  63,  42,   0,  21,  21,   0,  21,  63,   0,  63, 
+        21,  0,  63,  63,  42,  21,  21,  42,  21,  63,  42,  63,  21,  42,  63,  63,
+        21,  0,   0,  21,   0,  42,  21,  42,   0,  21,  42,  42,  63,   0,   0,  63,
+        0,  42,  63,  42,   0,  63,  42,  42,  21,   0,  21,  21,   0,  63,  21,  42,
+        21, 21,  42,  63,  63,   0,  21,  63,   0,  63,  63,  42,  21,  63,  42,  63,
+        21, 21,   0,  21,  21,  42,  21,  63,   0,  21,  63,  42,  63,  21,   0,  63,
+        21, 42,  63,  63,   0,  63,  63,  42,  21,  21,  21,  21,  21,  63,  21,  63,
+        21, 21,  63,  63,  63,  21,  21,  63,  21,  63,  63,  63,  21,  63,  63,  63
+    };
+
+    s->latch =          0; 
+
+    s->sr_index =       3; 
+    s->sr[0] =          3;
+    s->sr[1] =          0;
+    s->sr[2] =          3;
+    s->sr[3] =          0;
+    s->sr[4] =          2;
+    s->sr[5] =          0;
+    s->sr[6] =          0;
+    s->sr[7] =          0;
+
+    s->gr_index =       5; 
+    s->gr[0] =          0;
+    s->gr[1] =          0;
+    s->gr[2] =          0;
+    s->gr[3] =          0;
+    s->gr[4] =          0;
+    s->gr[5] =          16;
+    s->gr[6] =          14;
+    s->gr[7] =          15;
+    s->gr[8] =          255;
+
+    /*changed by out 0x03c0*/
+    s->ar_index =       32;
+    s->ar[0] =          0;
+    s->ar[1] =          1;
+    s->ar[2] =          2;
+    s->ar[3] =          3;
+    s->ar[4] =          4;
+    s->ar[5] =          5;
+    s->ar[6] =          6;
+    s->ar[7] =          7;
+    s->ar[8] =          8;
+    s->ar[9] =          9;
+    s->ar[10] =         10;
+    s->ar[11] =         11;
+    s->ar[12] =         12;
+    s->ar[13] =         13;
+    s->ar[14] =         14;
+    s->ar[15] =         15;
+    s->ar[16] =         12;
+    s->ar[17] =         0;
+    s->ar[18] =         15;
+    s->ar[19] =         8;
+    s->ar[20] =         0;
+
+    s->ar_flip_flop =   1; 
+
+    s->cr_index =       15; 
+    s->cr[0] = 95;
+    s->cr[1] = 79;
+    s->cr[2] = 80;
+    s->cr[3] = 130;
+    s->cr[4] = 85;
+    s->cr[5] = 129;
+    s->cr[6] = 191;
+    s->cr[7] = 31;
+    s->cr[8] = 0;
+    s->cr[9] = 79;
+    s->cr[10] = 14;
+    s->cr[11] = 15;
+    s->cr[12] = 0;
+    s->cr[13] = 0;
+    s->cr[14] = 5;
+    s->cr[15] = 160;
+    s->cr[16] = 156;
+    s->cr[17] = 142;
+    s->cr[18] = 143;
+    s->cr[19] = 40;
+    s->cr[20] = 31;
+    s->cr[21] = 150;
+    s->cr[22] = 185;
+    s->cr[23] = 163;
+    s->cr[24] = 255;
+
+    s->msr = 103; 
+    s->fcr =   0; 
+    s->st00 =   0; 
+    s->st01 =   0; 
+
+    /*dac_* & platte will be initialized by os through out 0x03c8 & out 0c03c9(1:3) */
+    s->dac_state =   0; 
+    s->dac_sub_index =   0; 
+    s->dac_read_index =   0; 
+    s->dac_write_index =   16; 
+    s->dac_cache[0] =   255;
+    s->dac_cache[1] =   255;
+    s->dac_cache[2] =   255;
+
+    /*platte*/
+    memcpy(s->palette, palette_model, 192);
+
+    s->bank_offset=   0;
+    s->graphic_mode = -1;
+
+    /* TODO:add vbe support if enable it */
+
+}
+
+
 /* when used on xen environment, the vga_ram_base is not used */
 void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base, 
                      unsigned long vga_ram_offset, int vga_ram_size)
@@ -1822,6 +1941,7 @@ void vga_common_init(VGAState *s, Displa
                          vga_screen_dump, s);
     /* XXX: currently needed for display */
     vga_state = s;
+    vga_bios_init(s);
 }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

end of thread, other threads:[~2006-07-27 10:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-26  5:38 [Xen-devel] [PATCH] Add lost logic for VGA initialization Zhang, Xiantao
2006-07-26 19:19 ` Alex Williamson
  -- strict thread matches above, loose matches on Subject: below --
2006-07-27  1:47 Zhang, Xiantao
2006-07-27 10:12 ` Christian Limpach
2006-07-26  4:46 Zhang, Xiantao
2006-07-26  7:15 ` Keir Fraser
2006-07-26 14:22 ` Christian Limpach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.