]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/BootSector/bs32.S
remove --image-base option EfiLdr.inf, and use GenFw to do image base relocation
[mirror_edk2.git] / DuetPkg / BootSector / bs32.S
index f01f5bf7d1556d9bef4a71e74ba04356e98759ef..d768518e85c3a144a184f5a0045b224512f7cc65 100644 (file)
@@ -1,7 +1,7 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright 2006 - 2007, Intel Corporation                                                         \r
-#*   All rights reserved. This program and the accompanying materials                          \r
+#*   Copyright (c) 2006 - 2007, 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
@@ -18,7 +18,7 @@
         #.MODEL small\r
         .stack: \r
         .486p: \r
-        .code\r
+        .code16\r
 \r
 .equ                      FAT_DIRECTORY_ENTRY_SIZE, 0x0020\r
 .equ                      FAT_DIRECTORY_ENTRY_SHIFT, 5\r
@@ -30,7 +30,9 @@
 .equ                      LOADER_FILENAME_PART2, 0x30325244    # "DR20"\r
 .equ                      LOADER_FILENAME_PART3, 0x20202030    # "0___"\r
 \r
-        .org 0x00\r
+        .org 0x0\r
+.global _start\r\r
+_start:\r
 Ia32Jump: \r
   jmp   BootSectorEntryPoint  # JMP inst                  - 3 bytes\r
   nop\r
@@ -77,7 +79,7 @@ BootSectorEntryPoint:
 # ****************************************************************************\r
 # Start Print\r
 # ****************************************************************************\r
-  leaw %cs:StartString, %si\r
+  movw $StartString, %si\r
   call PrintString\r
 \r
 # ****************************************************************************\r
@@ -148,7 +150,7 @@ FindEFILDR:
   jmp   FoundAll\r
 \r
 FindVARSTORE: \r
-  # if the file is not loader file, see if it's "EFIVAR  BIN"\r
+  ## if the file is not loader file, see if it's "EFIVAR  BIN"\r
   cmpl  $0x56494645, (%di)                # Compare to "EFIV"\r
   jne   FindNext\r
   cmpl  $0x20205241, 4(%di)               # Compare to "AR  "\r
@@ -275,12 +277,12 @@ LimitTransfer:
 # ERROR Condition:\r
 # ****************************************************************************\r
 NotFoundAll: \r
-  # if we found EFILDR, continue\r
+  ## if we found EFILDR, continue\r
   testw %bx, %bx\r
   jne  FoundEFILDR\r
 BadBootSector: \r
 DiskError: \r
-  leaw %cs:ErrorString, %si\r
+  movw $ErrorString, %si\r
   call PrintString\r
 Halt: \r
   jmp   Halt\r
@@ -294,7 +296,7 @@ ErrorString:
 # LBA Offset for BootSector, need patched by tool for HD boot.\r
 # ****************************************************************************\r
 \r
-  .org 0x01fa\r
+  #.org 0x01fa\r
 LBAOffsetForBootSector: \r
   .long     0x0\r
 \r
@@ -302,7 +304,7 @@ LBAOffsetForBootSector:
 # Sector Signature\r
 # ****************************************************************************\r
 \r
-  .org 0x01fe\r
+  #.org 0x01fe\r
 SectorSignature: \r
   .word     0xaa55      # Boot Sector Signature\r
 \r