[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] merge



# HG changeset patch
# User ack@xxxxxxxxxxxxxxxxxxxxx
# Node ID e86343be473083c22247060eb532e8881ee0bbdd
# Parent  e16d57440134a92239fb22bfa2667d1303ca0fee
# Parent  6dcd85ea232e0de5445f325abd0829a0ed6d56a1
merge
---
 tools/ioemu/patches/ioemu-ia64       |   27 ++--
 tools/ioemu/target-i386-dm/exec-dm.c |    6 -
 xen/drivers/video/vga.c              |  196 ++++++++++++++++++-----------------
 xen/include/xen/vga.h                |    1 
 4 files changed, 118 insertions(+), 112 deletions(-)

diff -r e16d57440134 -r e86343be4730 tools/ioemu/patches/ioemu-ia64
--- a/tools/ioemu/patches/ioemu-ia64    Tue Aug 15 15:48:31 2006 +0100
+++ b/tools/ioemu/patches/ioemu-ia64    Tue Aug 15 15:49:16 2006 +0100
@@ -1,7 +1,7 @@ Index: ioemu/hw/iommu.c
 Index: ioemu/hw/iommu.c
 ===================================================================
---- ioemu.orig/hw/iommu.c      2006-08-06 01:55:03.240628184 +0100
-+++ ioemu/hw/iommu.c   2006-08-06 02:18:54.843126039 +0100
+--- ioemu.orig/hw/iommu.c      2006-08-15 13:51:31.425498388 +0100
++++ ioemu/hw/iommu.c   2006-08-15 13:51:35.834011166 +0100
 @@ -82,7 +82,11 @@
  #define IOPTE_VALID         0x00000002 /* IOPTE is valid */
  #define IOPTE_WAZ           0x00000001 /* Write as zeros */
@@ -16,8 +16,8 @@ Index: ioemu/hw/iommu.c
  
 Index: ioemu/cpu-all.h
 ===================================================================
---- ioemu.orig/cpu-all.h       2006-08-06 02:17:09.392881406 +0100
-+++ ioemu/cpu-all.h    2006-08-06 02:18:54.844125928 +0100
+--- ioemu.orig/cpu-all.h       2006-08-15 13:51:35.772018017 +0100
++++ ioemu/cpu-all.h    2006-08-15 13:51:35.835011055 +0100
 @@ -835,6 +835,31 @@
                  :"=m" (*(volatile long *)addr)
                  :"dIr" (nr));
@@ -52,8 +52,8 @@ Index: ioemu/cpu-all.h
  /* memory API */
 Index: ioemu/vl.c
 ===================================================================
---- ioemu.orig/vl.c    2006-08-06 02:18:45.608155528 +0100
-+++ ioemu/vl.c 2006-08-06 02:18:54.847125593 +0100
+--- ioemu.orig/vl.c    2006-08-15 13:51:35.824012271 +0100
++++ ioemu/vl.c 2006-08-15 13:51:46.770802425 +0100
 @@ -6140,6 +6140,11 @@
      /* init the memory */
      phys_ram_size = ram_size + vga_ram_size + bios_size;
@@ -118,8 +118,8 @@ Index: ioemu/vl.c
      phys_ram_base = qemu_vmalloc(phys_ram_size);
 Index: ioemu/target-i386-dm/exec-dm.c
 ===================================================================
---- ioemu.orig/target-i386-dm/exec-dm.c        2006-08-06 02:15:01.776108064 
+0100
-+++ ioemu/target-i386-dm/exec-dm.c     2006-08-06 02:18:54.848125482 +0100
+--- ioemu.orig/target-i386-dm/exec-dm.c        2006-08-15 13:51:35.705025421 
+0100
++++ ioemu/target-i386-dm/exec-dm.c     2006-08-15 13:51:51.987225890 +0100
 @@ -341,6 +341,23 @@
      return io_mem_read[io_index >> IO_MEM_SHIFT];
  }
@@ -144,20 +144,20 @@ Index: ioemu/target-i386-dm/exec-dm.c
  /* physical memory access (slow version, mainly for debug) */
  #if defined(CONFIG_USER_ONLY)
  void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 
