]> git.proxmox.com Git - mirror_edk2.git/blobdiff - DuetPkg/CpuDxe/Ia32/CpuInterrupt.S
Update the copyright notice format
[mirror_edk2.git] / DuetPkg / CpuDxe / Ia32 / CpuInterrupt.S
index 0502c3543b8cef40a71d3e6a07c82f4017a81e43..945dcf6665df561c42df10489814ccb717605da7 100644 (file)
@@ -1,7 +1,7 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright 2006, Intel Corporation                                                         \r
-#*   All rights reserved. This program and the accompanying materials                          \r
+#*   Copyright (c) 2006, 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
 #EXTERN ExceptionHandler: NEAR\r
 #EXTERN mTimerVector: DWORD\r
 \r
-       .data\r
-       .globl ASM_PFX(mExceptionCodeSize)\r
+  .data\r
+  ASM_GLOBAL ASM_PFX(mExceptionCodeSize)\r
 ASM_PFX(mExceptionCodeSize): .long  9\r
 \r
-       .text\r
-       .globl ASM_PFX(InitDescriptor)\r
+  .text\r
+  ASM_GLOBAL ASM_PFX(InitDescriptor)\r
 \r
 ASM_PFX(InitDescriptor):\r
         movl    $GDT_BASE,%eax              # EAX=PHYSICAL address of gdt\r
@@ -44,7 +44,7 @@ ASM_PFX(InitDescriptor):
 #     UINTN Vector,\r
 #     VOID  (*Handler)(VOID)\r
 #     )\r
-       .globl ASM_PFX(InstallInterruptHandler)\r
+  ASM_GLOBAL ASM_PFX(InstallInterruptHandler)\r
 ASM_PFX(InstallInterruptHandler):\r
 #  Vector:DWORD @ 4(%esp)\r
 #  Handler:DWORD @ 8(%esp)\r
@@ -68,7 +68,7 @@ ASM_PFX(InstallInterruptHandler):
         pop     %edi\r
         ret\r
 \r
-       .macro JmpCommonIdtEntry\r
+  .macro JmpCommonIdtEntry\r
     # jmp     commonIdtEntry - this must be hand coded to keep the assembler from\r
     #                          using a 8 bit reletive jump when the entries are\r
     #                          within 255 bytes of the common entry.  This must\r
@@ -76,10 +76,10 @@ ASM_PFX(InstallInterruptHandler):
     #                          of entry points...\r
     .byte     0xe9                        # jmp 16 bit reletive \r
     .long     commonIdtEntry - . - 4      #  offset to jump to\r
-       .endm\r
+  .endm\r
 \r
-    .align 2\r
-       .globl ASM_PFX(SystemExceptionHandler)\r
+    .p2align 1\r
+  ASM_GLOBAL ASM_PFX(SystemExceptionHandler)\r
 ASM_PFX(SystemExceptionHandler):\r
 INT0:\r
     pushl    $0x0      # push error code place holder on the stack\r
@@ -198,15 +198,82 @@ INT19:
     JmpCommonIdtEntry\r
 \r
 INTUnknown:\r
-       .rept (32 - 20)\r
+  # The following segment repeats (32 - 20) times:\r
+  # No. 1\r
     pushl    $0x0      # push error code place holder on the stack\r
 #    push    xxh     # push vector number\r
     .byte    0x6a\r
     .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
     JmpCommonIdtEntry\r
-       .endr\r
+  # No. 2\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 3\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 4\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 5\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 6\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 7\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 8\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 9\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 10\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 11\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+  # No. 12\r
+    pushl    $0x0      # push error code place holder on the stack\r
+#    push    xxh     # push vector number\r
+    .byte    0x6a\r
+    .byte    ( . - INTUnknown - 3 ) / 9 + 20 # vector number\r
+    JmpCommonIdtEntry\r
+\r
 \r
-       .globl ASM_PFX(SystemTimerHandler)\r
+  ASM_GLOBAL ASM_PFX(SystemTimerHandler)\r
 ASM_PFX(SystemTimerHandler):\r
     pushl    $0\r
     pushl    $ASM_PFX(mTimerVector)\r
@@ -417,16 +484,16 @@ ExceptionDone:
 # data\r
 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 \r
-       .data\r
-        .align 4\r
+  .data\r
+        .p2align 2\r
 \r
-gdtr:  .short GDT_END - GDT_BASE - 1   # GDT limit\r
+gdtr: .short GDT_END - GDT_BASE - 1   # GDT limit\r
         .long 0                         # (GDT base gets set above)\r
 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 #   global descriptor table (GDT)\r
 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 \r
-        .align 4\r
+        .p2align 2\r
 \r
 GDT_BASE:\r
 # null descriptor\r
@@ -503,11 +570,11 @@ SPARE5_SEL  = .-GDT_BASE
 \r
 GDT_END:\r
 \r
-        .align 4\r
+        .p2align 2\r
 \r
 \r
 \r
-idtr:  .short IDT_END - IDT_BASE - 1   # IDT limit\r
+idtr: .short IDT_END - IDT_BASE - 1   # IDT limit\r
         .long 0                         # (IDT base gets set above)\r
 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 #   interrupt descriptor table (IDT)\r
@@ -519,7 +586,7 @@ idtr:       .short IDT_END - IDT_BASE - 1   # IDT limit
 #;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 \r
 #idt_tag .byte "IDT",0     \r
-        .align 4\r
+        .p2align 2\r
 \r
 IDT_BASE:\r
 # divide by zero (INT 0)\r
@@ -682,18 +749,83 @@ SIMD_EXCEPTION_SEL  = .-IDT_BASE
         .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
         .short 0            # offset 31:16\r
 \r
-       .rept  (32 - 20)\r
+  # The following segment repeats (32 - 20) times:\r
+  # No. 1\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 2\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 3\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 4\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 5\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 6\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 7\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 8\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 9\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 10\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 11\r
+        .short 0            # offset 15:0\r
+        .short SYS_CODE_SEL # selector 15:0\r
+        .byte 0             # 0 for interrupt gate\r
+        .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
+        .short 0            # offset 31:16\r
+  # No. 12\r
         .short 0            # offset 15:0\r
         .short SYS_CODE_SEL # selector 15:0\r
         .byte 0             # 0 for interrupt gate\r
         .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
         .short 0            # offset 31:16\r
-       .endr\r
+\r
 \r
 # 72 unspecified descriptors\r
-       .rept 72 * 8\r
-        .byte 0\r
-       .endr\r
+  .fill 72 * 8, 1, 0\r
         \r
 # IRQ 0 (System timer) - (INT 0x68)\r
 IRQ0_SEL            = .-IDT_BASE\r
@@ -823,9 +955,7 @@ IRQ15_SEL            = .-IDT_BASE
         .byte 0x0e | 0x80   # (10001110)type = 386 interrupt gate, present\r
         .short 0            # offset 31:16\r
 \r
-       .rept 1 * 8\r
-        .byte 0\r
-       .endr\r
+  .fill 1 * 8, 1, 0\r
 \r
 IDT_END:\r
 \r