]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/Thunk16.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / Thunk16.nasm
index c08e41de9d3b6452d5435967db6d0b932279d4a6..03a300dc68640b7c3d651f9f1b9df0c921d14ecb 100644 (file)
@@ -4,13 +4,7 @@
 ;------------------------------------------------------------------------------\r
 ;\r
 ; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
-; This program and the accompanying materials\r
-; are licensed and made available under the terms and conditions of the BSD License\r
-; which accompanies this distribution.  The full text of the license may be found at\r
-; http://opensource.org/licenses/bsd-license.php.\r
-;\r
-; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+; SPDX-License-Identifier: BSD-2-Clause-Patent\r
 ;\r
 ; Module Name:\r
 ;\r
@@ -58,7 +52,7 @@ SECTION .data
 ;\r
 ; These are global constant to convey information to C code.\r
 ;\r
-ASM_PFX(m16Size)         DW      InternalAsmThunk16 - ASM_PFX(m16Start)\r
+ASM_PFX(m16Size)         DW      ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)\r
 ASM_PFX(mThunk16Attr)    DW      _BackFromUserCode.ThunkAttrEnd - 4 - ASM_PFX(m16Start)\r
 ASM_PFX(m16Gdt)          DW      _NullSegDesc - ASM_PFX(m16Start)\r
 ASM_PFX(m16GdtrBase)     DW      _16GdtrBase - ASM_PFX(m16Start)\r
@@ -85,7 +79,11 @@ _BackFromUserCode:
 BITS    16\r
     push    ss\r
     push    cs\r
-o32 call    dword .Base                 ; push eip\r
+    ;\r
+    ; Note: We can't use o32 on the next instruction because of a bug\r
+    ; in NASM 2.09.04 through 2.10rc1.\r
+    ;\r
+    call    dword .Base                 ; push eip\r
 .Base:\r
     pushfd\r
     cli                                 ; disable interrupts\r
@@ -139,7 +137,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