]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/BootSector/efi32.S
Detab in DuetPkg
[mirror_edk2.git] / DuetPkg / BootSector / efi32.S
index 06b2516ba76c11a28d51a9861e451d8b80678446..1da2d5e6f31418b6834e51442762f5f6b1ddd5f4 100644 (file)
 # Now in 32-bit protected mode.\r
 ##############################################################################\r
 \r
-        .486: \r
-        #.MODEL flat\r
-        .stack: \r
-        .code:\r
         .org 0x21000\r
 \r
+.global _start\r
+_start:\r
+\r
 .equ                 DEFAULT_HANDLER_SIZE, INT1 - INT0\r
 \r
 .macro jmpCommonIdtEntry  \r
@@ -34,7 +33,7 @@
     #                          be done to maintain the consistency of the size\r
     #                          of entry points...\r
     .byte   0xe9                        # jmp 16 bit relative\r
-    .long      commonIdtEntry - . - 4  # A problem     \r
+    .long      commonIdtEntry - . - 4   # offset to jump to     \r
 .endm\r
 \r
 Start:  \r
@@ -57,10 +56,10 @@ Start:
     movl    (Idtr + 2), %esi\r
     movl    (%esi), %edi\r
 \r
-LOOP_1:                                             # loop through all IDT entries exception handlers and initialize to default handler\r
+LOOP_1:                                         # loop through all IDT entries exception handlers and initialize to default handler\r
     movw    %bx, (%edi)                         # write bits 15..0 of offset\r
     movw    $0x20, 2(%edi)                      # SYS_CODE_SEL from GDT\r
-    movw    $(0x0e00 | 0x8000), 4(%edi)                # type = 386 interrupt gate, present\r
+    movw    $(0x0e00 | 0x8000), 4(%edi)         # type = 386 interrupt gate, present\r
     movw    %ax, 6(%edi)                        # write bits 31..16 of offset\r
     addl    $8, %edi                            # move up to next descriptor\r
     addw    DEFAULT_HANDLER_SIZE, %bx           # move to next entry point\r
@@ -140,9 +139,9 @@ SectionLoop:
     cmpw    $0, %bx\r
     jne     SectionLoop\r
 \r
-    movzwl  Idtr, %eax                  # get size of IDT\r
+    movzwl  (Idtr), %eax                # get size of IDT\r
     incl    %eax\r
-    addl    Idtr + 2, %eax             # add to base of IDT to get location of memory map... \r
+    addl    (Idtr + 2), %eax            # add to base of IDT to get location of memory map... \r
     pushl   %eax                        # push memory map location on stack for call to EFILDR...\r
 \r
     pushl   %eax                        # push return address (useless, just for stack balance)\r
@@ -154,7 +153,7 @@ EfiLdrOffset:
     ret\r
 \r
 #    db      "**** DEFAULT IDT ENTRY ***",0\r
-    .align 0x2\r
+    .p2align 1\r
 Halt: \r
 INT0: \r
     pushl   $0x0    # push error code place holder on the stack\r
@@ -505,7 +504,7 @@ ClearScreen:
     pushl   %eax\r
     pushl   %ecx\r
 \r
-    movb    ' ', %al\r
+    movb    $0x00, %al\r
     movb    $0xc, %ah\r
     movl    $0xb8000, %edi\r
     movl    $80*24, %ecx\r