qemu/vga-add-ati-bios-tables.patch
Bruce Rogers 0f796dd004 Accepting request 730437 from Virtualization:Staging
Update to v4.1.0. Also includes other major packaging changes as follows:
There is a new package maintenance workflow - see README.PACKAGING for details.
The sibling packages qemu-linux-user and qemu-testsuite are now created with the Build Service's MultiBuild feature. This also necessitates combining the qemu-linux-user changelog content back into qemu's. Luckily the delta there is quite small. Note that the qemu spec file is now that much busier, but added section markers should help reduce the confusion. Also qemu is being enabled for RISCV host compatibility, so some changes are related to that as well.

OBS-URL: https://build.opensuse.org/request/show/730437
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=487
2019-09-12 15:54:03 +00:00

80 lines
2.0 KiB
Diff

From: Gerd Hoffmann <kraxel@redhat.com>
Date: Fri, 8 Mar 2019 11:42:25 +0100
Subject: vga: add ati bios tables
Git-commit: f4c6e4c19daf3deac2d7fc3288db5294aba955ad
Needed to make drivers happy which try to gather
informations from these tables.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
vgasrc/ati-tables.S | 43 +++++++++++++++++++++++++++++++++++++++++++
vgasrc/vgaentry.S | 3 +++
2 files changed, 46 insertions(+)
diff --git a/roms/seabios/vgasrc/ati-tables.S b/roms/seabios/vgasrc/ati-tables.S
new file mode 100644
index 0000000000000000000000000000000000000000..cdbde2fa4aec74f62da898be8b79e4a7c16f6c11
--- /dev/null
+++ b/roms/seabios/vgasrc/ati-tables.S
@@ -0,0 +1,43 @@
+//
+// Fake ati bios tables.
+//
+// aty128fb and radeonfb try to gather informations from these tables,
+// so add some stuff here to make the drivers happy. Specifically
+// radeonfb needs the pll information, otherwise it'll crash with a
+// division by zero ...
+//
+ .org 0x48
+ .word _ati_main
+
+ // main info
+ .org 0x50
+_ati_main:
+ .org 0x50 + 0x30
+ .word _ati_pll
+ .org 0x50 + 0x50
+ .word _ati_connector
+
+ // pll info
+ .org 0x100
+_ati_pll:
+ .word 0 // ??? (not used by radeonfb)
+ .word 0
+ .word 0
+ .word 0
+ .word 23000 // sclk
+ .word 23000 // mclk
+ .word 0
+ .word 2700 // ref_clk
+ .word 4 // ref_div
+ .long 12000 // ppll_min
+ .long 35000 // ppll_max
+
+ // connector info
+ .org 0x140
+_ati_connector:
+ .byte 0x10 // one chip
+ .byte 0x01 // one connector
+ .word 0x3000 // type DVI-I
+ .word 0 // end of list
+
+ .org 0x200
diff --git a/roms/seabios/vgasrc/vgaentry.S b/roms/seabios/vgasrc/vgaentry.S
index 53be2b38ca520c691a4fde927bd8..f9624fce2ed9c570d6283b2905f4 100644
--- a/roms/seabios/vgasrc/vgaentry.S
+++ b/roms/seabios/vgasrc/vgaentry.S
@@ -40,6 +40,9 @@ _rom_header_other2:
_rom_header_signature:
.asciz "IBM"
+#if CONFIG_VGA_ATI
+#include "ati-tables.S"
+#endif
/****************************************************************
* Entry points