All, Sergey reported that XCLANG was able to build and link with my latest version. (Apparently he still has issues booting OVMF, but I don't think it is specifically due to NASM Thunk16.)
Therefore, I'll commit the NASM series now with Liming's r-b. I'll send out a separate email noting that NASM 2.07 or newer will now be required for building BaseLib for IA32 & X64 (except Visual Studio and ICC). -Jordan On Fri, Aug 29, 2014 at 2:00 AM, Gao, Liming <liming....@intel.com> wrote: > The patch is good > > Reviewed-by: Gao, Liming <liming....@intel.com> > > Thanks > Liming > -----Original Message----- > From: Jordan Justen [mailto:jordan.l.jus...@intel.com] > Sent: Friday, August 29, 2014 3:22 PM > To: edk2-devel@lists.sourceforge.net > Subject: [edk2] [PATCH] MdePkg BaseLib NASM Thunk16: Initialize _16GdtrBase > to 0 > > Previously we were setting it to the start of the GDT in the UEFI driver's > copy of BaseLib. This address is irrelavent, since the C code will initialize > it to the cooresponding address after the Thunk16 code has been placed in low > memory. > > Additionally, initializing this was causing a link error for the XCLANG > toolchain. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> > Cc: Sergey Isakov <isakov...@bk.ru> > --- > Sergey, > > Does this work for you on XCLANG? (I tested GCC49.) > > I also updated my nasm branch with these changes and the other changes > discussed. (ASM_PFX, _NullSeg, o32 call dword .Base) > > https://github.com/jljusten/edk2.git nasm > > -Jordan > > MdePkg/Library/BaseLib/Ia32/Thunk16.nasm | 2 +- > MdePkg/Library/BaseLib/X64/Thunk16.nasm | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm > b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm > index e992250..0d4be9d 100644 > --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm > +++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.nasm > @@ -139,7 +139,7 @@ _16Idtr: > _16Gdtr: > DW GdtEnd - _NullSegDesc - 1 > _16GdtrBase: > - DD _NullSegDesc > + DD 0 > > > ;------------------------------------------------------------------------------ > ; _ToUserCode() takes control in real mode before passing control to user > code. > diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.nasm > b/MdePkg/Library/BaseLib/X64/Thunk16.nasm > index d15984b..6084fac 100644 > --- a/MdePkg/Library/BaseLib/X64/Thunk16.nasm > +++ b/MdePkg/Library/BaseLib/X64/Thunk16.nasm > @@ -145,7 +145,7 @@ _EntryPoint: > _16Gdtr: > DW GDT_SIZE - 1 > _16GdtrBase: > - DQ _NullSeg > + DQ 0 > _16Idtr: > DW (1 << 10) - 1 > DD 0 > -- > 2.1.0 > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel