On Wed, 10 Jul 2013 13:00:43 +0200 Rudolf Marek r.marek@assembler.cz wrote:
Please can you provide the debug output too (i think it is -VVV)? I'm CCing Stefan he did this patch.
I guess it might be that IMC runs but firmware does not ack the command. This may happen if IMC strap is enabled but no firmware is in BIOS, or if firmware crashed.
Lets see what is in the debug output.
So... you got mail from Markus too... :) Markus: that's exactly why I said I would prefer the mailing list.
Let's continue there. Markus: you should be able to just cc to the mailing list even if you are not subscribed (someone has to moderate this once) and I have put it into CC in this mail.
Markus sent me this log of what seems to be vanilla r1563 + patch 3967:
flashrom v0.9.6.1-r1563 on Linux 3.0.1pae (i686) flashrom was built with libpci 3.1.7, GCC 4.4.5, little endian Command line (4 args): flashrom -p internal:amc_imc_force=yes -o log.txt Calibrating delay loop... OS timer resolution is 1 usecs, 824M loops per second, 10 myus = 10 us, 100 myus = 101 us, 1000 myus = 999 us, 10000 myus = 10003 us, 4 myus = 5 us, OK. Initializing internal programmer No coreboot table found. DMI string system-manufacturer: "To be filled by O.E.M." DMI string system-product-name: "To be filled by O.E.M." DMI string system-version: "To be filled by O.E.M." DMI string baseboard-manufacturer: "abc" DMI string baseboard-product-name: "test" DMI string baseboard-version: "1.1.0" DMI string chassis-type: "Desktop" Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write... IMC SIO is at 0x6e. IMC MBOX is at 0x3e. Shutting down IMC failed. FAILED! FATAL ERROR! Unhandled programmer parameters: amc_imc_force=yes Error: Programmer initialization failed.
Apart from the obvious typo this means that mbox_wait_ack returned a positive value which happens only in the case of a timeout... and in that case we should see "IMC MBOX: Timeout!" i the log but we don't!
Then we talked about applying Rudolf's patch to see if my refinements broke something.
ich möchte nur kurz sicherstellen, dass ich auch die richtigen Ausgangs-Sourcen verwende: flashrom_0.9.6.1+r1563.orig.tar.gz. Ist dieses Paket korrekt? (in der Beschreibung von Patch 3894 war einmal die Rede von r1564.
Diese Sourcen (ohne eine andere Änderung) habe ich mit patch 3894 "patch < AMD---SP5100---take-SPI-ownership-1-2.patch modifiziert.
Folgende Fehlermeldung erscheint beim Kompilieren mit make: chipset_enable.o: In function "enable_flash_sb600": chipset_enable.c:(.text+0x13e8) : undefined reference to "imc_try_shutdown" collect2: ld returned 1 exit status
Either patching or compiling did not work as intended. I have tried to reproduce the problem with my git tree reset to "Increase flashrom release number to 0.9.6.1" aka r1563 and apply patch 3894. This worked fine (more or less): patch < AMD---SP5100---take-SPI-ownership-1-2.patch patching file Makefile Hunk #1 succeeded at 379 (offset -38 lines). patching file imc.c patching file chipset_enable.c Hunk #1 succeeded at 839 (offset -83 lines). patching file sb600spi.c patching file programmer.h Hunk #1 succeeded at 563 with fuzz 2 (offset 4 lines).
But r1563 does not contain msg_pwarn which was introduced in r1643, so I really don't think it makes much sense to continue there anyway. But in any case your result should be different to what you got...
Habe nun die flashrom_0,9.6.1+r1564-Sourcen gefunden und diese mit patch 3894 modifiziert: => keine Fehlermeldung beim Patchen. Kompilieren klappte ebenfalls.
I don't think that to be honest, see above.
Applying patch 3894 to r1643 and compilation worked fine, maybe you wanna try that. But I think Rudolf might be able to tell us something from the log at the top. In any case please do *always* use at least -VV in all flashrom invocations so that we get useful output!
positive value which happens only in the case of a timeout... and in that case we should see "IMC MBOX: Timeout!" i the log but we don't!
Yes I also don't see how it could not be printed? Mayba Markus can modify the code and add there a printf to see if it is reached.
Thanks Rudolf
Thanks for the information.
"Applying patch 3894 to r1643" => that means I have to update the flashrom v0.9.6.1-r1564 (taken from http://flashrom.org/Flashrom/0.9.6) manually (I couldn't find a patch-file) with these modifications http://www.flashrom.org/pipermail/flashrom/2013-January/010405.html ? And afterwards I can patch it with the 3894-patch? Is that the correct way?
Best regards Markus_T
-----Ursprüngliche Nachricht----- Von: Stefan Tauner [mailto:stefan.tauner@student.tuwien.ac.at] Gesendet: Mittwoch, 10. Juli 2013 16:26
On Wed, 10 Jul 2013 13:00:43 +0200 Rudolf Marek r.marek@assembler.cz wrote:
Please can you provide the debug output too (i think it is -VVV)? I'm CCing Stefan he did this patch.
I guess it might be that IMC runs but firmware does not ack the command. This may happen if IMC strap is enabled but no firmware is in BIOS, or if firmware crashed.
Lets see what is in the debug output.
So... you got mail from Markus too... :) Markus: that's exactly why I said I would prefer the mailing list.
Let's continue there. Markus: you should be able to just cc to the mailing list even if you are not subscribed (someone has to moderate this once) and I have put it into CC in this mail.
Markus sent me this log of what seems to be vanilla r1563 + patch 3967:
flashrom v0.9.6.1-r1563 on Linux 3.0.1pae (i686) flashrom was built with libpci 3.1.7, GCC 4.4.5, little endian Command line (4 args): flashrom -p internal:amc_imc_force=yes -o log.txt Calibrating delay loop... OS timer resolution is 1 usecs, 824M loops per second, 10 myus = 10 us, 100 myus = 101 us, 1000 myus = 999 us, 10000 myus = 10003 us, 4 myus = 5 us, OK. Initializing internal programmer No coreboot table found. DMI string system-manufacturer: "To be filled by O.E.M." DMI string system-product-name: "To be filled by O.E.M." DMI string system-version: "To be filled by O.E.M." DMI string baseboard-manufacturer: "abc" DMI string baseboard-product-name: "test" DMI string baseboard-version: "1.1.0" DMI string chassis-type: "Desktop" Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write... IMC SIO is at 0x6e. IMC MBOX is at 0x3e. Shutting down IMC failed. FAILED! FATAL ERROR! Unhandled programmer parameters: amc_imc_force=yes Error: Programmer initialization failed.
Apart from the obvious typo this means that mbox_wait_ack returned a positive value which happens only in the case of a timeout... and in that case we should see "IMC MBOX: Timeout!" i the log but we don't!
Then we talked about applying Rudolf's patch to see if my refinements broke something.
ich möchte nur kurz sicherstellen, dass ich auch die richtigen Ausgangs-Sourcen verwende: flashrom_0.9.6.1+r1563.orig.tar.gz. Ist dieses Paket korrekt? (in der Beschreibung von Patch 3894 war einmal die Rede von r1564.
Diese Sourcen (ohne eine andere Änderung) habe ich mit patch 3894 "patch < AMD---SP5100---take-SPI-ownership-1-2.patch modifiziert.
Folgende Fehlermeldung erscheint beim Kompilieren mit make: chipset_enable.o: In function "enable_flash_sb600": chipset_enable.c:(.text+0x13e8) : undefined reference to "imc_try_shutdown" collect2: ld returned 1 exit status
Either patching or compiling did not work as intended. I have tried to reproduce the problem with my git tree reset to "Increase flashrom release number to 0.9.6.1" aka r1563 and apply patch 3894. This worked fine (more or less): patch < AMD---SP5100---take-SPI-ownership-1-2.patch patching file Makefile Hunk #1 succeeded at 379 (offset -38 lines). patching file imc.c patching file chipset_enable.c Hunk #1 succeeded at 839 (offset -83 lines). patching file sb600spi.c patching file programmer.h Hunk #1 succeeded at 563 with fuzz 2 (offset 4 lines).
But r1563 does not contain msg_pwarn which was introduced in r1643, so I really don't think it makes much sense to continue there anyway. But in any case your result should be different to what you got...
Habe nun die flashrom_0,9.6.1+r1564-Sourcen gefunden und diese mit patch 3894 modifiziert: => keine Fehlermeldung beim Patchen. Kompilieren klappte ebenfalls.
I don't think that to be honest, see above.
Applying patch 3894 to r1643 and compilation worked fine, maybe you wanna try that. But I think Rudolf might be able to tell us something from the log at the top. In any case please do *always* use at least -VV in all flashrom invocations so that we get useful output!
-- Kind regards/Mit freundlichen Grüßen, Stefan Tauner
On Wed, 10 Jul 2013 17:29:35 +0200 "Trunzer Markus" Markus.Trunzer@kontron.com wrote:
Thanks for the information.
"Applying patch 3894 to r1643" => that means I have to update the flashrom v0.9.6.1-r1564 (taken from http://flashrom.org/Flashrom/0.9.6) manually (I couldn't find a patch-file) with these modifications http://www.flashrom.org/pipermail/flashrom/2013-January/010405.html ? And afterwards I can patch it with the 3894-patch? Is that the correct way?
In general I would recommend that you either use subversion or git for this kind of work, but we do have an archive with snapshots too: http://download.flashrom.org/snapshots/ These contain the complete source of the respective revision and you can apply the patch mentioned to the source in http://download.flashrom.org/snapshots/flashrom-0.9.6.1-r1643.tar.bz2
Hello again, I used this source code http://download.flashrom.org/snapshots/flashrom-0.9.6.1-r1643.tar.bz2 and patched it with patch 3894 "patch<AMD---SP5100---take-SPI-ownership-1-2.patch". The patching and compiling was without errors.
The execution of flashrom with "flashrom -VVV -p internal:amd_imc_force=yes" resulted in following error message.
flashrom v0.9.6.1-r1643 on Linux 3.0.1pae (i686) flashrom is free software, get the source code at http://www.flashrom.org
flashrom was built with libpci 3.1.7, GCC 4.4.5, little endian Command line (3 args): flashrom -VVV -p internal:amd_imc_force=yes Calibrating delay loop... OS timer resolution is 1 usecs, 824M loops per second, 10 myus = 11 us, 100 myus = 100 us, 1000 myus = 1000 us, 10000 myus = 10008 us, 4 myus = 4 us, OK. Initializing internal programmer No coreboot table found. DMI string system-manufacturer: "To be filled by O.E.M." DMI string system-product-name: "To be filled by O.E.M." DMI string system-version: "To be filled by O.E.M." DMI string baseboard-manufacturer: "abc" DMI string baseboard-product-name: "123" DMI string baseboard-version: "1.1.0" DMI string chassis-type: "Desktop" Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write... EC SIO is at 0x6e EC MBOX is at 0x3e (Shutting down IMC failed!) FAILED!
Do you have an idea what the problem could be?
Many thanks in advance.
Best regards Markus_T
Thanks for the information.
"Applying patch 3894 to r1643" => that means I have to update the flashrom v0.9.6.1-r1564 (taken from http://flashrom.org/Flashrom/0.9.6) manually (I couldn't find a patch-file) with these modifications http://www.flashrom.org/pipermail/flashrom/2013-January/010405.html ? And afterwards I can patch it with the 3894-patch? Is that the correct way?
In general I would recommend that you either use subversion or git for this kind of work, but we do have an archive with snapshots too: http://download.flashrom.org/snapshots/ These contain the complete source of the respective revision and you can apply the patch mentioned to the source in http://download.flashrom.org/snapshots/flashrom-0.9.6.1-r1643.tar.bz2 -- Kind regards/Mit freundlichen Grüßen, Stefan Tauner
On Thu, 11 Jul 2013 12:24:47 +0200 "Trunzer Markus" Markus.Trunzer@kontron.com wrote:
Hello again, I used this source code http://download.flashrom.org/snapshots/flashrom-0.9.6.1-r1643.tar.bz2 and patched it with patch 3894 "patch<AMD---SP5100---take-SPI-ownership-1-2.patch". The patching and compiling was without errors.
The execution of flashrom with "flashrom -VVV -p internal:amd_imc_force=yes" resulted in following error message.
flashrom v0.9.6.1-r1643 on Linux 3.0.1pae (i686) flashrom is free software, get the source code at http://www.flashrom.org
flashrom was built with libpci 3.1.7, GCC 4.4.5, little endian Command line (3 args): flashrom -VVV -p internal:amd_imc_force=yes Calibrating delay loop... OS timer resolution is 1 usecs, 824M loops per second, 10 myus = 11 us, 100 myus = 100 us, 1000 myus = 1000 us, 10000 myus = 10008 us, 4 myus = 4 us, OK. Initializing internal programmer No coreboot table found. DMI string system-manufacturer: "To be filled by O.E.M." DMI string system-product-name: "To be filled by O.E.M." DMI string system-version: "To be filled by O.E.M." DMI string baseboard-manufacturer: "abc" DMI string baseboard-product-name: "123" DMI string baseboard-version: "1.1.0" DMI string chassis-type: "Desktop" Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write... EC SIO is at 0x6e EC MBOX is at 0x3e (Shutting down IMC failed!) FAILED!
Do you have an idea what the problem could be?
I have no idea what the underlying problem is, but can it be that you did only paste the output to stdout and not to stderr (which can happen if you redirect the output of flashrom with ">/some/logfile" instead of using the -o option or directing with ">/some/logfile 2>&1")?
I am asking because I am pretty sure that there is "IMC MBOX: Timeout!" in the original output (to stderr). And in that case it is clearly not an error introduced by me refinement of the patch, and I would like to continue/test/fix my current version (3979) on top of current HEAD (or at least r1680) instead of the original one, because we want to merge the new version eventually of course.
Can you tell us more about your system's firmware? Should the IMC be active and responsive?
Rudolf: Let's assume the IMC is set up but does not respond in time (btw I guess a longer timeout won't help? how did you choose the timeout value?), should we bail out like we do or presume that it is ok to write to flash? I guess it could make quite a lot of sense to be able to rewrite the IMC image in case the current image is broken (and hence does not respond to shutdown requests :) but this hopefully wont happen on end user systems. Also, note my comments in the refinement patch about IMCEnable and EcEnable. Do you have any opinion/knowledge about that?
Hello together, I'm very sorry...I didn't verified the output at the display and the logfile content. Yes, your absolutely right, the message "IMC MBOX: Timeout!" is printed after the line "EC MBOX is at 0x3e". And at the end there are 3 more lines:
"FATAL ERROR! Unhandled programmer parameters: amd_imc_force=yes Error: Programmer initialization failed."
Best regards Markus_T
-----Ursprüngliche Nachricht----- Von: Stefan Tauner [mailto:stefan.tauner@student.tuwien.ac.at] Gesendet: Donnerstag, 11. Juli 2013 13:31 An: Trunzer Markus Cc: flashrom@flashrom.org; Rudolf Marek Betreff: Re: [flashrom] WG: SB600, shutting down IMC failed
On Thu, 11 Jul 2013 12:24:47 +0200 "Trunzer Markus" Markus.Trunzer@kontron.com wrote:
Hello again, I used this source code http://download.flashrom.org/snapshots/flashrom-0.9.6.1-r1643.tar.bz2 and patched it with patch 3894 "patch<AMD---SP5100---take-SPI-ownership-1-2.patch". The patching and compiling was without errors.
The execution of flashrom with "flashrom -VVV -p internal:amd_imc_force=yes" resulted in following error message.
flashrom v0.9.6.1-r1643 on Linux 3.0.1pae (i686) flashrom is free software, get the source code at http://www.flashrom.org
flashrom was built with libpci 3.1.7, GCC 4.4.5, little endian Command line (3 args): flashrom -VVV -p internal:amd_imc_force=yes Calibrating delay loop... OS timer resolution is 1 usecs, 824M loops per second, 10 myus = 11 us, 100 myus = 100 us, 1000 myus = 1000 us, 10000 myus = 10008 us, 4 myus = 4 us, OK. Initializing internal programmer No coreboot table found. DMI string system-manufacturer: "To be filled by O.E.M." DMI string system-product-name: "To be filled by O.E.M." DMI string system-version: "To be filled by O.E.M." DMI string baseboard-manufacturer: "abc" DMI string baseboard-product-name: "123" DMI string baseboard-version: "1.1.0" DMI string chassis-type: "Desktop" Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write... EC SIO is at 0x6e EC MBOX is at 0x3e (Shutting down IMC failed!) FAILED!
Do you have an idea what the problem could be?
I have no idea what the underlying problem is, but can it be that you did only paste the output to stdout and not to stderr (which can happen if you redirect the output of flashrom with ">/some/logfile" instead of using the -o option or directing with ">/some/logfile 2>&1")?
I am asking because I am pretty sure that there is "IMC MBOX: Timeout!" in the original output (to stderr). And in that case it is clearly not an error introduced by me refinement of the patch, and I would like to continue/test/fix my current version (3979) on top of current HEAD (or at least r1680) instead of the original one, because we want to merge the new version eventually of course.
Can you tell us more about your system's firmware? Should the IMC be active and responsive?
Rudolf: Let's assume the IMC is set up but does not respond in time (btw I guess a longer timeout won't help? how did you choose the timeout value?), should we bail out like we do or presume that it is ok to write to flash? I guess it could make quite a lot of sense to be able to rewrite the IMC image in case the current image is broken (and hence does not respond to shutdown requests :) but this hopefully wont happen on end user systems. Also, note my comments in the refinement patch about IMCEnable and EcEnable. Do you have any opinion/knowledge about that? -- Kind regards/Mit freundlichen Grüßen, Stefan Tauner