Skip to contentSkip to conversation

Update vgabios repository to 0.6c

PATCH RESEND New Gerd Hoffmann 1 participant 6 messages Aug 19, 2010

lore
Share & tools
lore
#4 lore raw

PATCH RESEND 4/5 - biosfn_write_teletype: fixed attribute when scrolling in text mode

In reply to Gerd Hoffmann

From: Volker Ruppert <[email protected]>

---
 vgabios.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
vgabios.c +4 -2
index fbc3588..ea3aae8 100644
@@ -2039,7 +2039,9 @@ Bit8u car;Bit8u page;Bit8u attr;Bit8u flag;
   {
    if(vga_modes[line].class==TEXT)
     {
-     biosfn_scroll(0x01,0x07,0,0,nbrows-1,nbcols-1,page,SCROLL_UP);
+     address=SCREEN_MEM_START(nbcols,nbrows,page)+(xcurs+(ycurs-1)*nbcols)*2;
+     attr=read_byte(vga_modes[line].sstart,address+1);
+     biosfn_scroll(0x01,attr,0,0,nbrows-1,nbcols-1,page,SCROLL_UP);
     }
    else
     {
@@ -2047,7 +2049,7 @@ Bit8u car;Bit8u page;Bit8u attr;Bit8u flag;
     }
    ycurs-=1;
   }
- 
+
  // Set the cursor for the page
  cursor=ycurs; cursor<<=8; cursor+=xcurs;
  biosfn_set_cursor_pos(page,cursor);
Signature · 1 line
1.7.1
#0 lore raw

cover Update vgabios repository to 0.6c

Hi,

This patch series updates the vgabios repository @ qemu.org to release vgabios release 0.6c.

Qemu has been adapted to the 0.6c expectations during the 0.13 devel cycle, so both master and the upcoming 0.13 release will work with the updated vgabios. 0.12-stable is not fully supported though (vesa gfx support will stop working), so the vgabios binaries there should not be updated.

The patches are also available in the git repository at:
git://anongit.freedesktop.org/~kraxel/vgabios update-0.6c

Volker Ruppert (5):
- use VBE LFB address from PCI base address if present (rewrite of the cirrus specific function in main vgabios code) - removed unnecessary spaces
- added support for a lot more non-standard VBE modes (e.g. widescreen modes) - requires latest Bochs VBE code (16 MB video memory, VBE_DISPI_ID5, VRAM size in 64k pages stored in VBE register) - check if VBE mode is supported with current VRAM size
- preparing for release 0.6c
- biosfn_write_teletype: fixed attribute when scrolling in text mode
- updates for release 0.6c

 ChangeLog       |   47 ++++++++++++++++++++++++++++
 README          |    7 ++++
 clext.c         |   51 +------------------------------
 vbe.c           |   90 +++++++++++++++++++++++++++++++++---------------------
 vbe.h           |   70 ++++++++++++++++++++++---------------------
 vbetables-gen.c |   43 +++++++++++++++++++-------
 vgabios.c       |   64 ++++++++++++++++++++++++++++++++++++++-
 7 files changed, 241 insertions(+), 131 deletions(-)
#3 lore raw

PATCH RESEND 3/5 - preparing for release 0.6c

From: Volker Ruppert <[email protected]>

---
 ChangeLog |   35 +++++++++++++++++++++++++++++++++++
 README    |    6 ++++++
 2 files changed, 41 insertions(+), 0 deletions(-)
ChangeLog +35 -0
index 75be5bd..35bf00a 100644
@@ -1,3 +1,38 @@
+2009-01-25 16:46  vruppert
+
+	* vbe.c (1.62), vbe.h (1.28), vbetables-gen.c (1.5):
+
+	- added support for a lot more non-standard VBE modes (e.g. widescreen modes)
+	- requires latest Bochs VBE code (16 MB video memory, VBE_DISPI_ID5, VRAM size
+	  in 64k pages stored in VBE register)
+	- check if VBE mode is supported with current VRAM size
+
+2009-01-24 11:02  vruppert
+
+	* clext.c (1.14), vbe.c (1.61), vgabios.c (1.68):
+
+	- use VBE LFB address from PCI base address if present (rewrite of the cirrus
+	  specific function in main vgabios code)
+	- removed unnecessary spaces
+
+2008-12-14 09:29  vruppert
+
+	* clext.c (1.13):
+
+	- added DPMS support to cirrus vgabios (patch from Gleb Natapov)
+
+2008-05-30 17:28  vruppert
+
+	* README (1.16):
+
+	- updated for release 0.6b
+
+2008-05-22 12:55  vruppert
+
+	* ChangeLog (1.27), README (1.15):
+
+	- preparations for release 0.6b
+
 2008-05-11 08:40  vruppert
 
 	* biossums.c (1.6):
