From: Kevin O'C. <ke...@ko...> - 2008-12-21 04:45:15
|
On Sun, Dec 21, 2008 at 04:10:33AM +0000, Michael Brown wrote: > On Sunday 21 December 2008 03:57:37 Kevin O'Connor wrote: > > The bios that comes with kvm doesn't recheck the checksum after the > > init function, and so it shows the rom in the network boot menu > > anyway. (I confirmed it was wrong under kvm bios too by dumping > > memory and manually checksuming it.) SeaBIOS is a bit more picky - > > however, I think this is a bug in gpxe - it should be recalculating > > its checksum. > > gPXE does recalculate its checksum at the end of option ROM initialisation, if > it modifies itself (which will happen iff PMM allocation succeeds). I'm pretty sure it is modifying itself: $ hexdump -C 10ec8139.rom > 10ec8139.rom.hex $ hexdump -C mem1 > mem1.hex $ diff -u 10ec8139.rom.hex mem1.hex --- 10ec8139.rom.hex 2008-12-20 23:36:02.000000000 -0500 +++ mem1.hex 2008-12-20 23:39:10.000000000 -0500 @@ -5,7 +5,7 @@ 00000040 00 f2 00 00 00 00 58 00 6d 00 02 00 00 f4 00 00 |......X.m.......| 00000050 00 00 1b 03 00 00 00 00 68 74 74 70 3a 2f 2f 65 |........http://e| 00000060 74 68 65 72 62 6f 6f 74 2e 6f 72 67 00 67 50 58 |therboot.org.gPX| -00000070 45 00 28 50 43 49 20 78 78 3a 78 78 2e 78 29 00 |E.(PCI xx:xx.x).| +00000070 45 20 28 50 43 49 20 46 30 3a 30 30 2e 30 29 00 |E (PCI F0:00.0).| 00000080 55 4e 44 49 16 70 00 00 01 02 d1 03 d8 2c d8 2c |UNDI.p.......,.,| 00000090 36 07 50 43 49 52 60 1e 06 0f a0 0f a8 fc 0e 1f |6.PCIR`.........| 000000a0 8e eb 89 fb be b2 02 31 ff e8 d3 03 e8 05 04 bf |.......1........| @@ -52,7 +52,7 @@ 00000330 be 7a 03 e8 49 01 bb 42 df e8 d8 00 9c 31 ff e8 |.z..I..B.....1..| 00000340 93 01 be 7e 03 e8 37 01 9d 75 04 0e e8 32 00 2e |...~..7..u...2..| 00000350 66 a1 60 03 66 85 c0 74 05 2e ff 2e 60 03 cd 18 |f.`.f..t....`...| -00000360 00 00 00 00 50 72 65 73 73 20 42 20 74 6f 20 62 |....Press B to b| +00000360 f2 e6 00 f0 50 72 65 73 73 20 42 20 74 6f 20 62 |....Press B to b| 00000370 6f 6f 74 20 66 72 6f 6d 20 00 2e 2e 2e 00 0a 0a |oot from .......| 00000380 00 0e 1f be 6d 00 31 ff e8 f4 00 be bc 03 e8 ee |....m.1.........| 00000390 00 66 68 4c 52 45 54 8c d2 89 e5 31 c0 8e d0 bc |.fhLRET....1....| You can generate "mem1" by launching kvm with "-option-rom 10ec8139.rom", then wait for the "Press F12 for boot menu" prompt, then press F12, then hit ctrl+alt+2 and type "memsave 0xd0000 51712 mem1". -Kevin |