]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/BootSector/st32_64.S
IntelFrameworkModulePkg: Refine casting expression result to bigger size
[mirror_edk2.git] / DuetPkg / BootSector / st32_64.S
index f1ebf67d186a6aa021ab0c1bdd64fcf8d1362ddf..18c53f81fa60b45556d888f07768f3004a87ae14 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+#*   Copyright (c) 2006 - 2012, 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
 .equ                        BLOCK_SHIFT, 9\r
 \r
        .org 0x0\r
+\r
+.global _start\r
+_start:\r
+\r
 Ia32Jump: \r
   jmp   BootSectorEntryPoint  # JMP inst    - 3 bytes\r
   nop\r
@@ -138,11 +142,11 @@ CheckEm64T:
         movw $18,%cx\r
         jmp  PrintStringAndHalt\r
 CheckEm64TPass: \r
-jumpFarInstruction: \r
+JumpFarInstruction: \r
         .byte 0xea\r
-jumpOffset: \r
+JumpOffset: \r
         .word 0x200\r
-jumpSegment: \r
+JumpSegment: \r
         .word 0x2000\r
 \r
 \r
@@ -446,7 +450,7 @@ A20GateEnabled:
     #\r
     # Enable Protect Mode (set CR0.PE=1)\r
     #\r
-    movl  $cr0, %eax      # Read CR0.\r
+    movl  %cr0, %eax      # Read CR0.\r
     orl   $0x1,%eax       # Set PE=1\r
     movl  %eax, %cr0      # Write CR0.\r
     .byte 0x66\r
@@ -518,7 +522,7 @@ In32BitProtectedMode:
     #\r
     # Enable paging to activate long mode (set CR0.PG=1)\r
     #\r
-    movl  $cr0, %eax      # Read CR0.\r
+    movl  %cr0, %eax      # Read CR0.\r
     .byte 0xf\r
     .byte 0xba\r
     .byte 0xe8\r
@@ -597,7 +601,7 @@ Empty8042Loop:
 \r
         .p2align 1\r
 \r
-        gdtr:    .long  GDT_END - GDT_BASE - 1  # GDT limit \r
+        gdtr:    .word  GDT_END - GDT_BASE - 1  # GDT limit \r
         .long 0                     # (GDT base gets set above)\r
 ##############################################################################\r
 #   global descriptor table (GDT)\r
@@ -1113,10 +1117,9 @@ MemoryMap:  .long 0,0,0,0,0,0,0,0
         .long 0,0,0,0,0,0,0,0\r
         .long 0,0,0,0,0,0,0,0\r
 \r
-        .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\r
         .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\r
 \r
-        #.org 0x0fe0  #Just for pass build\r
+        .org 0x0fe0\r
 MyStack:    \r
         # below is the pieces of the IVT that is used to redirect INT 68h - 6fh\r
         #    back to INT 08h - 0fh  when in real mode...  It is 'org'ed to a\r
@@ -1148,7 +1151,7 @@ MyStack:
         iret\r
 \r
 \r
-        #.org 0x0ffe #Just for pass build\r
+        .org 0x0ffe\r
 BlockSignature: \r
         .word 0xaa55\r
 \r