]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DuetPkg BootSector:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Nov 2011 09:38:12 +0000 (09:38 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 16 Nov 2011 09:38:12 +0000 (09:38 +0000)
Update start.asm(S)/start16.asm(S)/start32.asm(S)/efi32.asm(S) under DuetPkg\BootSector to follow the IA32 recommendations on switching to protected mode: Immediately following the MOV CR0 instruction, execute a far JMP or far CALL instruction. (This operation is typically a far jump or call to the next instruction in the instruction stream.)

Signed-off-by: rsun3
Reviewed-by: niruiyu
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12723 6f19259b-4bc3-4df7-8a09-765794883524

14 files changed:
DuetPkg/BootSector/BootSector.inf
DuetPkg/BootSector/bin/Start.com
DuetPkg/BootSector/bin/Start16.com
DuetPkg/BootSector/bin/Start32.com
DuetPkg/BootSector/bin/efi32.com
DuetPkg/BootSector/bin/efi32.com2
DuetPkg/BootSector/efi32.S
DuetPkg/BootSector/efi32.asm
DuetPkg/BootSector/start.S
DuetPkg/BootSector/start.asm
DuetPkg/BootSector/start16.S
DuetPkg/BootSector/start16.asm
DuetPkg/BootSector/start32.S
DuetPkg/BootSector/start32.asm

index c443ebb6efbe568cc5a58f21ddaa957610e772d9..49f69eb66e352ac6ae94316a5539957b2f3476ae 100644 (file)
@@ -1,6 +1,6 @@
 ## @file\r
 # \r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2011, 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
   efi32.asm    | MSFT\r
   efi32.S      | GCC\r
 \r
+  start64.asm  | INTEL\r
+  start64.asm  | MSFT\r
+  start64.S    | GCC\r
+\r
+  st16_64.asm  | INTEL\r
+  st16_64.asm  | MSFT\r
+  st16_64.S    | GCC\r
+\r
+  st32_64.asm  | INTEL\r
+  st32_64.asm  | MSFT\r
+  st32_64.S    | GCC\r
+\r
+  efi64.asm    | INTEL\r
+  efi64.asm    | MSFT\r
+  efi64.S      | GCC\r
+\r
index adc5a3d0cf52bc908ece2f15ece86af13e1f5dac..0fd19a14a90931cf3717ea013335f788652f7f2c 100644 (file)
Binary files a/DuetPkg/BootSector/bin/Start.com and b/DuetPkg/BootSector/bin/Start.com differ
index 34e5dca6dbfed6ece0d4b679decdb14a59c9f73f..b2d77c1262d63c51d214b2843a55bc0f4a990f27 100644 (file)
Binary files a/DuetPkg/BootSector/bin/Start16.com and b/DuetPkg/BootSector/bin/Start16.com differ
index 47f2f5d43521801e86f80a8a53fed5b1050ceac0..ac0e3cb20bb57d11e34c4be5d106a46d302a40a7 100644 (file)
Binary files a/DuetPkg/BootSector/bin/Start32.com and b/DuetPkg/BootSector/bin/Start32.com differ
index 7c982e0ba7c344fd595d189e98bcf7eb93d9939f..4bcd83e2ac698481d871dfeaf80287148c5dc2b6 100644 (file)
Binary files a/DuetPkg/BootSector/bin/efi32.com and b/DuetPkg/BootSector/bin/efi32.com differ
index d4bae935cb15badaf08e65181d433807f9609932..05522eccc56015ebc042d75c41b7bc7c66680a4b 100644 (file)
Binary files a/DuetPkg/BootSector/bin/efi32.com2 and b/DuetPkg/BootSector/bin/efi32.com2 differ
index 391590a856710acfe3d62b7df1fcd6f9013eb5d8..ebbc4509509cbd66798767cb4e5501692506719e 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+#*   Copyright (c) 2006 - 2011, 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
@@ -37,6 +37,7 @@ _start:
 .endm\r
 \r
 Start:  \r
+    movw    %bx, %ax\r
     movw    %ax, %ds\r
     movw    %ax, %es\r
     movw    %ax, %fs\r
index 471b4807bc46e50bdcd06a04cfcd3ec6c63a09c7..7ccf86f0eb6963159185893a1b9dd62c529f4e06 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;*\r
-;*   Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
+;*   Copyright (c) 2006 - 2011, 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
@@ -39,6 +39,7 @@ endm
 \r
         \r
 Start:  \r
+    mov     ax,bx                      ; flat data descriptor in BX\r
     mov     ds,ax\r
     mov     es,ax\r
     mov     fs,ax\r
index b9a34db08168c4692a7da18c9a78447c1664b13a..f96d06e14491326dc6767f37f9240a2906dce5d2 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+#*   Copyright (c) 2006 - 2011, 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
@@ -404,6 +404,7 @@ Timeout8042:
 \r
 \r
 A20GateEnabled: \r
+        movw    $0x0008, %bx                # Flat data descriptor\r
 \r
 #\r
 # DISABLE INTERRUPTS - Entering Protected Mode\r
@@ -425,11 +426,6 @@ A20GateEnabled:
         movl    %cr0, %eax\r
         orb     $1, %al\r
         movl    %eax, %cr0\r
-\r
-        movl $0x008, %eax                   # Flat data descriptor\r
-        movl $0x00400000, %ebp              # Destination of EFILDR32\r
-        movl $0x00070000, %ebx              # Length of copy\r
-\r
 JUMP: \r
 # jmp far 0010:00020000\r
         .byte 0x66\r
index 2674d1cd8a8ba777da38f57d3e076f150699331f..9cc05ff5ca8f23abdeb561f4d47dbda935d263b0 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;*\r
-;*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+;*   Copyright (c) 2006 - 2011, 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
@@ -400,7 +400,7 @@ Timeout8042:
 \r
 \r
 A20GateEnabled:\r
-\r
+        mov     bx,0008h                    ; Flat data descriptor\r
 ;\r
 ; DISABLE INTERRUPTS - Entering Protected Mode\r
 ;\r
@@ -421,11 +421,6 @@ A20GateEnabled:
         mov     eax,cr0\r
         or      al,1\r
         mov     cr0,eax\r
-\r
-        mov eax,0008h                       ; Flat data descriptor\r
-        mov ebp,000400000h                  ; Destination of EFILDR32\r
-        mov ebx,000070000h                  ; Length of copy\r
-        \r
 JUMP:\r
 ; jmp far 0010:00020000\r
         db  066h\r
index be525b6f307a0c31637b08403b8ad7add9407cd6..053a0eeb91898ffe274e1a85206d7b35cd6ccc7c 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+#*   Copyright (c) 2006 - 2011, 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
@@ -398,7 +398,7 @@ Timeout8042:
 \r
 \r
 A20GateEnabled: \r
-\r
+        movw    $0x0008, %bx                # Flat data descriptor\r
 #\r
 # DISABLE INTERRUPTS - Entering Protected Mode\r
 #\r
@@ -419,11 +419,6 @@ A20GateEnabled:
         movl    %cr0, %eax\r
         orb     $1, %al\r
         movl    %eax, %cr0\r
-\r
-        movl $0x008, %eax                   # Flat data descriptor\r
-        movl $0x00400000, %ebp              # Destination of EFILDR32\r
-        movl $0x00070000, %ebx              # Length of copy\r
-\r
 JUMP: \r
 # jmp far 0010:00020000\r
         .byte 0x66\r
index 036726d83df9738f8b79c370984218df70b4bcc4..05d0b2d1e5a8b5f0075790873e24bb4bfe67b7db 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;*\r
-;*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+;*   Copyright (c) 2006 - 2011, 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
@@ -393,7 +393,7 @@ Timeout8042:
 \r
 \r
 A20GateEnabled:\r
-\r
+        mov     bx,0008h                    ; Flat data descriptor\r
 ;\r
 ; DISABLE INTERRUPTS - Entering Protected Mode\r
 ;\r
@@ -414,11 +414,6 @@ A20GateEnabled:
         mov     eax,cr0\r
         or      al,1\r
         mov     cr0,eax\r
-\r
-        mov eax,0008h                       ; Flat data descriptor\r
-        mov ebp,000400000h                  ; Destination of EFILDR32\r
-        mov ebx,000070000h                  ; Length of copy\r
-        \r
 JUMP:\r
 ; jmp far 0010:00020000\r
         db  066h\r
index c47f92763dd0d0efef20b37996797450acdee9db..6ce225612fd57f9e0384e6170c8c6d46eb9c1fc5 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+#*   Copyright (c) 2006 - 2011, 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
@@ -413,7 +413,7 @@ Timeout8042:
 \r
 \r
 A20GateEnabled: \r
-\r
+        movw    $0x0008, %bx                # Flat data descriptor\r
 #\r
 # DISABLE INTERRUPTS - Entering Protected Mode\r
 #\r
@@ -434,11 +434,6 @@ A20GateEnabled:
         movl    %cr0, %eax\r
         orb     $1, %al\r
         movl    %eax, %cr0\r
-\r
-        movl $0x008, %eax                   # Flat data descriptor\r
-        movl $0x00400000, %ebp              # Destination of EFILDR32\r
-        movl $0x00070000, %ebx              # Length of copy\r
-\r
 JUMP: \r
 # jmp far 0010:00020000\r
         .byte 0x66\r
index 2cc5640cd8054b120f3ec3bc499eb1fdb3417f72..aaf04b86bc6b60499bd3f599914e60203de0bb95 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;*\r
-;*   Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+;*   Copyright (c) 2006 - 2011, 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
@@ -408,7 +408,7 @@ Timeout8042:
 \r
 \r
 A20GateEnabled:\r
-\r
+        mov     bx,0008h                    ; Flat data descriptor\r
 ;\r
 ; DISABLE INTERRUPTS - Entering Protected Mode\r
 ;\r
@@ -429,11 +429,6 @@ A20GateEnabled:
         mov     eax,cr0\r
         or      al,1\r
         mov     cr0,eax\r
-\r
-        mov eax,0008h                       ; Flat data descriptor\r
-        mov ebp,000400000h                  ; Destination of EFILDR32\r
-        mov ebx,000070000h                  ; Length of copy\r
-        \r
 JUMP:\r
 ; jmp far 0010:00020000\r
         db  066h\r