<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=big5">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Re: [flashrom] Urgent: Flash part would be destroied by flashrom 0.9.2
once manager application is running.</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceType"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PlaceName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="chmetcnv"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:新細明體;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@新細明體";
        panose-1:2 2 3 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:新細明體;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:新細明體;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=ZH-TW link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=blue face=Arial><span lang=EN-US
style='font-size:11.0pt;font-family:Arial;color:blue'>Hi Daniel,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span lang=EN-US
style='font-size:11.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span lang=EN-US
style='font-size:11.0pt;font-family:Arial;color:blue'>Here is verbose log about
SPI registers for reference.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=blue face=Arial><span lang=EN-US
style='font-size:12.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=blue face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:blue'>Best Regards,</span></font><font
color=blue><span lang=EN-US style='color:blue'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:blue'>Hony</span></font><span
lang=EN-US><o:p></o:p></span></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face=新細明體><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
<st1:PersonName w:st="on">hony.chiang</st1:PersonName> (</span></font><font
size=2><span style='font-size:10.0pt'>江昆仲</span></font><font size=2
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'> -
MIC) <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, August 11, 2010
11:23 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Carl-Daniel Hailfinger<br>
<b><span style='font-weight:bold'>Cc:</span></b> <st1:PersonName w:st="on">flashrom@flashrom.org</st1:PersonName>;
<st1:PersonName w:st="on">hony.chiang</st1:PersonName> (</span></font><font
size=2><span style='font-size:10.0pt'>江昆仲</span></font><font size=2
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'> -
MIC)<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [flashrom] Urgent:
Flash part would be destroied by flashrom 0.9.2 once manager application is
running.</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<div id=idOWAReplyText87932>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'>Hi Daniel, <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'>Thanks for your quick response. Please kindly see my answers with blue
texts  as below and share you my experiments today.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'>I use AMD HDT hardware ICE to interrupt CPU for
examining data on physical address 0xFEC10000 ~ 0xFEC<st1:chmetcnv TCSC="0"
NumberType="1" Negative="False" HasSpace="False" SourceValue="100" UnitName="F"
w:st="on">100F</st1:chmetcnv> 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.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'>Best regards,<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face=新細明體><span lang=EN-US style='font-size:
12.0pt'>Hony <o:p></o:p></span></font></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face=新細明體><span lang=EN-US style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabIndex=-1>

</span></font></div>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><font size=2 face=新細明體><span
lang=EN-US style='font-size:10.0pt;font-weight:bold'>From:</span></font></b><font
size=2><span lang=EN-US style='font-size:10.0pt'> Carl-Daniel Hailfinger
[mailto:c-d.hailfinger.devel.2006@gmx.net]<br>
<b><span style='font-weight:bold'>Sent:</span></b> 2010/8/11 [</span></font><font
size=2><span style='font-size:10.0pt'>星期三<span lang=EN-US>] </span>下午<span
lang=EN-US> 09:05<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">hony.chiang</st1:PersonName>
(</span>江昆仲<span lang=EN-US> - MIC)<br>
<b><span style='font-weight:bold'>Cc:</span></b> <st1:PersonName w:st="on">flashrom@flashrom.org</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [flashrom] Urgent:
Flash part would be destroied by flashrom 0.9.2 once manager application is
running.</span></span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

<div>

<p><font size=2 face=新細明體><span lang=EN-US style='font-size:10.0pt'>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?</span></font><span
lang=EN-US><o:p></o:p></span></p>

<p><font size=2 color=blue face=新細明體><span lang=EN-US style='font-size:10.0pt;
color:blue'>UpdateXpress System Pack Installer through a graphical user
interface (GUI).<br>
</span></font><font size=2><span lang=EN-US style='font-size:10.0pt'><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></span></font><span
lang=EN-US><o:p></o:p></span></p>

<p><font size=2 face=新細明體><span lang=EN-US style='font-size:10.0pt'><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.<o:p></o:p></span></font></p>

<p style='margin-bottom:12.0pt'><font size=2 color=blue face=新細明體><span
lang=EN-US style='font-size:10.0pt;color:blue'>Thank you. I will try it to give
you more inputs.</span></font><font size=2><span lang=EN-US style='font-size:
10.0pt'><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: 0x<st1:chmetcnv TCSC="0"
NumberType="1" Negative="False" HasSpace="False" SourceValue="3" UnitName="a"
w:st="on">3a</st1:chmetcnv><br>
><br>
> Syntax:<br>
> ./flashrom –w <st1:chmetcnv TCSC="0" NumberType="1" Negative="False"
HasSpace="False" SourceValue="24" UnitName="a" w:st="on">24a</st1:chmetcnv>.rom<br>
><br>
> Hardware configuration:<br>
> MB: AMD platform solution<br>
> <st1:place w:st="on"><st1:PlaceName w:st="on">South</st1:PlaceName> <st1:PlaceType
 w:st="on">Bridge</st1:PlaceType></st1:place>: 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=blue><span style='color:blue'>I will capture message with -V
parameter on my lab tomorrow, and will provide you output.</span></font><br>
Regards,<br>
Carl-Daniel<br>
<br>
--<br>
<a href="http://www.hailfinger.org/">http://www.hailfinger.org/</a><o:p></o:p></span></font></p>

</div>

</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>