On Wed, Dec 24, 2008 at 12:16:14AM +0100, Rudolf Marek wrote:
The K8M890 BIOS needs int 0x15 0x5f18 to write to scratch register for a driver the memory size of framebuffer and also the memory speed. The X.org openchrome driver as well Unichrome driver needs that.
[...]
diff --git a/src/vgahooks.c b/src/vgahooks.c index 7c229ba..86050fd 100644 --- a/src/vgahooks.c +++ b/src/vgahooks.c
[...]
- bdf = pci_find_device(PCI_VENDOR_ID_VIA, 0x3336); /* K8M890 supported so far */
[...]
- bdf = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MEMCTL); /* get the memory speed */
[...]
I think I understand your patch a little bit better now. The first pci device is used to obtain the framebuffer size, and the second device is used to find the ram speed.
Perhaps we should break this into two separate functions - that way it's clear that each device provides independent information. (Something like the attached?)
Also, does unichrome/openchrome drivers need the framebuffer size? It seems odd to me that they'd read a scratch register for that, when they could just as easily read the real register.
-Kevin