1. 26 Jul, 2016 1 commit
  2. 17 Nov, 2015 2 commits
    • Peter Jones's avatar
    • Peter Jones's avatar
      shim: handle BDS's li->LoadOptions and Shell's li->LoadOptions . · 07d5f970
      Peter Jones authored
      Load options are a giant pain in the ass, because the shell is a giant
      piece of junk.  If we're invoked from the EFI shell, we get something
      like this:
      
      00000000 5c 00 45 00 36 00 49 00 5c 00 66 00 65 00 64 00 |\.E.F.I.\.f.e.d.|
      00000010 6f 00 72 00 61 00 5c 00 73 00 68 00 69 00 6d 00 |o.r.a.\.s.h.i.m.|
      00000020 78 00 36 00 34 00 2e 00 64 00 66 00 69 00 20 00 |x.6.4...e.f.i. .|
      00000030 5c 00 45 00 46 00 49 00 5c 00 66 00 65 00 64 00 |\.E.F.I.\.f.e.d.|
      00000040 6f 00 72 00 61 00 5c 00 66 00 77 00 75 00 70 00 |o.r.a.\.f.w.u.p.|
      00000050 64 00 61 00 74 00 65 00 2e 00 65 00 66 00 20 00 |d.a.t.e.e.f.i. .|
      00000060 00 00 66 00 73 00 30 00 3a 00 5c 00 00 00       |..f.s.0.:.\...|
      
      which is just some paths rammed together separated by a UCS-2 NUL. But
      if we're invoked from BDS, we get something more like:
      
      00000000 01 00 00 00 62 00 4c 00 69 00 6e 00 75 00 78 00 |....b.L.i.n.u.x.|
      00000010 20 00 46 00 69 00 72 00 6d 00 77 00 61 00 72 00 | .F.i.r.m.w.a.r.|
      00000020 65 00 20 00 55 00 70 00 64 00 61 00 74 00 65 00 |e. .U.p.d.a.t.e.|
      00000030 72 00 00 00 40 01 2a 00 01 00 00 00 00 08 00 00 |r.....*.........|
      00000040 00 00 00 00 00 40 06 00 00 00 00 00 1a 9e 55 bf |.....@........U.|
      00000050 04 57 f2 4f b4 4a ed 26 4a 40 6a 94 02 02 04 04 |.W.O.:.&J@j.....|
      00000060 34 00 5c 00 45 00 46 00 49 00 5c 00 66 00 65 00 |4.\.E.F.I.f.e.d.|
      00000070 64 00 6f 00 72 00 61 00 5c 00 73 00 68 00 69 00 |o.r.a.\.s.h.i.m.|
      00000080 6d 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 |x.6.4...e.f.i...|
      00000090 00 00 7f ff 40 00 20 00 5c 00 66 00 77 00 75 00 |...... .\.f.w.u.|
      000000a0 70 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 |p.x.6.4...e.f.i.|
      000000b0 00 00                                           |..|
      
      which is clearly an EFI_LOAD_OPTION filled in halfway reasonably.  In
      short, the UEFI shell is still a useless piece of junk.
      
      So anyway, try to determine which one we've got and handle it
      appropriately.
      Signed-off-by: 's avatarPeter Jones <pjones@redhat.com>
      07d5f970
  3. 30 Apr, 2013 1 commit
  4. 26 Apr, 2013 2 commits