UefiCpuPkg/CpuExceptionHandlerLib: Trim white space at end of line

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
This commit is contained in:
Jeff Fan
2017-04-07 10:00:59 +08:00
parent c54a6e6feb
commit dd56374250
21 changed files with 152 additions and 152 deletions

View File

@@ -76,7 +76,7 @@ ArchSaveExceptionContext (
// Clear IF flag to avoid old IDT handler enable interrupt by IRET
//
Eflags.UintN = SystemContext.SystemContextIa32->Eflags;
Eflags.Bits.IF = 0;
Eflags.Bits.IF = 0;
SystemContext.SystemContextIa32->Eflags = Eflags.UintN;
//
// Modify the EIP in stack, then old IDT handler will return to the stub code

View File

@@ -357,7 +357,7 @@ HasErrorCode:
#
# Put Vector Number on stack and restore ECX
#
xchgl (%esp), %ecx
xchgl (%esp), %ecx
ErrorCodeAndVectorOnStack:
pushl %ebp
@@ -384,13 +384,13 @@ ErrorCodeAndVectorOnStack:
# Align stack to make sure that EFI_FX_SAVE_STATE_IA32 of EFI_SYSTEM_CONTEXT_IA32
# is 16-byte aligned
#
andl $0x0fffffff0, %esp
andl $0x0fffffff0, %esp
subl $12, %esp
subl $8, %esp
pushl $0 # check EXCEPTION_HANDLER_CONTEXT.OldIdtHandler
pushl $0 # check EXCEPTION_HANDLER_CONTEXT.ExceptionDataFlag
#; UINT32 Edi, Esi, Ebp, Esp, Ebx, Edx, Ecx, Eax;
pushl %eax
pushl %ecx
@@ -405,7 +405,7 @@ ErrorCodeAndVectorOnStack:
#; UINT32 Gs, Fs, Es, Ds, Cs, Ss;
movl %ss, %eax
pushl %eax
movzwl 16(%ebp), %eax
movzwl 16(%ebp), %eax
pushl %eax
movl %ds, %eax
pushl %eax
@@ -425,14 +425,14 @@ ErrorCodeAndVectorOnStack:
sidt (%esp)
movl 2(%esp), %eax
xchgl (%esp), %eax
andl $0x0FFFF, %eax
andl $0x0FFFF, %eax
movl %eax, 4(%esp)
subl $8, %esp
sgdt (%esp)
movl 2(%esp), %eax
xchgl (%esp), %eax
andl $0x0FFFF, %eax
andl $0x0FFFF, %eax
movl %eax, 4(%esp)
#; UINT32 Ldtr, Tr;
@@ -450,21 +450,21 @@ ErrorCodeAndVectorOnStack:
## insure FXSAVE/FXRSTOR is enabled in CR4...
## ... while we're at it, make sure DE is also enabled...
mov $1, %eax
pushl %ebx # temporarily save value of ebx on stack
pushl %ebx # temporarily save value of ebx on stack
cpuid # use CPUID to determine if FXSAVE/FXRESTOR
# and DE are supported
popl %ebx # retore value of ebx that was overwritten
# by CPUID
# by CPUID
movl %cr4, %eax
pushl %eax # push cr4 firstly
testl $BIT24, %edx # Test for FXSAVE/FXRESTOR support
jz L1
orl $BIT9, %eax # Set CR4.OSFXSR
L1:
L1:
testl $BIT2, %edx # Test for Debugging Extensions support
jz L2
orl $BIT3, %eax # Set CR4.DE
L2:
L2:
movl %eax, %cr4
movl %cr3, %eax
pushl %eax
@@ -492,11 +492,11 @@ L2:
#; FX_SAVE_STATE_IA32 FxSaveState;
subl $512, %esp
movl %esp, %edi
testl $BIT24, %edx # Test for FXSAVE/FXRESTOR support.
testl $BIT24, %edx # Test for FXSAVE/FXRESTOR support.
# edx still contains result from CPUID above
jz L3
.byte 0x0f, 0x0ae, 0x07 #fxsave [edi]
L3:
L3:
#; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear
cld
@@ -523,12 +523,12 @@ L3:
#; FX_SAVE_STATE_IA32 FxSaveState;
movl %esp, %esi
movl $1, %eax
cpuid # use CPUID to determine if FXSAVE/FXRESTOR
cpuid # use CPUID to determine if FXSAVE/FXRESTOR
# are supported
testl $BIT24, %edx # Test for FXSAVE/FXRESTOR support
jz L4
.byte 0x0f, 0x0ae, 0x0e # fxrstor [esi]
L4:
L4:
addl $512, %esp
#; UINT32 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
@@ -612,30 +612,30 @@ DoIret:
#---------------------------------------;
# _AsmGetTemplateAddressMap ;
#---------------------------------------;
#
#
# Protocol prototype
# AsmGetTemplateAddressMap (
# EXCEPTION_HANDLER_TEMPLATE_MAP *AddressMap
# );
#
#
# Routine Description:
#
#
# Return address map of interrupt handler template so that C code can generate
# interrupt table.
#
#
# Arguments:
#
#
# Returns:
#
#
#
# Returns:
#
# Nothing
#
#
#
# Input: [ebp][0] = Original ebp
# [ebp][4] = Return address
#
#
# Output: Nothing
#
#
# Destroys: Nothing
#-----------------------------------------------------------------------------;
#-------------------------------------------------------------------------------------

View File

@@ -53,7 +53,7 @@ AsmIdtVectorEnd:
HookAfterStubBegin:
db 6ah ; push
VectorNum:
db 0 ; 0 will be fixed
db 0 ; 0 will be fixed
push eax
mov eax, HookAfterStubHeaderEnd
jmp eax
@@ -193,7 +193,7 @@ ErrorCodeAndVectorOnStack:
sub esp, 8
push 0 ; clear EXCEPTION_HANDLER_CONTEXT.OldIdtHandler
push 0 ; clear EXCEPTION_HANDLER_CONTEXT.ExceptionDataFlag
;; UINT32 Edi, Esi, Ebp, Esp, Ebx, Edx, Ecx, Eax;
push eax
push ecx
@@ -251,20 +251,20 @@ ErrorCodeAndVectorOnStack:
;; UINT32 Cr0, Cr1, Cr2, Cr3, Cr4;
mov eax, 1
push ebx ; temporarily save value of ebx on stack
cpuid ; use CPUID to determine if FXSAVE/FXRESTOR and DE
push ebx ; temporarily save value of ebx on stack
cpuid ; use CPUID to determine if FXSAVE/FXRESTOR and DE
; are supported
pop ebx ; retore value of ebx that was overwritten by CPUID
pop ebx ; retore value of ebx that was overwritten by CPUID
mov eax, cr4
push eax ; push cr4 firstly
test edx, BIT24 ; Test for FXSAVE/FXRESTOR support
jz @F
or eax, BIT9 ; Set CR4.OSFXSR
@@:
@@:
test edx, BIT2 ; Test for Debugging Extensions support
jz @F
or eax, BIT3 ; Set CR4.DE
@@:
@@:
mov cr4, eax
mov eax, cr3
push eax
@@ -296,7 +296,7 @@ ErrorCodeAndVectorOnStack:
; edx still contains result from CPUID above
jz @F
db 0fh, 0aeh, 07h ;fxsave [edi]
@@:
@@:
;; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear
cld
@@ -329,7 +329,7 @@ ErrorCodeAndVectorOnStack:
test edx, BIT24 ; Test for FXSAVE/FXRESTOR support
jz @F
db 0fh, 0aeh, 0eh ; fxrstor [esi]
@@:
@@:
add esp, 512
;; UINT32 Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
@@ -395,7 +395,7 @@ ErrorCode:
sub esp, 4
jmp dword ptr [esp - 12]
DoReturn:
DoReturn:
cmp mDoFarReturnFlag, 0 ; Check if need to do far return instead of IRET
jz DoIret
push [esp + 8] ; save EFLAGS
@@ -414,30 +414,30 @@ CommonInterruptEntry ENDP
;---------------------------------------;
; _AsmGetTemplateAddressMap ;
;----------------------------------------------------------------------------;
;
;
; Protocol prototype
; AsmGetTemplateAddressMap (
; EXCEPTION_HANDLER_TEMPLATE_MAP *AddressMap
; );
;
;
; Routine Description:
;
;
; Return address map of interrupt handler template so that C code can generate
; interrupt table.
;
;
; Arguments:
;
;
; Returns:
;
;
;
; Returns:
;
; Nothing
;
;
;
; Input: [ebp][0] = Original ebp
; [ebp][4] = Return address
;
;
; Output: Nothing
;
;
; Destroys: Nothing
;-----------------------------------------------------------------------------;
AsmGetTemplateAddressMap proc near public
@@ -449,7 +449,7 @@ AsmGetTemplateAddressMap proc near public
mov dword ptr [ebx], AsmIdtVectorBegin
mov dword ptr [ebx + 4h], (AsmIdtVectorEnd - AsmIdtVectorBegin) / 32
mov dword ptr [ebx + 8h], HookAfterStubBegin
popad
pop ebp
ret