Hi Matt, so I compared the AtomDis dumps for iGPU ROMs ( yours vs mine ). There are some differences at " data_table 0000aae6 #06 (LVDS_Info): ", sLCDTiming structure: usPixClk ( 0x1b12 vs 0x1c41 ), usHBlanking_Time ( 0x0070 vs 0x00a0 ), usVBlanking_Time ( 0x000e vs 0x0016 ), usHSyncOffset ( 0x0020 vs 0x0030 ), usVSyncWidth ( 0x0004 vs 0x0005 ), usImageHSize ( 0x0159 vs 0x0158 ). Also, some differences at " data_table 0000b1b8 #1e (IntegratedSystemInfo): " : usNBP0Voltage ( 0x4c vs 0x4a ) and usNBP1Voltage ( 0x4e vs 0x4c ) - your values are slightly higher, and some of your usVoltageID values are also slightly higher (0x72 vs 0x70, 0x4e vs 0x4c, 0x48 vs 0x46, 0x42 vs 0x40, 0x42 vs 0x40). Finally, nearby there is also one different ulReserved3 ( 0x00760050 vs 0x0074004e ) - I don't know what this reserved value means, but perhaps it's also related to the voltages or power control.
What is interesting, at our messages [*] there also was a difference at usNBP0Voltage and usNBP1Voltage values: 0x4a vs 0x48 and 0x4c vs 0x4a , but these and your other voltage values are even slightly more higher than this, 2 points higher. Now I think that maybe these values are changing in runtime: while there is a higher CPU load (e.g. while I was reading a lot of RAM with Belkasoft RAM capturer to later extract the AtomBIOS ROMs from it), the performance of GPU could automatically decrease by slightly lowering the voltage, in order to fit the whole APU into 35 Watts TDP.
1) It will be great if you could test this theory by running some CPU-intensive program and dumping the AtomBIOS ROM while it's running.
I still don't know why your sLCDTiming structure is different. Is it also a variable value not tied to the specific hardware, or maybe you have a slightly different LCD panel - which I have never encountered before - and it has a slightly different settings?
2) It will be interesting if you could build a coreboot with my version of iGPU ROM, to see if there are any problems with your screen image.
Hope you could complete "1)" and "2)" quests when you have some free time ;-)
Best regards, Mike Banon
P.S. It could be that a few diffs, e.g. a couple of tiny diffs at the beginning, may have gone unnoticed while using AtomDis :P
[*] https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/GZNWI...
On Mon, May 6, 2019 at 8:49 PM Mike Banon mikebdp2@gmail.com wrote:
Hi, Matt! Thank you very much for your research. Yes, I confirm that the ROMs provided my patch [1] ( installed by ./atombios.sh from this wiki [3] ) have been obtained from two G505S: one with HD 8570M dGPU and another with R5 M230 dGPU ; and the iGPU ROM of this patch is "from G505S with R5 M230", with the differences outlined in our messages [4] . I don't have a G505S without a discrete GPU - so couldn't get its' iGPU ROM version from it by myself. However: the build with my ("from G505S with R5 M230") integrated GPU ROM version, discrete GPU ROMs and also the dGPU patches - has been tested by /u/QubesN00b at [2] thread - and no problems observed.
Maybe these differences at iGPU are related to dGPU, since these GPUs were meant to be working together in a Crossfire? Thank you for submitting your ROM, a bit later I'm going to use AtomDis to try to figure out what are these differences and report back. Hopefully these differences aren't significant and this iGPU ROM "from G505S with R5 M230" really could be used by everyone without any downsides (also because I don't want to overcomplicate my patches with multiple ROM versions for the same iGPU)
Best regards, Mike Banon
[1] https://review.coreboot.org/c/coreboot/+/31944 [2] https://www.reddit.com/r/coreboot/comments/ar8v7d/if_your_g505s_does_not_hav... [3] http://dangerousprototypes.com/docs/Lenovo_G505S_hacking [4] https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/GZNWI...
On Sun, May 5, 2019 at 11:34 PM Matt B matthewwbradley6@gmail.com wrote:
Greetings,
Because it's always good to check, I extracted the discrete GPU's vgabios rom from my G505s following method 3 ("Retrieval via Linux kernel") listed here: [1] I have no dGPU, and I assume that it was discovered that this produces a clean (correct) iGPU rom blob. Not that I wrote a '1' to the file first to enable reading, as noted here: [2] I compared the files using tkdiff in hexdump format. See attachments for the files.
Comparing the file that I extracted and pci1002,990b.rom from [3] (obtained via "./atombios.sh") they are definitely very similar, but there are many spots with discrepancies. The diff output is at the end of this email. Along the way I had to take the file from the patch and turn it back into a binary and then hexdump it with the same options to make sure they had the same formatting.
It was noted in [4] that there were some differences between the vgabios roms used for integrated GPUs in laptops with and without discrete ones, specifically with regard to supply voltage. Can anyone confirm that the version supplied via the patch is the one from laptops with a discrete GPU, and that what I have matches what would be expected for a dGPU-less laptop? Is there a hash of the rom itself somewhere to point to?
Sincerely, -Matt
Attachments: extracted_vgabios.rom => the rom I extracted myself extracted_vgabios.rom.txt => the result of "hexdump -C extracted_vgabios.rom" pci1002,990b.rom.txt => the rom from the patch (received along with 6663 and 6665) pci1002,990b.rom.txt.rom => the result of "cat pci1002,990b.rom.txt | xxd -r" pci1002,990b.rom.txt.rom.txt => the result of hexdumping pci1002,990b.rom.txt.rom as above
Checksums: 0c0543a28677baa75c49616e5fe326a413f779e77764f8a6dd13c798d3b076ee extracted_vgabios.rom 0515b8cbf184fbfba13ae48d70b1c5ae05405dd709e0eef2291c6d8a4a587287 pci1002,6663.rom.txt 416c748e5ad538593003e47a484067d7cbb509ddff7de079f5603b6d135898bf pci1002,6665.rom.txt c35f469b56c41385b0196c0c9df6599ef9e81e32078da2dd3cf81760c9bd3365 pci1002,990b.rom.txt
References: [1] https://coreboot.coreboot.narkive.com/zEkIcuSS/ultimate-vgabios-extraction-n... [2] https://www.coreboot.org/VGA_support [3] http://dangerousprototypes.com/docs/Lenovo_G505S_hacking [4] https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/GZNWI...
Diff results: $ diff extracted_vgabios.rom.txt pci1002,990b.rom.txt.rom.txt 3c3
< 00000020 4d 49 00 00 00 00 00 00 00 00 00 00 00 00 00 04 |MI..............|
00000020 4d d3 00 00 00 00 00 00 00 00 00 00 00 00 00 04 |M...............|
27c27
< 000001a0 34 03 08 00 00 30 02 10 0b 99 b4 01 a4 a5 4a a6 |4....0........J.|
000001a0 34 03 08 00 00 40 02 10 0b 99 b4 01 a4 a5 4a a6 |4....@........J.|
2735,2736c2735,2736 < 0000aae0 00 00 00 00 00 00 d1 00 01 03 12 1b 56 05 70 00 |............V.p.|
< 0000aaf0 00 03 0e 00 20 00 20 00 02 00 04 00 59 01 c2 00 |.... . .....Y...|
0000aae0 00 00 00 00 00 00 d1 00 01 03 41 1c 56 05 a0 00 |..........A.V...| 0000aaf0 00 03 16 00 30 00 20 00 02 00 05 00 58 01 c2 00 |....0. .....X...|
2841c2841
< 0000b200 06 00 00 00 00 00 00 00 4c 00 4e 00 03 00 74 01 |........L.N...t.|
0000b200 06 00 00 00 00 00 00 00 4a 00 4c 00 03 00 74 01 |........J.L...t.|
2848,2850c2848,2850 < 0000b290 00 00 72 00 32 89 00 00 01 00 4e 00 56 d0 00 00 |..r.2.....N.V...| < 0000b2a0 02 00 48 00 40 19 01 00 03 00 42 00 40 19 01 00 |..H.@.....B.@...|
< 0000b2b0 03 00 42 00 8b 1e 00 00 70 11 01 00 00 00 00 00 |..B.....p.......|
0000b290 00 00 70 00 32 89 00 00 01 00 4c 00 56 d0 00 00 |..p.2.....L.V...| 0000b2a0 02 00 46 00 40 19 01 00 03 00 40 00 40 19 01 00 |..F.@.....@.@...| 0000b2b0 03 00 40 00 8b 1e 00 00 70 11 01 00 00 00 00 00 |..@.....p.......|
2855c2855
< 0000b300 80 38 01 00 80 38 01 00 14 82 00 00 50 00 76 00 |.8...8......P.v.|
0000b300 80 38 01 00 80 38 01 00 14 82 00 00 4e 00 74 00 |.8...8......N.t.|
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org