I'm a long time lurker here but I now have permission to contribute.   I'll 
start with something simple.  If there is a better place to report bugs please 
redirect me.  I see a reference to "Project Tracker" on the wiki but it doesn't 
have details about how to actually access it.

In file MdePkg/Library/UefiDevicePathLib/DevicePathToText.c, function 
DevPathToTextSasEx(),  lines 685-688,  there is this code that is adding 1 when 
converting to a string:

      //
      // Value 0x0 thru 0xFF -> Drive 1 thru Drive 256
      //
      UefiDevicePathLibCatPrint (Str, L"0x%x", ((SasEx->DeviceTopology >> 8) & 
0xff) + 1);UefiDevicePathLibCatPrint (Str, L"0x%x", ((SasEx->DeviceTopology >> 
8) & 0xff) + 1);

In file MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c , function 
DevPathFromTextSasEx(), there is not an equivalent subtraction of 1 when 
converting the text representation to binary.

This appears to have been changed in revision 14504.  

A UEFI SCT test case fails as it does a round trip from binary to text to 
binary and the resultant binary is off by +1 in this field. 

I'm not fully educated on the expected correct text representation.  However, I 
can infer from the UEFI spec that the bug is in DevPathFromTextSasEx().  In 
other words the text representation should be human friendly and the values be 
from 1 to 256.   The binary form only has 8 bits so it has to be 0 to 255.

--Larry

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to