[flashrom] WG: SB600, shutting down IMC failed

Trunzer Markus Markus.Trunzer at kontron.com
Wed Jul 10 17:29:35 CEST 2013

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

-----Ursprüngliche Nachricht-----
Von: Stefan Tauner [mailto:stefan.tauner at student.tuwien.ac.at] 
Gesendet: Mittwoch, 10. Juli 2013 16:26

On Wed, 10 Jul 2013 13:00:43 +0200
Rudolf Marek <r.marek at 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.
> 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" 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

More information about the flashrom mailing list