-@@ -456,6 +473,9 @@
-                 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 
-                     (addr & ~TARGET_PAGE_MASK);
-                 memcpy(buf, ptr, l);
+@@ -432,6 +449,9 @@
+                 /* RAM case */
+                 ptr = phys_ram_base + addr1;
+                 memcpy(ptr, buf, l);
 +#ifdef __ia64__
 +                sync_icache((unsigned long)ptr, l);
 +#endif 
-             } else {
-                 /* unreported MMIO space */
-                 memset(buf, 0xff, len);
+             }
+         } else {
+             if (io_index) {
 Index: ioemu/exec-all.h
 ===================================================================
---- ioemu.orig/exec-all.h      2006-08-06 02:14:09.796902750 +0100
-+++ ioemu/exec-all.h   2006-08-06 02:18:54.848125482 +0100
+--- ioemu.orig/exec-all.h      2006-08-15 13:51:35.682027963 +0100
++++ ioemu/exec-all.h   2006-08-15 13:51:35.839010613 +0100
 @@ -462,12 +462,13 @@
  }
  #endif
@@ -177,8 +177,8 @@ Index: ioemu/exec-all.h
  
 Index: ioemu/target-i386-dm/cpu.h
 ===================================================================
---- ioemu.orig/target-i386-dm/cpu.h    2006-08-06 02:15:01.776108064 +0100
-+++ ioemu/target-i386-dm/cpu.h 2006-08-06 02:18:54.848125482 +0100
+--- ioemu.orig/target-i386-dm/cpu.h    2006-08-15 13:51:35.704025531 +0100
++++ ioemu/target-i386-dm/cpu.h 2006-08-15 13:51:35.839010613 +0100
 @@ -80,7 +80,11 @@
  /* helper2.c */
  int main_loop(void);
@@ -194,7 +194,7 @@ Index: ioemu/ia64_intrinsic.h
 Index: ioemu/ia64_intrinsic.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ ioemu/ia64_intrinsic.h     2006-08-06 02:18:54.849125370 +0100
++++ ioemu/ia64_intrinsic.h     2006-08-15 13:51:35.840010502 +0100
 @@ -0,0 +1,276 @@
 +#ifndef IA64_INTRINSIC_H
 +#define IA64_INTRINSIC_H
diff -r e16d57440134 -r e86343be4730 tools/ioemu/target-i386-dm/exec-dm.c
--- a/tools/ioemu/target-i386-dm/exec-dm.c      Tue Aug 15 15:48:31 2006 +0100
+++ b/tools/ioemu/target-i386-dm/exec-dm.c      Tue Aug 15 15:49:16 2006 +0100
@@ -449,6 +449,9 @@ void cpu_physical_memory_rw(target_phys_
                 /* RAM case */
                 ptr = phys_ram_base + addr1;
                 memcpy(ptr, buf, l);
+#ifdef __ia64__
+                sync_icache((unsigned long)ptr, l);
+#endif 
             }
         } else {
             if (io_index) {
@@ -473,9 +476,6 @@ void cpu_physical_memory_rw(target_phys_
                 ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + 
                     (addr & ~TARGET_PAGE_MASK);
                 memcpy(buf, ptr, l);
-#ifdef __ia64__
-                sync_icache((unsigned long)ptr, l);
-#endif 
             } else {
                 /* unreported MMIO space */
                 memset(buf, 0xff, len);
diff -r e16d57440134 -r e86343be4730 xen/drivers/video/vga.c
--- a/xen/drivers/video/vga.c   Tue Aug 15 15:48:31 2006 +0100
+++ b/xen/drivers/video/vga.c   Tue Aug 15 15:49:16 2006 +0100
@@ -170,59 +170,59 @@
  * generic VGA port read/write
  */
  
-static inline uint8_t vga_io_r (uint16_t port)
+static inline uint8_t vga_io_r(uint16_t port)
 {
     return inb(port);
 }
 
-static inline void vga_io_w (uint16_t port, uint8_t val)
+static inline void vga_io_w(uint16_t port, uint8_t val)
 {
     outb(val, port);
 }
 
-static inline void vga_io_w_fast (uint16_t port, uint8_t reg, uint8_t val)
-{
-    outw(VGA_OUT16VAL (val, reg), port);
-}
-
-static inline uint8_t vga_mm_r (void __iomem *regbase, uint16_t port)
-{
-    return readb (regbase + port);
-}
-
-static inline void vga_mm_w (void __iomem *regbase, uint16_t port, uint8_t val)
-{
-    writeb (val, regbase + port);
-}
-
-static inline void vga_mm_w_fast (void __iomem *regbase, uint16_t port, 
uint8_t reg, uint8_t val)
-{
-    writew (VGA_OUT16VAL (val, reg), regbase + port);
-}
-
-static inline uint8_t vga_r (void __iomem *regbase, uint16_t port)
+static inline void vga_io_w_fast(uint16_t port, uint8_t reg, uint8_t val)
+{
+    outw(VGA_OUT16VAL(val, reg), port);
+}
+
+static inline uint8_t vga_mm_r(void __iomem *regbase, uint16_t port)
+{
+    return readb(regbase + port);
+}
+
+static inline void vga_mm_w(void __iomem *regbase, uint16_t port, uint8_t val)
+{
+    writeb(val, regbase + port);
+}
+
+static inline void vga_mm_w_fast(void __iomem *regbase, uint16_t port, uint8_t 
reg, uint8_t val)
+{
+    writew(VGA_OUT16VAL(val, reg), regbase + port);
+}
+
+static inline uint8_t vga_r(void __iomem *regbase, uint16_t port)
 {
     if (regbase)
-        return vga_mm_r (regbase, port);
+        return vga_mm_r(regbase, port);
     else
-        return vga_io_r (port);
-}
-
-static inline void vga_w (void __iomem *regbase, uint16_t port, uint8_t val)
+        return vga_io_r(port);
+}
+
+static inline void vga_w(void __iomem *regbase, uint16_t port, uint8_t val)
 {
     if (regbase)
-        vga_mm_w (regbase, port, val);
+        vga_mm_w(regbase, port, val);
     else
-        vga_io_w (port, val);
-}
-
-
-static inline void vga_w_fast (void __iomem *regbase, uint16_t port, uint8_t 
reg, uint8_t val)
+        vga_io_w(port, val);
+}
+
+
+static inline void vga_w_fast(void __iomem *regbase, uint16_t port, uint8_t 
reg, uint8_t val)
 {
     if (regbase)
-        vga_mm_w_fast (regbase, port, reg, val);
+        vga_mm_w_fast(regbase, port, reg, val);
     else
-        vga_io_w_fast (port, reg, val);
+        vga_io_w_fast(port, reg, val);
 }
 
 
@@ -230,19 +230,19 @@ static inline void vga_w_fast (void __io
  * VGA CRTC register read/write
  */
  
-static inline uint8_t vga_rcrt (void __iomem *regbase, uint8_t reg)
-{
-    vga_w (regbase, VGA_CRT_IC, reg);
-    return vga_r (regbase, VGA_CRT_DC);
-}
-
-static inline void vga_wcrt (void __iomem *regbase, uint8_t reg, uint8_t val)
+static inline uint8_t vga_rcrt(void __iomem *regbase, uint8_t reg)
+{
+    vga_w(regbase, VGA_CRT_IC, reg);
+    return vga_r(regbase, VGA_CRT_DC);
+}
+
+static inline void vga_wcrt(void __iomem *regbase, uint8_t reg, uint8_t val)
 {
 #ifdef VGA_OUTW_WRITE
-    vga_w_fast (regbase, VGA_CRT_IC, reg, val);
+    vga_w_fast(regbase, VGA_CRT_IC, reg, val);
 #else
-    vga_w (regbase, VGA_CRT_IC, reg);
-    vga_w (regbase, VGA_CRT_DC, val);
+    vga_w(regbase, VGA_CRT_IC, reg);
+    vga_w(regbase, VGA_CRT_DC, val);
 #endif /* VGA_OUTW_WRITE */
 }
 
@@ -250,19 +250,19 @@ static inline void vga_wcrt (void __iome
  * VGA sequencer register read/write
  */
  
-static inline uint8_t vga_rseq (void __iomem *regbase, uint8_t reg)
-{
-    vga_w (regbase, VGA_SEQ_I, reg);
-    return vga_r (regbase, VGA_SEQ_D);
-}
-
-static inline void vga_wseq (void __iomem *regbase, uint8_t reg, uint8_t val)
+static inline uint8_t vga_rseq(void __iomem *regbase, uint8_t reg)
+{
+    vga_w(regbase, VGA_SEQ_I, reg);
+    return vga_r(regbase, VGA_SEQ_D);
+}
+
+static inline void vga_wseq(void __iomem *regbase, uint8_t reg, uint8_t val)
 {
 #ifdef VGA_OUTW_WRITE
-    vga_w_fast (regbase, VGA_SEQ_I, reg, val);
+    vga_w_fast(regbase, VGA_SEQ_I, reg, val);
 #else
-    vga_w (regbase, VGA_SEQ_I, reg);
-    vga_w (regbase, VGA_SEQ_D, val);
+    vga_w(regbase, VGA_SEQ_I, reg);
+    vga_w(regbase, VGA_SEQ_D, val);
 #endif /* VGA_OUTW_WRITE */
 }
 
@@ -270,19 +270,19 @@ static inline void vga_wseq (void __iome
  * VGA graphics controller register read/write
  */
  
-static inline uint8_t vga_rgfx (void __iomem *regbase, uint8_t reg)
-{
-    vga_w (regbase, VGA_GFX_I, reg);
-    return vga_r (regbase, VGA_GFX_D);
-}
-
-static inline void vga_wgfx (void __iomem *regbase, uint8_t reg, uint8_t val)
+static inline uint8_t vga_rgfx(void __iomem *regbase, uint8_t reg)
+{
+    vga_w(regbase, VGA_GFX_I, reg);
+    return vga_r(regbase, VGA_GFX_D);
+}
+
+static inline void vga_wgfx(void __iomem *regbase, uint8_t reg, uint8_t val)
 {
 #ifdef VGA_OUTW_WRITE
-    vga_w_fast (regbase, VGA_GFX_I, reg, val);
+    vga_w_fast(regbase, VGA_GFX_I, reg, val);
 #else
-    vga_w (regbase, VGA_GFX_I, reg);
-    vga_w (regbase, VGA_GFX_D, val);
+    vga_w(regbase, VGA_GFX_I, reg);
+    vga_w(regbase, VGA_GFX_D, val);
 #endif /* VGA_OUTW_WRITE */
 }
 
@@ -290,16 +290,16 @@ static inline void vga_wgfx (void __iome
  * VGA attribute controller register read/write
  */
  
-static inline uint8_t vga_rattr (void __iomem *regbase, uint8_t reg)
-{
-    vga_w (regbase, VGA_ATT_IW, reg);
-    return vga_r (regbase, VGA_ATT_R);
-}
-
-static inline void vga_wattr (void __iomem *regbase, uint8_t reg, uint8_t val)
-{
-    vga_w (regbase, VGA_ATT_IW, reg);
-    vga_w (regbase, VGA_ATT_W, val);
+static inline uint8_t vga_rattr(void __iomem *regbase, uint8_t reg)
+{
+    vga_w(regbase, VGA_ATT_IW, reg);
+    return vga_r(regbase, VGA_ATT_R);
+}
+
+static inline void vga_wattr(void __iomem *regbase, uint8_t reg, uint8_t val)
+{
+    vga_w(regbase, VGA_ATT_IW, reg);
+    vga_w(regbase, VGA_ATT_W, val);
 }
 
 static int detect_video(void *video_base)
@@ -324,7 +324,7 @@ static int detect_video(void *video_base
     return video_found;
 }
 
-int detect_vga()
+static int detect_vga(void)
 {
     /*
      * Look at a number of well-known locations. Even if video is not at
@@ -341,7 +341,7 @@ int detect_vga()
 }
 
 /* This is actually code from vgaHWRestore in an old version of XFree86 :-) */
-void *setup_vga()
+void *setup_vga(void)
 {
     /* The following VGA state was saved from a chip in text mode 3. */
     static unsigned char regs[] = {
@@ -464,10 +464,13 @@ static int vga_set_scanlines(unsigned sc
 #define FONT_HEIGHT_MAX 32
 #define CHAR_MAP_SIZE (FONT_COUNT_MAX * FONT_HEIGHT_MAX)
 
-/* At least on various ATI cards I haven't been able to get the sequencer
-   to honor the change to the character map select register, thus at least
-   a way to override the slot is needed. */
-static unsigned font_slot = 2;
+/*
+ * We use font slot 0 because ATI cards do not honour changes to the
+ * character map select register. The fontslot parameter can be used to
+ * choose a non-default slot if the video card supports it and you wish to
+ * preserve the BIOS-initialised font data.
+ */
+static unsigned font_slot = 0;
 integer_param("fontslot", font_slot);
 
 int vga_load_font(const struct font_desc *font, unsigned rows)
@@ -508,15 +511,18 @@ int vga_load_font(const struct font_desc
     /* map start at A000:0000 */
     vga_wgfx(vgabase, VGA_GFX_MISC, 0x00);
 
-    if (font) {
+    if ( font )
+    {
         unsigned i, j;
         const uint8_t *data = font->data;
-        uint8_t *map = (uint8_t *)__va(0xA0000) + font_slot * 2 * 
CHAR_MAP_SIZE;
-
-        for (i = j = 0; i < CHAR_MAP_SIZE; ) {
-            vga_writeb(j < font->count * fontheight ? data[j++] : 0, map + 
i++);
-            if (!(j % fontheight))
-                while(i & (FONT_HEIGHT_MAX - 1))
+        uint8_t *map = (uint8_t *)__va(0xA0000) + font_slot*2*CHAR_MAP_SIZE;
+
+        for ( i = j = 0; i < CHAR_MAP_SIZE; )
+        {
+            vga_writeb(j < font->count * fontheight ? data[j++] : 0,
+                       map + i++);
+            if ( !(j % fontheight) )
+                while ( i & (FONT_HEIGHT_MAX - 1) )
                     vga_writeb(0, map + i++);
         }
     }
@@ -527,9 +533,9 @@ int vga_load_font(const struct font_desc
     vga_wseq(vgabase, VGA_SEQ_PLANE_WRITE, 0x03);
     /* odd-even addressing */
     vga_wseq(vgabase, VGA_SEQ_MEMORY_MODE, 0x03);
-    /* Character Map Select: The default font is kept in slot 0 and
-     * is never touched. Our custom font is loaded in slot 2. */
-    vga_wseq(vgabase, VGA_SEQ_CHARACTER_MAP, font ? font_slot | (font_slot << 
2) : 0x00);
+    /* Character Map Select: The default font is kept in slot 0. */
+    vga_wseq(vgabase, VGA_SEQ_CHARACTER_MAP,
+             font ? font_slot | (font_slot << 2) : 0x00);
     /* clear synchronous reset */
     vga_wseq(vgabase, VGA_SEQ_RESET, 0x03);
 
@@ -545,9 +551,11 @@ int vga_load_font(const struct font_desc
     vga_wcrt(vgabase, VGA_CRTC_MAX_SCAN, fsr);
 
     /* Cursor shape registers */
-    fsr = (vga_rcrt(vgabase, VGA_CRTC_CURSOR_END) & 0xe0) | (fontheight - 
fontheight / 6);
+    fsr  = vga_rcrt(vgabase, VGA_CRTC_CURSOR_END) & 0xe0;
+    fsr |= fontheight - fontheight / 6;
     vga_wcrt(vgabase, VGA_CRTC_CURSOR_END, fsr);
-    fsr = (vga_rcrt(vgabase, VGA_CRTC_CURSOR_START) & 0xe0) | ((fsr & 0x1f) - 
1);
+    fsr  = vga_rcrt(vgabase, VGA_CRTC_CURSOR_START) & 0xe0;
+    fsr |= (fsr & 0x1f) - 1;
     vga_wcrt(vgabase, VGA_CRTC_CURSOR_START, fsr);
 
     return 0;
diff -r e16d57440134 -r e86343be4730 xen/include/xen/vga.h
--- a/xen/include/xen/vga.h     Tue Aug 15 15:48:31 2006 +0100
+++ b/xen/include/xen/vga.h     Tue Aug 15 15:49:16 2006 +0100
@@ -11,7 +11,6 @@
 
 struct font_desc;
 
-int detect_vga(void);
 void *setup_vga(void);
 void vga_cursor_off(void);
 int vga_load_font(const struct font_desc *, unsigned rows);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.