]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg BaseLib NASM Thunk16: Initialize _16GdtrBase to 0
authorJordan Justen <jordan.l.justen@intel.com>
Mon, 1 Sep 2014 17:24:08 +0000 (17:24 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 1 Sep 2014 17:24:08 +0000 (17:24 +0000)
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.justen@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16025 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/Ia32/Thunk16.nasm
MdePkg/Library/BaseLib/X64/Thunk16.nasm

index c08e41de9d3b6452d5435967db6d0b932279d4a6..e8468a3fbfb67b7eff97c378d4a51aac6fc40804 100644 (file)
@@ -139,7 +139,7 @@ _16Idtr:
 _16Gdtr:\r
         DW      GdtEnd - _NullSegDesc - 1\r
 _16GdtrBase:\r
-        DD      _NullSegDesc\r
+        DD      0\r
 \r
 ;------------------------------------------------------------------------------\r
 ; _ToUserCode() takes control in real mode before passing control to user code.\r
index d15984b01c9ba9b38319987e3c892533bacdca08..6084fac8c42cf477c008e450c9cdf5323a9aa158 100644 (file)
@@ -145,7 +145,7 @@ _EntryPoint:
 _16Gdtr:\r
         DW      GDT_SIZE - 1\r
 _16GdtrBase:\r
-        DQ      _NullSeg\r
+        DQ      0\r
 _16Idtr:\r
         DW      (1 << 10) - 1\r
         DD      0\r