On Wed, Feb 20, 2008 at 1:09 PM, Carl-Daniel Hailfinger <<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On 20.02.2008 18:52, Stefan Reinauer wrote:<br>
> Carl-Daniel Hailfinger wrote:<br>
>> On 20.02.2008 17:19, Stefan Reinauer wrote:<br>
>><br>
>>> * ron minnich <<a href="mailto:rminnich@gmail.com">rminnich@gmail.com</a>> [071212 17:19]:<br>
>>><br>
>>>>> Question to you guys: why is the first wrmsr instruction there?<br>
>>>>> From my<br>
>>>>> understanding, by not properly initialising ECX, EAX and EDX this<br>
>>>>> will<br>
>>>>> overwrite whatever is in the MSR pointed to by ECX?!<br>
>>>>><br>
>>>>> BTW I tried out your code on our target hardware (Intel Celeron M,<br>
>>>>> 600 MHz)<br>
>>>>> and with that first wrmsr line in place it hangs and without it,<br>
>>>>> it runs<br>
>>>>> just fine.<br>
>>>>><br>
>>>> Thanks Martin. That looks like quite a nice bug catch you've done :-)<br>
>>>><br>
>>> Here's a patch that resolves the issue.<br>
>>><br>
>>> Signed-off-by: Stefan Reinauer <<a href="mailto:stepan@coresystems.de">stepan@coresystems.de</a>><br>
>>><br>
>>> Index: src/cpu/intel/microcode/microcode.c<br>
>>> ===================================================================<br>
>>> --- src/cpu/intel/microcode/microcode.c    (revision 3111)<br>
>>> +++ src/cpu/intel/microcode/microcode.c    (working copy)<br>
>>> @@ -33,7 +33,6 @@<br>
>>>       */<br>
>>>      msr_t msr;<br>
>>>      __asm__ volatile (<br>
>>> -        "wrmsr\n\t"<br>
>>><br>
>><br>
>> ACK.<br>
>><br>
>><br>
>>>          "xorl %%eax, %%eax\n\t"<br>
>>>          "xorl %%edx, %%edx\n\t"<br>
>>>          "movl $0x8b, %%ecx\n\t"<br>
>>> @@ -60,7 +59,7 @@<br>
>>>      char *c;<br>
>>>      msr_t msr;<br>
>>><br>
>>> -    /* cpuid sets msr 0x8B iff a microcode update has been loaded. */<br>
>>> +    /* cpuid sets msr 0x8B if a microcode update has been loaded. */<br>
>>><br>
>><br>
>> NACK. "IFF" is shorthand for "if and only if", see<br>
>> <a href="http://en.wikipedia.org/wiki/If_and_only_if" target="_blank">http://en.wikipedia.org/wiki/If_and_only_if</a><br>
>><br>
><br>
> That's silly. This is not a mathematical expression nor a<br>
> philosophical disquisition but a sentence. I am not even convinced<br>
> that it was meant that way rather than being just a typo. If you have<br>
> reasons to assume it means "If and only if" then let's write it that way.<br>
<br>
</div></div>Merriam-Webster agrees with me that "iff" is a word:<br>
<a href="http://www.merriam-webster.com/dictionary/iff" target="_blank">http://www.merriam-webster.com/dictionary/iff</a><br>
So this is a valid sentence and I see no reason to change it. Unless the<br>
bit can be set even of no microcode update has been uploaded, "iff" is<br>
the only correct word.<br>
<div><div></div><div class="Wj3C7c"><br>
Regards,<br>
Carl-Daniel</div></div></blockquote><div><br>Meriam-Webster and wikipedia might know, but not everyone does. Why can't we just change it to "if and only if" instead of using an obscure word that looks like a typo?<br>
<br>-Corey <br></div></div><br>