README +6 -0
index 90141d4..ce67aeb 100644
@@ -90,6 +90,12 @@ For any information on qemu, visit the website http://fabrice.bellard.free.fr/qe
 
 History
 -------
+vgabios-0.6c : not yet released
+  - Volker
+    . added DPMS support to cirrus vgabios (patch from Gleb Natapov)
+    . use VBE LFB address from PCI base address if present
+    . added support for a lot more non-standard VBE modes (e.g. widescreen modes)
+
 vgabios-0.6b : May 30 2008
   - Volker
     . added PCI data structure for the Cirrus VGABIOS images
Signature · 1 line
1.7.1
#1 lore raw

PATCH RESEND 1/5 - use VBE LFB address from PCI base address if present (rewrite of the cirrus specific function in main vgabios code) - removed unnecessary spaces

In reply to Gerd Hoffmann

From: Volker Ruppert <[email protected]>

---
 clext.c   |   51 ++-------------------------------------------------
 vbe.c     |   59 ++++++++++++++++++++++++++++++++---------------------------
 vgabios.c |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 92 insertions(+), 76 deletions(-)
clext.c +2 -49
index c7a2ad0..b0b6834 100644
@@ -948,7 +948,8 @@ cirrus_vesa_01h_3:
   ;; 32-bit LFB address
   xor ax, ax
   stosw
-  call cirrus_get_lfb_addr
+  mov ax, #0x1013 ;; vendor Cirrus
+  call _pci_get_lfb_addr
   stosw
   or ax, ax
   jz cirrus_vesa_01h_4
@@ -1293,54 +1294,6 @@ cgm_2:
 cgm_3:
   ret
 
-  ; get LFB address
-  ; out - ax:LFB address (high 16 bit)
-  ;; NOTE - may be called in protected mode
-cirrus_get_lfb_addr:
-  push cx
-  push dx
-  push eax
-    xor cx, cx
-    mov dl, #0x00
-    call cirrus_pci_read
-    cmp ax, #0xffff
-    jz cirrus_get_lfb_addr_5
- cirrus_get_lfb_addr_3:
-    mov dl, #0x00
-    call cirrus_pci_read
-    cmp ax, #0x1013 ;; cirrus
-    jz cirrus_get_lfb_addr_4
-    add cx, #0x8
-    cmp cx, #0x200 ;; search bus #0 and #1
-    jb cirrus_get_lfb_addr_3
- cirrus_get_lfb_addr_5:
-    xor dx, dx ;; no LFB
-    jmp cirrus_get_lfb_addr_6
- cirrus_get_lfb_addr_4:
-    mov dl, #0x10 ;; I/O space #0
-    call cirrus_pci_read
-    test ax, #0xfff1
-    jnz cirrus_get_lfb_addr_5
-    shr eax, #16
-    mov dx, ax ;; LFB address
- cirrus_get_lfb_addr_6:
-  pop eax
-  mov ax, dx
-  pop dx
-  pop cx
-  ret
-
-cirrus_pci_read:
-  mov eax, #0x00800000
-  mov ax, cx
-  shl eax, #8
-  mov al, dl
-  mov dx, #0xcf8
-  out dx, eax
-  add dl, #4
-  in  eax, dx
-  ret
-
 ;; out - al:bytes per pixel
 cirrus_get_bpp_bytes:
   push dx
vbe.c +32 -27

183 lines not on this page · raw message

vgabios.c +58 -0

64 lines not on this page · raw message

Signature · 1 line
1.7.1
#2 lore raw

PATCH RESEND 2/5 - added support for a lot more non-standard VBE modes (e.g. widescreen modes) - requires latest Bochs VBE code (16 MB video memory, VBE_DISPI_ID5, VRAM size in 64k pages stored in VBE register) - check if VBE mode is supported with current VRAM size

In reply to Gerd Hoffmann

From: Volker Ruppert <[email protected]>

---
 vbe.c           |   31 ++++++++++++++++++------
 vbe.h           |   70 ++++++++++++++++++++++++++++--------------------------
 vbetables-gen.c |   43 +++++++++++++++++++++++++--------
 3 files changed, 91 insertions(+), 53 deletions(-)
vbe.c +23 -8
index 92e3d0d..ecff90d 100644
@@ -38,8 +38,6 @@
 #include "vbe.h"
 #include "vbetables.h"
 
-#define VBE_TOTAL_VIDEO_MEMORY_DIV_64K (VBE_DISPI_TOTAL_VIDEO_MEMORY_MB*1024/64)
-
 // The current OEM Software Revision of this VBE Bios
 #define VBE_OEM_SOFTWARE_REV 0x0002;
 
