summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseLib/Ia32
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/Ia32')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ARShiftU64.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c9
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuId.c10
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuIdEx.c12
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuPause.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisableCache.c1
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisablePaging32.c2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c17
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c7
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableCache.c1
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnablePaging32.c2
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FxRestore.c5
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FxSave.c5
-rw-r--r--MdePkg/Library/BaseLib/Ia32/GccInline.c81
-rw-r--r--MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c173
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c10
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Invd.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LRotU64.c10
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LShiftU64.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ModU64x32.c7
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Monitor.c7
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x32.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x64.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Mwait.c5
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Non-existing.c10
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RRotU64.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RShiftU64.c8
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr0.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr2.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr3.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr4.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCs.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr0.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr1.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr2.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr3.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr4.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr5.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr6.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr7.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDs.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadEflags.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadEs.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadFs.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadGdtr.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadGs.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadIdtr.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadLdtr.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm0.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm1.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm2.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm3.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm4.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm5.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm6.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm7.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMsr64.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadPmc.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadSs.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadTr.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadTsc.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/SwapBytes64.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Wbinvd.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr0.c1
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr2.c1
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr3.c1
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr4.c1
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr0.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr1.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr2.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr3.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr4.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr5.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr6.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr7.c3
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteGdtr.c5
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteIdtr.c4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteLdtr.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm0.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm1.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm2.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm3.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm4.c5
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm5.c5
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm6.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm7.c6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMsr64.c5
92 files changed, 191 insertions, 504 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c
index 836108364d..251fa0e5b6 100644
--- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c
+++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Shifts a 64-bit integer right between 0 and 63 bits. The high bits
are filled with original integer's bit 63. The shifted value is returned.
@@ -25,8 +22,8 @@
UINT64
EFIAPI
InternalMathARShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
)
{
_asm {
@@ -42,4 +39,3 @@ L0:
sar edx, cl
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c
index a59da0ceef..8c03934ef5 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c
+++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.c
@@ -6,14 +6,14 @@
**/
-
-
-
/**
Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.
**/
-void __debugbreak (VOID);
+void
+__debugbreak (
+ VOID
+ );
#pragma intrinsic(__debugbreak)
@@ -32,4 +32,3 @@ CpuBreakpoint (
{
__debugbreak ();
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.c b/MdePkg/Library/BaseLib/Ia32/CpuId.c
index c38b278dce..e1a7e8effb 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuId.c
+++ b/MdePkg/Library/BaseLib/Ia32/CpuId.c
@@ -34,11 +34,11 @@
UINT32
EFIAPI
AsmCpuid (
- IN UINT32 Index,
- OUT UINT32 *RegisterEax OPTIONAL,
- OUT UINT32 *RegisterEbx OPTIONAL,
- OUT UINT32 *RegisterEcx OPTIONAL,
- OUT UINT32 *RegisterEdx OPTIONAL
+ IN UINT32 Index,
+ OUT UINT32 *RegisterEax OPTIONAL,
+ OUT UINT32 *RegisterEbx OPTIONAL,
+ OUT UINT32 *RegisterEcx OPTIONAL,
+ OUT UINT32 *RegisterEdx OPTIONAL
)
{
_asm {
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c
index 7cd42eedbb..6eeb778231 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c
+++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.c
@@ -41,12 +41,12 @@
UINT32
EFIAPI
AsmCpuidEx (
- IN UINT32 Index,
- IN UINT32 SubIndex,
- OUT UINT32 *RegisterEax OPTIONAL,
- OUT UINT32 *RegisterEbx OPTIONAL,
- OUT UINT32 *RegisterEcx OPTIONAL,
- OUT UINT32 *RegisterEdx OPTIONAL
+ IN UINT32 Index,
+ IN UINT32 SubIndex,
+ OUT UINT32 *RegisterEax OPTIONAL,
+ OUT UINT32 *RegisterEbx OPTIONAL,
+ OUT UINT32 *RegisterEcx OPTIONAL,
+ OUT UINT32 *RegisterEdx OPTIONAL
)
{
_asm {
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.c b/MdePkg/Library/BaseLib/Ia32/CpuPause.c
index 12dc896fe3..356b8ef994 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuPause.c
+++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Requests CPU to pause for a short period of time.
@@ -26,4 +23,3 @@ CpuPause (
pause
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/DisableCache.c b/MdePkg/Library/BaseLib/Ia32/DisableCache.c
index 6a8be4ef20..d1aca0ed9a 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisableCache.c
+++ b/MdePkg/Library/BaseLib/Ia32/DisableCache.c
@@ -27,4 +27,3 @@ AsmDisableCache (
wbinvd
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c
index 4141ef7511..d59d552223 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c
+++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Disables CPU interrupts.
@@ -23,4 +20,3 @@ DisableInterrupts (
cli
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c
index 9bebd6d3f3..0e263c4509 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c
+++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.c
@@ -38,7 +38,7 @@
function after paging is disabled.
**/
-__declspec (naked)
+__declspec(naked)
VOID
EFIAPI
InternalX86DisablePaging32 (
diff --git a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c
index 4e64964042..4604208403 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c
+++ b/MdePkg/Library/BaseLib/Ia32/DivS64x64Remainder.c
@@ -28,20 +28,21 @@
INT64
EFIAPI
InternalMathDivRemS64x64 (
- IN INT64 Dividend,
- IN INT64 Divisor,
- OUT INT64 *Remainder OPTIONAL
+ IN INT64 Dividend,
+ IN INT64 Divisor,
+ OUT INT64 *Remainder OPTIONAL
)
{
- INT64 Quot;
+ INT64 Quot;
Quot = InternalMathDivRemU64x64 (
- (UINT64) (Dividend >= 0 ? Dividend : -Dividend),
- (UINT64) (Divisor >= 0 ? Divisor : -Divisor),
- (UINT64 *) Remainder
+ (UINT64)(Dividend >= 0 ? Dividend : -Dividend),
+ (UINT64)(Divisor >= 0 ? Divisor : -Divisor),
+ (UINT64 *)Remainder
);
- if (Remainder != NULL && Dividend < 0) {
+ if ((Remainder != NULL) && (Dividend < 0)) {
*Remainder = -*Remainder;
}
+
return (Dividend ^ Divisor) >= 0 ? Quot : -Quot;
}
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c
index 538f77a83f..c46abba638 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.c
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and
generates a 64-bit unsigned result.
@@ -26,8 +23,8 @@
UINT64
EFIAPI
InternalMathDivU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor
+ IN UINT64 Dividend,
+ IN UINT32 Divisor
)
{
_asm {
@@ -41,4 +38,3 @@ InternalMathDivU64x32 (
pop edx ; restore high-order dword of the quotient
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c
index 035d4340db..a32d627834 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.c
@@ -26,9 +26,9 @@
UINT64
EFIAPI
InternalMathDivRemU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor,
- OUT UINT32 *Remainder
+ IN UINT64 Dividend,
+ IN UINT32 Divisor,
+ OUT UINT32 *Remainder
)
{
_asm {
@@ -46,4 +46,3 @@ RemainderNull:
pop edx
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableCache.c b/MdePkg/Library/BaseLib/Ia32/EnableCache.c
index 4f5c6e9ab3..3b354af178 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableCache.c
+++ b/MdePkg/Library/BaseLib/Ia32/EnableCache.c
@@ -27,4 +27,3 @@ AsmEnableCache (
mov cr0, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c
index 7ec62147f2..88b9171463 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c
+++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Enables CPU interrupts for the smallest window required to capture any
pending interrupts.
@@ -27,4 +24,3 @@ EnableDisableInterrupts (
cli
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c
index bc03144c42..570c39db5b 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c
+++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Enables CPU interrupts.
@@ -23,4 +20,3 @@ EnableInterrupts (
sti
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c
index 7280c12f60..3c3e347d19 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c
+++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.c
@@ -41,7 +41,7 @@
function after paging is enabled.
**/
-__declspec (naked)
+__declspec(naked)
VOID
EFIAPI
InternalX86EnablePaging32 (
diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c
index 8fbda06707..d6466880be 100644
--- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c
+++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Flushes a cache line from all the instruction and data caches within the
coherency domain of the CPU.
@@ -27,7 +24,7 @@
VOID *
EFIAPI
AsmFlushCacheLine (
- IN VOID *LinearAddress
+ IN VOID *LinearAddress
)
{
//
@@ -49,4 +46,3 @@ Done:
return LinearAddress;
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.c b/MdePkg/Library/BaseLib/Ia32/FxRestore.c
index ddd1e49037..5ebb281d14 100644
--- a/MdePkg/Library/BaseLib/Ia32/FxRestore.c
+++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.c
@@ -6,10 +6,8 @@
**/
-
#include "BaseLibInternals.h"
-
/**
Restores the current floating point/SSE/SSE2 context from a buffer.
@@ -23,7 +21,7 @@
VOID
EFIAPI
InternalX86FxRestore (
- IN CONST IA32_FX_BUFFER *Buffer
+ IN CONST IA32_FX_BUFFER *Buffer
)
{
_asm {
@@ -31,4 +29,3 @@ InternalX86FxRestore (
fxrstor [eax]
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.c b/MdePkg/Library/BaseLib/Ia32/FxSave.c
index a8c8882171..fc489c5f76 100644
--- a/MdePkg/Library/BaseLib/Ia32/FxSave.c
+++ b/MdePkg/Library/BaseLib/Ia32/FxSave.c
@@ -6,10 +6,8 @@
**/
-
#include "BaseLibInternals.h"
-
/**
Save the current floating point/SSE/SSE2 context to a buffer.
@@ -23,7 +21,7 @@
VOID
EFIAPI
InternalX86FxSave (
- OUT IA32_FX_BUFFER *Buffer
+ OUT IA32_FX_BUFFER *Buffer
)
{
_asm {
@@ -31,4 +29,3 @@ InternalX86FxSave (
fxsave [eax]
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/GccInline.c b/MdePkg/Library/BaseLib/Ia32/GccInline.c
index 6ed938187a..dab20c8aa2 100644
--- a/MdePkg/Library/BaseLib/Ia32/GccInline.c
+++ b/MdePkg/Library/BaseLib/Ia32/GccInline.c
@@ -7,7 +7,6 @@
**/
-
#include "BaseLibInternals.h"
/**
@@ -77,13 +76,13 @@ AsmReadEflags (
VOID
)
{
- UINTN Eflags;
+ UINTN Eflags;
__asm__ __volatile__ (
"pushfl \n\t"
"popl %0 "
: "=r" (Eflags)
- );
+ );
return Eflags;
}
@@ -101,17 +100,16 @@ AsmReadEflags (
VOID
EFIAPI
InternalX86FxSave (
- OUT IA32_FX_BUFFER *Buffer
+ OUT IA32_FX_BUFFER *Buffer
)
{
__asm__ __volatile__ (
"fxsave %0"
:
: "m" (*Buffer) // %0
- );
+ );
}
-
/**
Restores the current floating point/SSE/SSE2 context from a buffer.
@@ -125,17 +123,16 @@ InternalX86FxSave (
VOID
EFIAPI
InternalX86FxRestore (
- IN CONST IA32_FX_BUFFER *Buffer
+ IN CONST IA32_FX_BUFFER *Buffer
)
{
__asm__ __volatile__ (
"fxrstor %0"
:
: "m" (*Buffer) // %0
- );
+ );
}
-
/**
Reads the current value of 64-bit MMX Register #0 (MM0).
@@ -160,12 +157,11 @@ AsmReadMm0 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #1 (MM1).
@@ -190,12 +186,11 @@ AsmReadMm1 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #2 (MM2).
@@ -220,12 +215,11 @@ AsmReadMm2 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #3 (MM3).
@@ -250,12 +244,11 @@ AsmReadMm3 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #4 (MM4).
@@ -280,12 +273,11 @@ AsmReadMm4 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #5 (MM5).
@@ -310,12 +302,11 @@ AsmReadMm5 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #6 (MM6).
@@ -340,12 +331,11 @@ AsmReadMm6 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Reads the current value of 64-bit MMX Register #7 (MM7).
@@ -370,12 +360,11 @@ AsmReadMm7 (
"pop %%eax \n\t"
"pop %%edx \n\t"
: "=A" (Data) // %0
- );
+ );
return Data;
}
-
/**
Writes the current value of 64-bit MMX Register #0 (MM0).
@@ -388,17 +377,16 @@ AsmReadMm7 (
VOID
EFIAPI
AsmWriteMm0 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm0" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #1 (MM1).
@@ -411,17 +399,16 @@ AsmWriteMm0 (
VOID
EFIAPI
AsmWriteMm1 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm1" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #2 (MM2).
@@ -434,17 +421,16 @@ AsmWriteMm1 (
VOID
EFIAPI
AsmWriteMm2 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm2" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #3 (MM3).
@@ -457,17 +443,16 @@ AsmWriteMm2 (
VOID
EFIAPI
AsmWriteMm3 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm3" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #4 (MM4).
@@ -480,17 +465,16 @@ AsmWriteMm3 (
VOID
EFIAPI
AsmWriteMm4 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm4" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #5 (MM5).
@@ -503,17 +487,16 @@ AsmWriteMm4 (
VOID
EFIAPI
AsmWriteMm5 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm5" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #6 (MM6).
@@ -526,17 +509,16 @@ AsmWriteMm5 (
VOID
EFIAPI
AsmWriteMm6 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm6" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Writes the current value of 64-bit MMX Register #7 (MM7).
@@ -549,17 +531,16 @@ AsmWriteMm6 (
VOID
EFIAPI
AsmWriteMm7 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
__asm__ __volatile__ (
"movq %0, %%mm7" // %0
:
: "m" (Value)
- );
+ );
}
-
/**
Reads the current value of Time Stamp Counter (TSC).
@@ -580,7 +561,7 @@ AsmReadTsc (
__asm__ __volatile__ (
"rdtsc"
: "=A" (Data)
- );
+ );
return Data;
}
diff --git a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
index b8b5b85e73..df22a217ec 100644
--- a/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
+++ b/MdePkg/Library/BaseLib/Ia32/GccInlinePriv.c
@@ -8,7 +8,6 @@
**/
-
#include "BaseLibInternals.h"
#include <Library/RegisterFilterLib.h>
@@ -27,7 +26,6 @@ EnableInterrupts (
__asm__ __volatile__ ("sti"::: "memory");
}
-
/**
Disables CPU interrupts.
@@ -60,11 +58,11 @@ DisableInterrupts (
UINT64
EFIAPI
AsmReadMsr64 (
- IN UINT32 Index
+ IN UINT32 Index
)
{
- UINT64 Data;
- BOOLEAN Flag;
+ UINT64 Data;
+ BOOLEAN Flag;
Flag = FilterBeforeMsrRead (Index, &Data);
if (Flag) {
@@ -72,8 +70,9 @@ AsmReadMsr64 (
"rdmsr"
: "=A" (Data) // %0
: "c" (Index) // %1
- );
+ );
}
+
FilterAfterMsrRead (Index, &Data);
return Data;
@@ -99,8 +98,8 @@ AsmReadMsr64 (
UINT64
EFIAPI
AsmWriteMsr64 (
- IN UINT32 Index,
- IN UINT64 Value
+ IN UINT32 Index,
+ IN UINT64 Value
)
{
BOOLEAN Flag;
@@ -112,8 +111,9 @@ AsmWriteMsr64 (
:
: "c" (Index),
"A" (Value)
- );
+ );
}
+
FilterAfterMsrWrite (Index, &Value);
return Value;
@@ -135,17 +135,16 @@ AsmReadCr0 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%cr0,%0"
: "=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of the Control Register 2 (CR2).
@@ -162,12 +161,12 @@ AsmReadCr2 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%cr2, %0"
: "=r" (Data)
- );
+ );
return Data;
}
@@ -188,17 +187,16 @@ AsmReadCr3 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%cr3, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of the Control Register 4 (CR4).
@@ -215,17 +213,16 @@ AsmReadCr4 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%cr4, %0"
: "=a" (Data)
- );
+ );
return Data;
}
-
/**
Writes a value to Control Register 0 (CR0).
@@ -247,11 +244,10 @@ AsmWriteCr0 (
"movl %0, %%cr0"
:
: "r" (Cr0)
- );
+ );
return Cr0;
}
-
/**
Writes a value to Control Register 2 (CR2).
@@ -273,11 +269,10 @@ AsmWriteCr2 (
"movl %0, %%cr2"
:
: "r" (Cr2)
- );
+ );
return Cr2;
}
-
/**
Writes a value to Control Register 3 (CR3).
@@ -299,11 +294,10 @@ AsmWriteCr3 (
"movl %0, %%cr3"
:
: "r" (Cr3)
- );
+ );
return Cr3;
}
-
/**
Writes a value to Control Register 4 (CR4).
@@ -325,11 +319,10 @@ AsmWriteCr4 (
"movl %0, %%cr4"
:
: "r" (Cr4)
- );
+ );
return Cr4;
}
-
/**
Reads the current value of Debug Register 0 (DR0).
@@ -346,17 +339,16 @@ AsmReadDr0 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr0, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 1 (DR1).
@@ -373,17 +365,16 @@ AsmReadDr1 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr1, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 2 (DR2).
@@ -400,17 +391,16 @@ AsmReadDr2 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr2, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 3 (DR3).
@@ -427,17 +417,16 @@ AsmReadDr3 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr3, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 4 (DR4).
@@ -454,17 +443,16 @@ AsmReadDr4 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr4, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 5 (DR5).
@@ -481,17 +469,16 @@ AsmReadDr5 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr5, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 6 (DR6).
@@ -508,17 +495,16 @@ AsmReadDr6 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr6, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Debug Register 7 (DR7).
@@ -535,17 +521,16 @@ AsmReadDr7 (
VOID
)
{
- UINTN Data;
+ UINTN Data;
__asm__ __volatile__ (
"movl %%dr7, %0"
: "=r" (Data)
- );
+ );
return Data;
}
-
/**
Writes a value to Debug Register 0 (DR0).
@@ -567,11 +552,10 @@ AsmWriteDr0 (
"movl %0, %%dr0"
:
: "r" (Dr0)
- );
+ );
return Dr0;
}
-
/**
Writes a value to Debug Register 1 (DR1).
@@ -593,11 +577,10 @@ AsmWriteDr1 (
"movl %0, %%dr1"
:
: "r" (Dr1)
- );
+ );
return Dr1;
}
-
/**
Writes a value to Debug Register 2 (DR2).
@@ -619,11 +602,10 @@ AsmWriteDr2 (
"movl %0, %%dr2"
:
: "r" (Dr2)
- );
+ );
return Dr2;
}
-
/**
Writes a value to Debug Register 3 (DR3).
@@ -645,11 +627,10 @@ AsmWriteDr3 (
"movl %0, %%dr3"
:
: "r" (Dr3)
- );
+ );
return Dr3;
}
-
/**
Writes a value to Debug Register 4 (DR4).
@@ -671,11 +652,10 @@ AsmWriteDr4 (
"movl %0, %%dr4"
:
: "r" (Dr4)
- );
+ );
return Dr4;
}
-
/**
Writes a value to Debug Register 5 (DR5).
@@ -697,11 +677,10 @@ AsmWriteDr5 (
"movl %0, %%dr5"
:
: "r" (Dr5)
- );
+ );
return Dr5;
}
-
/**
Writes a value to Debug Register 6 (DR6).
@@ -723,11 +702,10 @@ AsmWriteDr6 (
"movl %0, %%dr6"
:
: "r" (Dr6)
- );
+ );
return Dr6;
}
-
/**
Writes a value to Debug Register 7 (DR7).
@@ -749,11 +727,10 @@ AsmWriteDr7 (
"movl %0, %%dr7"
:
: "r" (Dr7)
- );
+ );
return Dr7;
}
-
/**
Reads the current value of Code Segment Register (CS).
@@ -774,12 +751,11 @@ AsmReadCs (
__asm__ __volatile__ (
"mov %%cs, %0"
:"=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Data Segment Register (DS).
@@ -800,12 +776,11 @@ AsmReadDs (
__asm__ __volatile__ (
"mov %%ds, %0"
:"=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Extra Segment Register (ES).
@@ -826,12 +801,11 @@ AsmReadEs (
__asm__ __volatile__ (
"mov %%es, %0"
:"=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of FS Data Segment Register (FS).
@@ -852,12 +826,11 @@ AsmReadFs (
__asm__ __volatile__ (
"mov %%fs, %0"
:"=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of GS Data Segment Register (GS).
@@ -878,12 +851,11 @@ AsmReadGs (
__asm__ __volatile__ (
"mov %%gs, %0"
:"=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Stack Segment Register (SS).
@@ -904,12 +876,11 @@ AsmReadSs (
__asm__ __volatile__ (
"mov %%ss, %0"
:"=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current value of Task Register (TR).
@@ -930,12 +901,11 @@ AsmReadTr (
__asm__ __volatile__ (
"str %0"
: "=a" (Data)
- );
+ );
return Data;
}
-
/**
Reads the current Global Descriptor Table Register(GDTR) descriptor.
@@ -948,16 +918,15 @@ AsmReadTr (
VOID
EFIAPI
InternalX86ReadGdtr (
- OUT IA32_DESCRIPTOR *Gdtr
+ OUT IA32_DESCRIPTOR *Gdtr
)
{
__asm__ __volatile__ (
"sgdt %0"
: "=m" (*Gdtr)
- );
+ );
}
-
/**
Writes the current Global Descriptor Table Register (GDTR) descriptor.
@@ -970,18 +939,16 @@ InternalX86ReadGdtr (
VOID
EFIAPI
InternalX86WriteGdtr (
- IN CONST IA32_DESCRIPTOR *Gdtr
+ IN CONST IA32_DESCRIPTOR *Gdtr
)
{
__asm__ __volatile__ (
"lgdt %0"
:
: "m" (*Gdtr)
- );
-
+ );
}
-
/**
Reads the current Interrupt Descriptor Table Register(GDTR) descriptor.
@@ -994,16 +961,15 @@ InternalX86WriteGdtr (
VOID
EFIAPI
InternalX86ReadIdtr (
- OUT IA32_DESCRIPTOR *Idtr
+ OUT IA32_DESCRIPTOR *Idtr
)
{
__asm__ __volatile__ (
"sidt %0"
: "=m" (*Idtr)
- );
+ );
}
-
/**
Writes the current Interrupt Descriptor Table Register(GDTR) descriptor.
@@ -1016,17 +982,16 @@ InternalX86ReadIdtr (
VOID
EFIAPI
InternalX86WriteIdtr (
- IN CONST IA32_DESCRIPTOR *Idtr
+ IN CONST IA32_DESCRIPTOR *Idtr
)
{
__asm__ __volatile__ (
"lidt %0"
:
: "m" (*Idtr)
- );
+ );
}
-
/**
Reads the current Local Descriptor Table Register(LDTR) selector.
@@ -1047,12 +1012,11 @@ AsmReadLdtr (
__asm__ __volatile__ (
"sldt %0"
: "=g" (Data) // %0
- );
+ );
return Data;
}
-
/**
Writes the current Local Descriptor Table Register (GDTR) selector.
@@ -1065,14 +1029,14 @@ AsmReadLdtr (
VOID
EFIAPI
AsmWriteLdtr (
- IN UINT16 Ldtr
+ IN UINT16 Ldtr
)
{
__asm__ __volatile__ (
"lldtw %0"
:
: "g" (Ldtr) // %0
- );
+ );
}
/**
@@ -1089,7 +1053,7 @@ AsmWriteLdtr (
UINT64
EFIAPI
AsmReadPmc (
- IN UINT32 Index
+ IN UINT32 Index
)
{
UINT64 Data;
@@ -1098,7 +1062,7 @@ AsmReadPmc (
"rdpmc"
: "=A" (Data)
: "c" (Index)
- );
+ );
return Data;
}
@@ -1133,10 +1097,8 @@ AsmInvd (
)
{
__asm__ __volatile__ ("invd":::"memory");
-
}
-
/**
Flushes a cache line from all the instruction and data caches within the
coherency domain of the CPU.
@@ -1155,7 +1117,7 @@ AsmInvd (
VOID *
EFIAPI
AsmFlushCacheLine (
- IN VOID *LinearAddress
+ IN VOID *LinearAddress
)
{
UINT32 RegEdx;
@@ -1170,13 +1132,12 @@ AsmFlushCacheLine (
return LinearAddress;
}
-
__asm__ __volatile__ (
"clflush (%0)"
: "+a" (LinearAddress)
:
: "memory"
- );
+ );
return LinearAddress;
}
diff --git a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c
index 14647f22e5..9d586c38ee 100644
--- a/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c
+++ b/MdePkg/Library/BaseLib/Ia32/InternalSwitchStack.c
@@ -44,11 +44,11 @@ InternalSwitchStack (
{
BASE_LIBRARY_JUMP_BUFFER JumpBuffer;
- JumpBuffer.Eip = (UINTN)EntryPoint;
- JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);
- JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2);
- ((VOID**)JumpBuffer.Esp)[1] = Context1;
- ((VOID**)JumpBuffer.Esp)[2] = Context2;
+ JumpBuffer.Eip = (UINTN)EntryPoint;
+ JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID *);
+ JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2);
+ ((VOID **)JumpBuffer.Esp)[1] = Context1;
+ ((VOID **)JumpBuffer.Esp)[2] = Context2;
LongJump (&JumpBuffer, (UINTN)-1);
}
diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.c b/MdePkg/Library/BaseLib/Ia32/Invd.c
index 9870cf9c63..3c526b50ae 100644
--- a/MdePkg/Library/BaseLib/Ia32/Invd.c
+++ b/MdePkg/Library/BaseLib/Ia32/Invd.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Executes a INVD instruction.
@@ -26,4 +23,3 @@ AsmInvd (
invd
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.c b/MdePkg/Library/BaseLib/Ia32/LRotU64.c
index 87d370c6f4..496b9de0bb 100644
--- a/MdePkg/Library/BaseLib/Ia32/LRotU64.c
+++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Rotates a 64-bit integer left between 0 and 63 bits, filling
the low bits with the high bits that were rotated.
@@ -26,8 +23,8 @@
UINT64
EFIAPI
InternalMathLRotU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
)
{
_asm {
@@ -43,7 +40,6 @@ InternalMathLRotU64 (
mov ecx, eax
mov eax, edx
mov edx, ecx
-L0:
+ L0 :
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c
index 1604e7e2f7..c8ee0df7e8 100644
--- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.c
+++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Shifts a 64-bit integer left between 0 and 63 bits. The low bits
are filled with zeros. The shifted value is returned.
@@ -25,8 +22,8 @@
UINT64
EFIAPI
InternalMathLShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
)
{
_asm {
@@ -42,4 +39,3 @@ L0:
shl eax, cl
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c
index 26a19cbd93..d5f84e205d 100644
--- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.c
+++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Divides a 64-bit unsigned integer by a 32-bit unsigned integer and
generates a 32-bit unsigned remainder.
@@ -26,8 +23,8 @@
UINT32
EFIAPI
InternalMathModU64x32 (
- IN UINT64 Dividend,
- IN UINT32 Divisor
+ IN UINT64 Dividend,
+ IN UINT32 Divisor
)
{
_asm {
diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.c b/MdePkg/Library/BaseLib/Ia32/Monitor.c
index 966b128a3b..630bf0c5fe 100644
--- a/MdePkg/Library/BaseLib/Ia32/Monitor.c
+++ b/MdePkg/Library/BaseLib/Ia32/Monitor.c
@@ -25,9 +25,9 @@
UINTN
EFIAPI
AsmMonitor (
- IN UINTN RegisterEax,
- IN UINTN RegisterEcx,
- IN UINTN RegisterEdx
+ IN UINTN RegisterEax,
+ IN UINTN RegisterEcx,
+ IN UINTN RegisterEdx
)
{
_asm {
@@ -39,4 +39,3 @@ AsmMonitor (
_emit 0xc8
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c
index a728684648..e382effc2c 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.c
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Multiples a 64-bit unsigned integer by a 32-bit unsigned integer
and generates a 64-bit unsigned result.
@@ -26,8 +23,8 @@
UINT64
EFIAPI
InternalMathMultU64x32 (
- IN UINT64 Multiplicand,
- IN UINT32 Multiplier
+ IN UINT64 Multiplicand,
+ IN UINT32 Multiplier
)
{
_asm {
@@ -38,4 +35,3 @@ InternalMathMultU64x32 (
add edx, ecx
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c
index 806cbd565a..d5aff3f181 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.c
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Multiplies a 64-bit unsigned integer by a 64-bit unsigned integer
and generates a 64-bit unsigned result.
@@ -26,8 +23,8 @@
UINT64
EFIAPI
InternalMathMultU64x64 (
- IN UINT64 Multiplicand,
- IN UINT64 Multiplier
+ IN UINT64 Multiplicand,
+ IN UINT64 Multiplier
)
{
_asm {
@@ -42,4 +39,3 @@ InternalMathMultU64x64 (
add edx, ebx
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.c b/MdePkg/Library/BaseLib/Ia32/Mwait.c
index 08c666f792..143082a6c2 100644
--- a/MdePkg/Library/BaseLib/Ia32/Mwait.c
+++ b/MdePkg/Library/BaseLib/Ia32/Mwait.c
@@ -23,8 +23,8 @@
UINTN
EFIAPI
AsmMwait (
- IN UINTN RegisterEax,
- IN UINTN RegisterEcx
+ IN UINTN RegisterEax,
+ IN UINTN RegisterEcx
)
{
_asm {
@@ -35,4 +35,3 @@ AsmMwait (
_emit 0xC9
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/Non-existing.c b/MdePkg/Library/BaseLib/Ia32/Non-existing.c
index 3854d904fe..7765f58bcd 100644
--- a/MdePkg/Library/BaseLib/Ia32/Non-existing.c
+++ b/MdePkg/Library/BaseLib/Ia32/Non-existing.c
@@ -37,11 +37,11 @@
VOID
EFIAPI
InternalX86DisablePaging64 (
- IN UINT16 CodeSelector,
- IN UINT32 EntryPoint,
- IN UINT32 Context1 OPTIONAL,
- IN UINT32 Context2 OPTIONAL,
- IN UINT32 NewStack
+ IN UINT16 CodeSelector,
+ IN UINT32 EntryPoint,
+ IN UINT32 Context1 OPTIONAL,
+ IN UINT32 Context2 OPTIONAL,
+ IN UINT32 NewStack
)
{
//
diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.c b/MdePkg/Library/BaseLib/Ia32/RRotU64.c
index 82711a5f81..89477c280b 100644
--- a/MdePkg/Library/BaseLib/Ia32/RRotU64.c
+++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Rotates a 64-bit integer right between 0 and 63 bits, filling
the high bits with the high low bits that were rotated.
@@ -26,8 +23,8 @@
UINT64
EFIAPI
InternalMathRRotU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
)
{
_asm {
@@ -46,4 +43,3 @@ InternalMathRRotU64 (
L0:
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c
index 35d8437056..5aa7a856a0 100644
--- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.c
+++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Shifts a 64-bit integer right between 0 and 63 bits. This high bits
are filled with zeros. The shifted value is returned.
@@ -25,8 +22,8 @@
UINT64
EFIAPI
InternalMathRShiftU64 (
- IN UINT64 Operand,
- IN UINTN Count
+ IN UINT64 Operand,
+ IN UINTN Count
)
{
_asm {
@@ -42,4 +39,3 @@ L0:
shr edx, cl
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c
index 4a37c7b02c..7395218387 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of the Control Register 0 (CR0).
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c
index feab380552..2de1c50380 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of the Control Register 2 (CR2).
@@ -29,4 +26,3 @@ AsmReadCr2 (
mov eax, cr2
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c
index b00e324919..144b78057b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of the Control Register 3 (CR3).
@@ -29,4 +26,3 @@ AsmReadCr3 (
mov eax, cr3
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c
index f948f82b77..c0616618bd 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of the Control Register 4 (CR4).
@@ -31,4 +28,3 @@ AsmReadCr4 (
_emit 0xE0
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.c b/MdePkg/Library/BaseLib/Ia32/ReadCs.c
index 02f23f5f1e..3a603f1aee 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCs.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Code Segment Register (CS).
@@ -29,4 +26,3 @@ AsmReadCs (
mov ax, cs
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c
index 5418f92a39..80bb9b7e53 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 0 (DR0).
@@ -29,4 +26,3 @@ AsmReadDr0 (
mov eax, dr0
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c
index d72adaadb8..9ca51ce143 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 1 (DR1).
@@ -29,4 +26,3 @@ AsmReadDr1 (
mov eax, dr1
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c
index fde799728f..1e8007d46b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 2 (DR2).
@@ -29,4 +26,3 @@ AsmReadDr2 (
mov eax, dr2
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c
index 9b899e79c7..3a2d7417fe 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 3 (DR3).
@@ -29,4 +26,3 @@ AsmReadDr3 (
mov eax, dr3
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c
index 52293d335e..5d7e543823 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 4 (DR4).
@@ -31,4 +28,3 @@ AsmReadDr4 (
_emit 0xe0
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c
index ecf6dc2d21..2418d222be 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 5 (DR5).
@@ -31,4 +28,3 @@ AsmReadDr5 (
_emit 0xe8
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c
index 2b082970fc..43166828eb 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 6 (DR6).
@@ -29,4 +26,3 @@ AsmReadDr6 (
mov eax, dr6
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c
index 8be80482f3..670c695638 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Debug Register 7 (DR7).
@@ -29,4 +26,3 @@ AsmReadDr7 (
mov eax, dr7
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.c b/MdePkg/Library/BaseLib/Ia32/ReadDs.c
index 3cdada3ac5..d293bcf591 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDs.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Data Segment Register (DS).
@@ -29,4 +26,3 @@ AsmReadDs (
mov ax, ds
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c
index 1cea323c55..af3375503f 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of the EFLAGS register.
@@ -30,4 +27,3 @@ AsmReadEflags (
pop eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.c b/MdePkg/Library/BaseLib/Ia32/ReadEs.c
index 30953fdf3a..22c10bea55 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadEs.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of ES Data Segment Register (ES).
@@ -29,4 +26,3 @@ AsmReadEs (
mov ax, es
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.c b/MdePkg/Library/BaseLib/Ia32/ReadFs.c
index 51fb020b12..500058da18 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadFs.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of FS Data Segment Register (FS).
@@ -29,4 +26,3 @@ AsmReadFs (
mov ax, fs
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c
index 5b01300b4b..8f6d6122c4 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.c
@@ -6,10 +6,8 @@
**/
-
#include "BaseLibInternals.h"
-
/**
Reads the current Global Descriptor Table Register(GDTR) descriptor.
@@ -30,4 +28,3 @@ InternalX86ReadGdtr (
sgdt fword ptr [eax]
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.c b/MdePkg/Library/BaseLib/Ia32/ReadGs.c
index 6209a31ae9..6449447b87 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadGs.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of GS Data Segment Register (GS).
@@ -29,4 +26,3 @@ AsmReadGs (
mov ax, gs
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c
index 93f44535d3..4a717bbcf4 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.c
@@ -6,10 +6,8 @@
**/
-
#include "BaseLibInternals.h"
-
/**
Reads the current Interrupt Descriptor Table Register(GDTR) descriptor.
@@ -22,7 +20,7 @@
VOID
EFIAPI
InternalX86ReadIdtr (
- OUT IA32_DESCRIPTOR *Idtr
+ OUT IA32_DESCRIPTOR *Idtr
)
{
_asm {
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c
index 407676a465..31978ffaa7 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current Local Descriptor Table Register(LDTR) selector.
@@ -28,4 +25,3 @@ AsmReadLdtr (
sldt ax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c
index 00dfe05895..f54452ab8c 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #0 (MM0).
@@ -33,4 +30,3 @@ AsmReadMm0 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c
index 0ed311e412..027cccc30b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #1 (MM1).
@@ -33,4 +30,3 @@ AsmReadMm1 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c
index bd830c557f..25c8caa858 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #2 (MM2).
@@ -33,4 +30,3 @@ AsmReadMm2 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c
index c8967083ba..33aef907e5 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #3 (MM3).
@@ -33,4 +30,3 @@ AsmReadMm3 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c
index 9e2794cd4d..c5a646ffd9 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #4 (MM4).
@@ -33,4 +30,3 @@ AsmReadMm4 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c
index 93cad05a49..70b97b8bbb 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #5 (MM5).
@@ -33,4 +30,3 @@ AsmReadMm5 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c
index d2c559163a..6b3055c4bc 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #6 (MM6).
@@ -33,4 +30,3 @@ AsmReadMm6 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c
index 68cf039285..9ee911a199 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of 64-bit MMX Register #7 (MM7).
@@ -33,4 +30,3 @@ AsmReadMm7 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
index afe3aa5bdc..837595c9b1 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.c
@@ -6,7 +6,6 @@
**/
-
#include <Library/RegisterFilterLib.h>
/**
@@ -54,13 +53,14 @@ AsmReadMsr64 (
IN UINT32 Index
)
{
- UINT64 Value;
- BOOLEAN Flag;
+ UINT64 Value;
+ BOOLEAN Flag;
Flag = FilterBeforeMsrRead (Index, &Value);
if (Flag) {
Value = AsmReadMsr64Internal (Index);
}
+
FilterAfterMsrRead (Index, &Value);
return Value;
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c
index cc09ed7005..0137fe8525 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.c
@@ -20,7 +20,7 @@
UINT64
EFIAPI
AsmReadPmc (
- IN UINT32 Index
+ IN UINT32 Index
)
{
_asm {
@@ -28,4 +28,3 @@ AsmReadPmc (
rdpmc
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.c b/MdePkg/Library/BaseLib/Ia32/ReadSs.c
index 9d7a6411a8..e5e2311a00 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadSs.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Stack Segment Register (SS).
@@ -29,4 +26,3 @@ AsmReadSs (
mov ax, ss
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.c b/MdePkg/Library/BaseLib/Ia32/ReadTr.c
index b52f8f31d2..bfb5e6b0db 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadTr.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Task Register (TR).
@@ -28,4 +25,3 @@ AsmReadTr (
str ax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c
index a67b57a77d..4109b96d8b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.c
+++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Reads the current value of Time Stamp Counter (TSC).
@@ -28,4 +25,3 @@ AsmReadTsc (
rdtsc
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c
index 67587f1d27..42d4f66dd3 100644
--- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c
+++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Switches the endianess of a 64-bit integer.
@@ -24,7 +21,7 @@
UINT64
EFIAPI
InternalMathSwapBytes64 (
- IN UINT64 Operand
+ IN UINT64 Operand
)
{
_asm {
@@ -34,4 +31,3 @@ InternalMathSwapBytes64 (
bswap edx
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c
index 87bd71f05d..f41cb4ee14 100644
--- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.c
+++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Executes a WBINVD instruction.
@@ -26,4 +23,3 @@ AsmWbinvd (
wbinvd
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c
index 46e49a678a..e20f769c77 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.c
@@ -28,4 +28,3 @@ AsmWriteCr0 (
mov cr0, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c
index f437bfc8c8..4571ec9505 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.c
@@ -28,4 +28,3 @@ AsmWriteCr2 (
mov cr2, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c
index 48cb8ad16f..29d0ae21f6 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.c
@@ -28,4 +28,3 @@ AsmWriteCr3 (
mov cr3, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c
index 01f059ffaa..f152464a4a 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.c
@@ -30,4 +30,3 @@ AsmWriteCr4 (
_emit 0xE0
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c
index 80bb238184..027e1b458b 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr0 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -28,4 +28,3 @@ AsmWriteDr0 (
mov dr0, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c
index f1c8f325e4..302c3491eb 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr1 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -28,4 +28,3 @@ AsmWriteDr1 (
mov dr1, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c
index 6e1e7f2406..20b62246c0 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr2 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -28,4 +28,3 @@ AsmWriteDr2 (
mov dr2, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c
index 7cb1d3724e..6eafe40dcf 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr3 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -28,4 +28,3 @@ AsmWriteDr3 (
mov dr3, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c
index 778017f339..32815b28ff 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr4 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -30,4 +30,3 @@ AsmWriteDr4 (
_emit 0xe0
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c
index 2159813a35..4a0c384518 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr5 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -30,4 +30,3 @@ AsmWriteDr5 (
_emit 0xe8
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c
index c03d71643b..7cfc4bb282 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr6 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -28,4 +28,3 @@ AsmWriteDr6 (
mov dr6, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c
index c4821e4cdf..78b0b72aeb 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.c
@@ -20,7 +20,7 @@
UINTN
EFIAPI
AsmWriteDr7 (
- IN UINTN Value
+ IN UINTN Value
)
{
_asm {
@@ -28,4 +28,3 @@ AsmWriteDr7 (
mov dr7, eax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c
index 37ceae73ff..a542665375 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.c
@@ -6,10 +6,8 @@
**/
-
#include "BaseLibInternals.h"
-
/**
Writes the current Global Descriptor Table Register (GDTR) descriptor.
@@ -22,7 +20,7 @@
VOID
EFIAPI
InternalX86WriteGdtr (
- IN CONST IA32_DESCRIPTOR *Gdtr
+ IN CONST IA32_DESCRIPTOR *Gdtr
)
{
_asm {
@@ -30,4 +28,3 @@ InternalX86WriteGdtr (
lgdt fword ptr [eax]
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c
index 49ef22b997..aaa29b3d1e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.c
@@ -6,7 +6,6 @@
**/
-
#include "BaseLibInternals.h"
/**
@@ -21,7 +20,7 @@
VOID
EFIAPI
InternalX86WriteIdtr (
- IN CONST IA32_DESCRIPTOR *Idtr
+ IN CONST IA32_DESCRIPTOR *Idtr
)
{
_asm {
@@ -32,4 +31,3 @@ InternalX86WriteIdtr (
popfd
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c
index 8e12f7840b..d45f0fe076 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current Local Descriptor Table Register (GDTR) selector.
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteLdtr (
- IN UINT16 Ldtr
+ IN UINT16 Ldtr
)
{
_asm {
@@ -30,4 +27,3 @@ AsmWriteLdtr (
lldt ax
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c
index ea26009a68..7807c3583a 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #0 (MM0).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm0 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
@@ -29,4 +26,3 @@ AsmWriteMm0 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c
index b8da47329d..378aac289a 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #1 (MM1).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm1 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
@@ -29,4 +26,3 @@ AsmWriteMm1 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c
index 6b77aed7a4..ebab66f239 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #2 (MM2).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm2 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
@@ -29,4 +26,3 @@ AsmWriteMm2 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c
index 4fc7d7042b..645a14fc68 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #3 (MM3).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm3 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
@@ -29,4 +26,3 @@ AsmWriteMm3 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c
index 2fce554974..8a4728e594 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #4 (MM4).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm4 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c
index a0ec714e30..1c4adc0feb 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #5 (MM5).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm5 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c
index c3b57b4b51..8023fc05d7 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #6 (MM6).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm6 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
@@ -29,4 +26,3 @@ AsmWriteMm6 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c
index e1e8932458..0b0fc44c71 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.c
@@ -6,9 +6,6 @@
**/
-
-
-
/**
Writes the current value of 64-bit MMX Register #7 (MM7).
@@ -21,7 +18,7 @@
VOID
EFIAPI
AsmWriteMm7 (
- IN UINT64 Value
+ IN UINT64 Value
)
{
_asm {
@@ -29,4 +26,3 @@ AsmWriteMm7 (
emms
}
}
-
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
index ba0cf3f74c..e8e49212f1 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
@@ -6,7 +6,6 @@
**/
-
#include <Library/RegisterFilterLib.h>
/**
@@ -33,7 +32,7 @@ AsmWriteMsr64 (
IN UINT64 Value
)
{
- BOOLEAN Flag;
+ BOOLEAN Flag;
Flag = FilterBeforeMsrWrite (Index, &Value);
if (Flag) {
@@ -44,8 +43,8 @@ AsmWriteMsr64 (
wrmsr
}
}
+
FilterAfterMsrWrite (Index, &Value);
return Value;
}
-