Hi Andrew,

I did do a hex dump but was not sure why there would be difference. The
boot options are stored in flash and I can see that the source path matches
the one stored in flash. Not sure why the TmpDevicePath is different as it
is set to SourcePath at the top of the function. But the old variable
stored in flash does differ in that one byte from the new one that I
created. Hmmm. What is that byte 0x44 ?

OLD Variable:
-----------------
Variable NV+RT+BS '8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Boot0000' DataSize
= 0x5
F

  00000000: 00 00 00 00 41 00 6E 00-30 00 73 00 67 00 6D 00
 *....A.n.0.s.g.m.*
  00000010: 69 00 69 00 70 00 78 00-65 00 00 00 02 01 0C 00
 *i.i.p.x.e.......*
  00000020: D0 41 03 0A 02 00 00 00-01 01 06 00 00 02 01 01
 *.A..............*
  00000030: 06 00 00 00 03 0B 25 00-12 34 56 78 9A BC 00 00
 *......%..4Vx....*
  00000040: 00 00 00 00 70 79 69 FF-03 00 00 00 98 2C 97 FF
 *....pyi......,..*
  00000050: 03 01 00 00 34 46 67 FF-01 7F FF 04 00 00 00
*....4Fg........*

NEW VARIABLE:
--------------------
Variable NV+RT+BS '8BE4DF61-93CA-11D2-AA0D-00E098032B8C:Boot0000' DataSize
= 0x5
F

  00000000: 00 00 00 00 41 00 6E 00-30 00 73 00 67 00 6D 00
 *....A.n.0.s.g.m.*
  00000010: 69 00 69 00 70 00 78 00-65 00 00 00 02 01 0C 00
 *i.i.p.x.e.......*
  00000020: D0 41 03 0A 02 00 00 00-01 01 06 00 00 02 01 01
 *.A..............*
  00000030: 06 00 00 00 03 0B 25 00-12 34 56 78 9A BC 00 00
 *......%..4Vx....*
  00000040: 00 00 00 00 E0 79 69 FF-03 00 00 00 98 2C 97 FF
 *.....yi......,..*
  00000050: 03 01 00 00 34 46 67 FF-01 7F FF 04 00 00 00
*....4Fg........*


Tmp Device Path
'PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(123456789ABC,0x1)'
CoreLocateDevicePath 515

CoreLocateDevicePath 518 Size:61 SourceSize:61

0x2 == 0x2

0x1 == 0x1

0xC == 0xC

0x0 == 0x0

0xD0 == 0xD0

0x41 == 0x41

0x3 == 0x3

0xA == 0xA

0x2 == 0x2

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x1 == 0x1

0x1 == 0x1

0x6 == 0x6

0x0 == 0x0

0x0 == 0x0

0x2 == 0x2

0x1 == 0x1

0x1 == 0x1

0x6 == 0x6

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x3 == 0x3

0xB == 0xB

0x25 == 0x25

0x0 == 0x0

0x12 == 0x12

0x34 == 0x34

0x56 == 0x56

0x78 == 0x78

0x9A == 0x9A

0xBC == 0xBC

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x70 == 0xE0    <<<<<<<<<<<<<<

0x79 == 0x79

0x69 == 0x69

0xFF == 0xFF

0x3 == 0x3

0x0 == 0x0

0x0 == 0x0

0x0 == 0x0

0x98 == 0x98

0x2C == 0x2C

0x97 == 0x97

0xFF == 0xFF

0x3 == 0x3

0x1 == 0x1

0x0 == 0x0

0x0 == 0x0

0x34 == 0x34

0x46 == 0x46

0x67 == 0x67

0xFF == 0xFF

0x1 == 0x1



On Wed, Apr 1, 2015 at 2:58 PM, Andrew Fish <af...@apple.com> wrote:

>
> > On Apr 1, 2015, at 2:27 PM, Narinder Dhillon <ndhillo...@gmail.com>
> wrote:
> >
> > Hi All,
> >
> > I add a boot option for PXE boot, pointed to a network interface, and
> boot from it successfully. If I update my firmware, flash into spi-nor
> device and then try pxe boot again, fails.
> > If I now delete the old boot option in boot manager and add a new one,
> then PXE boot works.
> >
> > I have chased this down to a comparison in
> MdeModulePkg/Core/Dxe/Hand/Locate.c and in function CoreLocateDevicePath,
> the following comparison fails even though the device path strings look the
> same.
> >
> >
> ----------------------------------------------------------------------------------------------------------------
> >     if ((Size <= SourceSize) && CompareMem (SourcePath, TmpDevicePath,
> (UINTN) Size) == 0) {
> >
> ----------------------------------------------------------------------------------------------------------------
> >
> > I used the device path to text protocol to print both paths and they
> look the same but I am not sure why this comparison is failing.
> >
> > Tmp Device Path
> 'PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(123456789ABC,0x1)'
> >
> > Source Device Path
> 'PciRoot(0x2)/Pci(0x2,0x0)/Pci(0x0,0x0)/MAC(123456789ABC,0x1)'
> >
>
> The text representation of a device path is a summary. The compare is done
> on the actual device path binary. The device paths are binary bits with no
> strings. The strings are just convention to make things human readable. So
> hexdump the device paths to see the difference.
>
> Thanks,
>
> Andrew Fish
>
> > Any suggestions on how I can debug this ?
> > Thanx,
> >
> >
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> > by Intel and developed in partnership with Slashdot Media, is your hub
> for all
> > things parallel software development, from weekly thought leadership
> blogs to
> > news, videos, case studies, tutorials and more. Take a look and join the
> > conversation now.
> http://goparallel.sourceforge.net/_______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to