@@ -715,7 +713,7 @@ vbe_init:
   mov  [bx], al
   pop  bx
   pop  ds
-  mov  ax, # VBE_DISPI_ID4
+  mov  ax, # VBE_DISPI_ID5
   call dispi_set_id
 no_vbe_interface:
 #if defined(USE_BX_INFO) || defined(DEBUG)
@@ -742,7 +740,19 @@ no_vbe_flag:
   mov  ds, ax
   mov  si, #_no_vbebios_info_string
   jmp  _display_string
-ASM_END  
+
+; helper function for memory size calculation
+
+lmulul:
+  and eax, #0x0000FFFF
+  shl ebx, #16
+  or  eax, ebx
+  SEG SS
+  mul eax, dword ptr [di]
+  mov ebx, eax
+  shr ebx, #16
+  ret
+ASM_END
 
 /** Function 00h - Return VBE Controller Information
  * 
@@ -765,6 +775,7 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
         Bit16u            vbe2_info;
         Bit16u            cur_mode=0;
         Bit16u            cur_ptr=34;
+        Bit16u            size_64k;
         ModeInfoListItem  *cur_info=&mode_info_list;
 
         status = read_word(ss, AX);
@@ -820,8 +831,9 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
         vbe_info_block.VideoModePtr_Seg= ES ;
         vbe_info_block.VideoModePtr_Off= DI + 34;
 
-        // VBE Total Memory (in 64b blocks)
-        vbe_info_block.TotalMemory = VBE_TOTAL_VIDEO_MEMORY_DIV_64K;
+        // VBE Total Memory (in 64k blocks)
+        outw(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_VIDEO_MEMORY_64K);
+        vbe_info_block.TotalMemory = inw(VBE_DISPI_IOPORT_DATA);
 
         if (vbe2_info)
         {
@@ -845,8 +857,11 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
 
         do
         {
+                size_64k = (Bit16u)((Bit32u)cur_info->info.XResolution * cur_info->info.XResolution * cur_info->info.BitsPerPixel) >> 19;
+
                 if ((cur_info->info.XResolution <= dispi_get_max_xres()) &&
-                    (cur_info->info.BitsPerPixel <= dispi_get_max_bpp())) {
+                    (cur_info->info.BitsPerPixel <= dispi_get_max_bpp()) &&
+                    (size_64k <= vbe_info_block.TotalMemory)) {
 #ifdef DEBUG
                   printf("VBE found mode %x => %x\n", cur_info->mode,cur_mode);
 #endif
@@ -855,7 +870,7 @@ Bit16u *AX;Bit16u ES;Bit16u DI;
                   cur_ptr+=2;
                 } else {
 #ifdef DEBUG
-                  printf("VBE mode %x (xres=%x / bpp=%02x) not supported by display\n", cur_info->mode,cur_info->info.XResolution,cur_info->info.BitsPerPixel);
+                  printf("VBE mode %x (xres=%x / bpp=%02x) not supported \n", cur_info->mode,cur_info->info.XResolution,cur_info->info.BitsPerPixel);
 #endif
                 }
                 cur_info++;
vbe.h +36 -34

75 lines not on this page · raw message

vbetables-gen.c +32 -11

59 lines not on this page · raw message

Signature · 1 line
1.7.1
#5 lore raw

PATCH RESEND 5/5 - updates for release 0.6c

In reply to Gerd Hoffmann

From: Volker Ruppert <[email protected]>

---
 ChangeLog |   12 ++++++++++++
 README    |    3 ++-
 2 files changed, 14 insertions(+), 1 deletions(-)
ChangeLog +12 -0
index 35bf00a..dbaed5d 100644
@@ -1,3 +1,15 @@
+2009-04-07 20:18  vruppert
+
+	* vgabios.c (1.69):
+
+	- biosfn_write_teletype: fixed attribute when scrolling in text mode
+
+2009-04-06 20:17  vruppert
+
+	* ChangeLog (1.28), README (1.17):
+
+	- preparing for release 0.6c
+
 2009-01-25 16:46  vruppert
 
 	* vbe.c (1.62), vbe.h (1.28), vbetables-gen.c (1.5):
README +2 -1
index ce67aeb..c68b573 100644
@@ -90,11 +90,12 @@ For any information on qemu, visit the website http://fabrice.bellard.free.fr/qe
 
 History
 -------
-vgabios-0.6c : not yet released
+vgabios-0.6c : Apr 08 2009
   - Volker
     . added DPMS support to cirrus vgabios (patch from Gleb Natapov)
     . use VBE LFB address from PCI base address if present
     . added support for a lot more non-standard VBE modes (e.g. widescreen modes)
+    . minor bugfixes
 
 vgabios-0.6b : May 30 2008
   - Volker
Signature · 1 line
1.7.1