summaryrefslogtreecommitdiff
path: root/vgasrc
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-03-08 11:42:25 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-15 09:59:25 +0100
commitf4c6e4c19daf3deac2d7fc3288db5294aba955ad (patch)
tree51e48e4a16c1f0145637569e654ff3a967c54169 /vgasrc
parent34b6ecc160749a691b80fcb8638216518d971c65 (diff)
downloadqemu-seabios-f4c6e4c19daf3deac2d7fc3288db5294aba955ad.tar.gz
vga: add ati bios tables
Needed to make drivers happy which try to gather informations from these tables. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/ati-tables.S43
-rw-r--r--vgasrc/vgaentry.S3
2 files changed, 46 insertions, 0 deletions
diff --git a/vgasrc/ati-tables.S b/vgasrc/ati-tables.S
new file mode 100644
index 0000000..cdbde2f
--- /dev/null
+++ b/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/vgasrc/vgaentry.S b/vgasrc/vgaentry.S
index 53be2b3..f9624fc 100644
--- a/vgasrc/vgaentry.S
+++ b/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