xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RFC] gfx_passthru: warning when vgabios rom has invalid checksum
@ 2010-02-22  5:45 Noboru Iwamatsu
  2010-02-22  7:21 ` Weidong Han
  0 siblings, 1 reply; 11+ messages in thread
From: Noboru Iwamatsu @ 2010-02-22  5:45 UTC (permalink / raw)
  To: weidong.han, xen-devel, Ian.Jackson

[-- Attachment #1: Type: text/plain, Size: 659 bytes --]

Hi,

According to the "PCI Firmware Spec Rev 3.0",
the system firmware have to write the new checksum after resizing
the expansion ROM area.

So, when re-using the shadowed VGABIOS, the checksum must
be valid, and if it is invalid, we should consider the BIOS has
a bug or memory area is corrupted.

This patch just add the warning message when checksum requires
recalculation.

I tried this following environments.

Intel DX58SO + GeForce GTS250:	checksum is OK.
Intel DX58SO + GeForce 9600GT:	checksum is OK.
Fujitsu Q35 M/B + IGD:		checksum is bad.

What do you think, Weidong?
Is just warning enough? Or, should we stop loading the rom?

Regards,
Noboru.

[-- Attachment #2: vgabios-checksum-warn.patch --]
[-- Type: text/plain, Size: 464 bytes --]

diff --git a/hw/pass-through.c b/hw/pass-through.c
index ecb3d6f..fadd358 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -4262,7 +4262,10 @@ static int setup_vga_pt(void)
     for ( c = (char*)bios; c < ((char*)bios + bios_size); c++ )
         checksum += *c;
     if ( checksum )
+    {
         bios[bios_size - 1] -= checksum;
+        PT_LOG("vga bios checksum is adjusted!\n");
+    }
 
     cpu_physical_memory_rw(0xc0000, bios, bios_size, 1);
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-02-25  5:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-22  5:45 [PATCH][RFC] gfx_passthru: warning when vgabios rom has invalid checksum Noboru Iwamatsu
2010-02-22  7:21 ` Weidong Han
2010-02-22  8:00   ` Noboru Iwamatsu
2010-02-22  8:56     ` Weidong Han
2010-02-22  9:47       ` Noboru Iwamatsu
2010-02-22 10:08         ` Weidong Han
2010-02-23 17:59           ` Ian Jackson
2010-02-24  1:34             ` Noboru Iwamatsu
2010-02-24  2:50               ` Weidong Han
2010-02-25  4:54                 ` Noboru Iwamatsu
2010-02-25  5:53                   ` Weidong Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).