<HTML dir=ltr><HEAD><TITLE>Re: [flashrom] Urgent: Flash part would be destroied by flashrom 0.9.2 once manager application is running.</TITLE>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876"></HEAD>
<BODY>
<DIV dir=ltr id=idOWAReplyText87932>Hi Daniel, </DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Thanks for your quick response. Please kindly see my answers with blue texts  as below and share you my experiments today.</DIV>
<DIV dir=ltr>I use AMD HDT hardware ICE to interrupt CPU for examining data on physical address 0xFEC10000 ~ 0xFEC100F used by SPI host controller registers today. They are changed once flashrom is running, and I can also capture SPI opcode commands on 0xFEC10000 address. However, they are fixed even though 3rd application is running. It means that registers are not overwritten by this application. I have added code to set process prority -20 in flashrom, but the failure is still there.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Best regards,</DIV>
<DIV dir=ltr>Hony </DIV>
<DIV dir=ltr>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr><FONT size=2 face=新細明體><B>From:</B> Carl-Daniel Hailfinger [mailto:c-d.hailfinger.devel.2006@gmx.net]<BR><B>Sent:</B> 2010/8/11 [星期三] 下午 09:05<BR><B>To:</B> hony.chiang (江昆仲 - MIC)<BR><B>Cc:</B> flashrom@flashrom.org<BR><B>Subject:</B> Re: [flashrom] Urgent: Flash part would be destroied by flashrom 0.9.2 once manager application is running.<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hi Hony,<BR><BR>we will help you.<BR><BR>On 11.08.2010 04:27, Hony.Chiang@mic.com.tw wrote:<BR>> I get the serious problem on flashrom 0.9.2 on our server systems. We always have to run 3rd party manager application to call up flashrom for BIOS upgrade.<BR><BR>Can you tell us the name of the manager application you are using?</FONT></P>
<P><FONT size=2><FONT color=#0000ff>UpdateXpress System Pack Installer through a graphical user interface (GUI).</FONT></FONT><FONT size=2><FONT color=#0000ff><BR></FONT><A href="http://publib.boulder.ibm.com/infocenter/toolsctr/v1r0/index.jsp?topic=/uxspi/uspi_r_using_compare_update.html">http://publib.boulder.ibm.com/infocenter/toolsctr/v1r0/index.jsp?topic=/uxspi/uspi_r_using_compare_update.html</A></FONT></P><FONT size=2></FONT><FONT size=2>
<P><BR>> However, flashrom would be failed on “Verifying flash” step because some of programmed data in flash part is different with ones in golden ROM image file on random offset addresses. This defect occurs on Red Hat 5 x64, SLES 10 x64 and SLES 11 x64. If I run flashrom tool manually without this 3rd application, it would always flash SPI part successfully.<BR><BR>This is good. It means that flashrom works fine if nothing else accesses<BR>the flash chip.<BR><BR><BR>> Due to the 3rd party application is confidential, it can not be provided to you for defect reproduction.<BR>><BR>><BR>> Q1: May I suspect that expected data that is written to mapped virtual memory space by flashrom is overwritten or interfered by other process from 3rd application before SPI host controller operates these data to SPI ROM?<BR>><BR>> Q2: May I suspect that expected data that is written to mapped virtual memory space by flashrom is not sync to physical memory space immediately when SPI host controller operates these data to SPI ROM?<BR>>  <BR><BR>flashrom does not write to the mapped memory space of the flash chip on<BR>SP5100. flashrom uses only the SPI host controller registers to<BR>read/write. If any other software accesses (read or write) the mapped<BR>memory space of the flash chip or the SPI host controller registers at<BR>the same time, the SPI host controller registers will change in<BR>unexpected ways. This can lead to corruption of the flash chip or<BR>corruption of reads.<BR><BR><BR>> Q3: In order to prevent other process to interfere /dev/mem, mapped virtual memory space or physical memory space that flashrom uses, would you have any idea or some slice codes to lock them during flashrom operation?<BR>>  <BR><BR>Locking under most operating systems is not mandatory, and this means<BR>even if flashrom asks for a lock, all other applications can ignore the<BR>lock. I don't know any application which does locking on /dev/mem<BR>because that might interfere with X.org graphics and other software.<BR><BR><BR>> Q4: Would you have any idea to trace the root cause interfered flashrom?<BR>>  <BR><BR>I wrote a patch which should be able to detect interference from other<BR>applications. I will send it later once it is tested.</P>
<P><FONT color=#0000ff>Thank you. I will try it to give you more inputs.</FONT><BR><BR>> Verbose message:<BR>> Programming flash done.<BR>> COMPLETE.<BR>> Verifying flash... VERIFY FAILED at 0x00017ca4! Expected=0xff, Read=0x25, failed<BR>> byte count from 0x00000000-0x003fffff: 0x3a<BR>><BR>> Syntax:<BR>> ./flashrom –w 24a.rom<BR>><BR>> Hardware configuration:<BR>> MB: AMD platform solution<BR>> South Bridge: AMD SP5100<BR>> Flash part: ST M25P32<BR>><BR>> NOS:<BR>> Reg Hat 5 X86_X64<BR>> SLES 10 X86_X64<BR>> SLES 11 X86_X64<BR>>  <BR><BR>Could you please send the output of "flashrom -V" so I can check the<BR>contents of some SP5100 registers? Thanks.<BR><FONT color=#0000ff>I will capture message with -V parameter on my lab tomorrow, and will provide you output.</FONT><BR>Regards,<BR>Carl-Daniel<BR><BR>--<BR><A href="http://www.hailfinger.org/">http://www.hailfinger.org/</A><BR><BR></P></FONT></DIV><br>
NOTICE TO RECIPIENT:  THIS E-MAIL IS  MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, AND MAY BE A COMMUNICATION PRIVILEGED BY LAW.  IF YOU RECEIVED THIS E-MAIL IN ERROR, ANY REVIEW, USE, DISSEMINATION, DISTRIBUTION, OR COPYING OF THIS E-MAIL IS STRICTLY PROHIBITED.  PLEASE NOTIFY ME IMMEDIATELY OF THE ERROR BY RETURN E-MAIL AND PLEASE DELETE THIS MESSAGE FROM YOUR SYSTEM. THANK YOU IN ADVANCE FOR YOUR COOPERATION.</BODY></HTML>