DuetPkg BootSector:

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
This commit is contained in:
rsun3 2011-11-16 09:38:12 +00:00
parent 4a6876b72f
commit 3a4b9eba07
14 changed files with 33 additions and 44 deletions

View File

@ -1,6 +1,6 @@
## @file
#
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@ -61,3 +61,19 @@
efi32.asm | MSFT
efi32.S | GCC
start64.asm | INTEL
start64.asm | MSFT
start64.S | GCC
st16_64.asm | INTEL
st16_64.asm | MSFT
st16_64.S | GCC
st32_64.asm | INTEL
st32_64.asm | MSFT
st32_64.S | GCC
efi64.asm | INTEL
efi64.asm | MSFT
efi64.S | GCC

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#*
#* Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
#* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
#* This program and the accompanying materials
#* are licensed and made available under the terms and conditions of the BSD License
#* which accompanies this distribution. The full text of the license may be found at
@ -37,6 +37,7 @@ _start:
.endm
Start:
movw %bx, %ax
movw %ax, %ds
movw %ax, %es
movw %ax, %fs

View File

@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;*
;* Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
;* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
;* This program and the accompanying materials
;* are licensed and made available under the terms and conditions of the BSD License
;* which accompanies this distribution. The full text of the license may be found at
@ -39,6 +39,7 @@ endm
Start:
mov ax,bx ; flat data descriptor in BX
mov ds,ax
mov es,ax
mov fs,ax

View File

@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#*
#* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
#* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
#* This program and the accompanying materials
#* are licensed and made available under the terms and conditions of the BSD License
#* which accompanies this distribution. The full text of the license may be found at
@ -404,6 +404,7 @@ Timeout8042:
A20GateEnabled:
movw $0x0008, %bx # Flat data descriptor
#
# DISABLE INTERRUPTS - Entering Protected Mode
@ -425,11 +426,6 @@ A20GateEnabled:
movl %cr0, %eax
orb $1, %al
movl %eax, %cr0
movl $0x008, %eax # Flat data descriptor
movl $0x00400000, %ebp # Destination of EFILDR32
movl $0x00070000, %ebx # Length of copy
JUMP:
# jmp far 0010:00020000
.byte 0x66

View File

@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;*
;* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
;* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
;* This program and the accompanying materials
;* are licensed and made available under the terms and conditions of the BSD License
;* which accompanies this distribution. The full text of the license may be found at
@ -400,7 +400,7 @@ Timeout8042:
A20GateEnabled:
mov bx,0008h ; Flat data descriptor
;
; DISABLE INTERRUPTS - Entering Protected Mode
;
@ -421,11 +421,6 @@ A20GateEnabled:
mov eax,cr0
or al,1
mov cr0,eax
mov eax,0008h ; Flat data descriptor
mov ebp,000400000h ; Destination of EFILDR32
mov ebx,000070000h ; Length of copy
JUMP:
; jmp far 0010:00020000
db 066h

View File

@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#*
#* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
#* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
#* This program and the accompanying materials
#* are licensed and made available under the terms and conditions of the BSD License
#* which accompanies this distribution. The full text of the license may be found at
@ -398,7 +398,7 @@ Timeout8042:
A20GateEnabled:
movw $0x0008, %bx # Flat data descriptor
#
# DISABLE INTERRUPTS - Entering Protected Mode
#
@ -419,11 +419,6 @@ A20GateEnabled:
movl %cr0, %eax
orb $1, %al
movl %eax, %cr0
movl $0x008, %eax # Flat data descriptor
movl $0x00400000, %ebp # Destination of EFILDR32
movl $0x00070000, %ebx # Length of copy
JUMP:
# jmp far 0010:00020000
.byte 0x66

View File

@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;*
;* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
;* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
;* This program and the accompanying materials
;* are licensed and made available under the terms and conditions of the BSD License
;* which accompanies this distribution. The full text of the license may be found at
@ -393,7 +393,7 @@ Timeout8042:
A20GateEnabled:
mov bx,0008h ; Flat data descriptor
;
; DISABLE INTERRUPTS - Entering Protected Mode
;
@ -414,11 +414,6 @@ A20GateEnabled:
mov eax,cr0
or al,1
mov cr0,eax
mov eax,0008h ; Flat data descriptor
mov ebp,000400000h ; Destination of EFILDR32
mov ebx,000070000h ; Length of copy
JUMP:
; jmp far 0010:00020000
db 066h

View File

@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#*
#* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
#* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
#* This program and the accompanying materials
#* are licensed and made available under the terms and conditions of the BSD License
#* which accompanies this distribution. The full text of the license may be found at
@ -413,7 +413,7 @@ Timeout8042:
A20GateEnabled:
movw $0x0008, %bx # Flat data descriptor
#
# DISABLE INTERRUPTS - Entering Protected Mode
#
@ -434,11 +434,6 @@ A20GateEnabled:
movl %cr0, %eax
orb $1, %al
movl %eax, %cr0
movl $0x008, %eax # Flat data descriptor
movl $0x00400000, %ebp # Destination of EFILDR32
movl $0x00070000, %ebx # Length of copy
JUMP:
# jmp far 0010:00020000
.byte 0x66

View File

@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;*
;* Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
;* Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
;* This program and the accompanying materials
;* are licensed and made available under the terms and conditions of the BSD License
;* which accompanies this distribution. The full text of the license may be found at
@ -408,7 +408,7 @@ Timeout8042:
A20GateEnabled:
mov bx,0008h ; Flat data descriptor
;
; DISABLE INTERRUPTS - Entering Protected Mode
;
@ -429,11 +429,6 @@ A20GateEnabled:
mov eax,cr0
or al,1
mov cr0,eax
mov eax,0008h ; Flat data descriptor
mov ebp,000400000h ; Destination of EFILDR32
mov ebx,000070000h ; Length of copy
JUMP:
; jmp far 0010:00020000
db 066h