ECC Cleanup.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6213 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2008-10-24 06:06:42 +00:00
parent 572b6b1acb
commit 44b013bd6e
20 changed files with 72 additions and 123 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmCpuid function. AsmCpuid function.
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,9 +12,6 @@
**/ **/
/** /**
Retrieves CPUID information. Retrieves CPUID information.
@ -26,16 +23,16 @@
If Edx is not NULL, then the value of EDX after CPUID is returned in Edx. If Edx is not NULL, then the value of EDX after CPUID is returned in Edx.
This function is only available on IA-32 and X64. This function is only available on IA-32 and X64.
@param Index The 32-bit value to load into EAX prior to invoking the CPUID @param Index The 32-bit value to load into EAX prior to invoking the CPUID
instruction. instruction.
@param Eax Pointer to the 32-bit EAX value returned by the CPUID @param RegisterEax Pointer to the 32-bit EAX value returned by the CPUID
instruction. This is an optional parameter that may be NULL. instruction. This is an optional parameter that may be NULL.
@param Ebx Pointer to the 32-bit EBX value returned by the CPUID @param RegisterEbx Pointer to the 32-bit EBX value returned by the CPUID
instruction. This is an optional parameter that may be NULL. instruction. This is an optional parameter that may be NULL.
@param Ecx Pointer to the 32-bit ECX value returned by the CPUID @param RegisterEcx Pointer to the 32-bit ECX value returned by the CPUID
instruction. This is an optional parameter that may be NULL. instruction. This is an optional parameter that may be NULL.
@param Edx Pointer to the 32-bit EDX value returned by the CPUID @param RegisterEdx Pointer to the 32-bit EDX value returned by the CPUID
instruction. This is an optional parameter that may be NULL. instruction. This is an optional parameter that may be NULL.
@return Index @return Index

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmCpuidEx function. AsmCpuidEx function.
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,9 +12,6 @@
**/ **/
/** /**
Retrieves CPUID information using an extended leaf identifier. Retrieves CPUID information using an extended leaf identifier.
@ -27,22 +24,22 @@
If Ecx is not NULL, then the value of ECX after CPUID is returned in Ecx. If Ecx is not NULL, then the value of ECX after CPUID is returned in Ecx.
If Edx is not NULL, then the value of EDX after CPUID is returned in Edx. If Edx is not NULL, then the value of EDX after CPUID is returned in Edx.
@param Index The 32-bit value to load into EAX prior to invoking the @param Index The 32-bit value to load into EAX prior to invoking the
CPUID instruction. CPUID instruction.
@param SubIndex The 32-bit value to load into ECX prior to invoking the @param SubIndex The 32-bit value to load into ECX prior to invoking the
CPUID instruction. CPUID instruction.
@param Eax Pointer to the 32-bit EAX value returned by the CPUID @param RegisterEax Pointer to the 32-bit EAX value returned by the CPUID
instruction. This is an optional parameter that may be instruction. This is an optional parameter that may be
NULL. NULL.
@param Ebx Pointer to the 32-bit EBX value returned by the CPUID @param RegisterEbx Pointer to the 32-bit EBX value returned by the CPUID
instruction. This is an optional parameter that may be instruction. This is an optional parameter that may be
NULL. NULL.
@param Ecx Pointer to the 32-bit ECX value returned by the CPUID @param RegisterEcx Pointer to the 32-bit ECX value returned by the CPUID
instruction. This is an optional parameter that may be instruction. This is an optional parameter that may be
NULL. NULL.
@param Edx Pointer to the 32-bit EDX value returned by the CPUID @param RegisterEdx Pointer to the 32-bit EDX value returned by the CPUID
instruction. This is an optional parameter that may be instruction. This is an optional parameter that may be
NULL. NULL.
@return Index @return Index

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmMonitor function AsmMonitor function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,23 +12,20 @@
**/ **/
/** /**
Sets up a monitor buffer that is used by AsmMwait(). Sets up a monitor buffer that is used by AsmMwait().
Executes a MONITOR instruction with the register state specified by Eax, Ecx Executes a MONITOR instruction with the register state specified by Eax, Ecx
and Edx. Returns Eax. This function is only available on IA-32 and X64. and Edx. Returns Eax. This function is only available on IA-32 and X64.
@param Eax The value to load into EAX or RAX before executing the MONITOR @param RegisterEax The value to load into EAX or RAX before executing the MONITOR
instruction. instruction.
@param Ecx The value to load into ECX or RCX before executing the MONITOR @param RegisterEcx The value to load into ECX or RCX before executing the MONITOR
instruction. instruction.
@param Edx The value to load into EDX or RDX before executing the MONITOR @param RegisterEdx The value to load into EDX or RDX before executing the MONITOR
instruction. instruction.
@return Eax @return RegisterEax
**/ **/
UINTN UINTN

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmMwait function AsmMwait function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,21 +12,18 @@
**/ **/
/** /**
Executes an MWAIT instruction. Executes an MWAIT instruction.
Executes an MWAIT instruction with the register state specified by Eax and Executes an MWAIT instruction with the register state specified by Eax and
Ecx. Returns Eax. This function is only available on IA-32 and X64. Ecx. Returns Eax. This function is only available on IA-32 and X64.
@param Eax The value to load into EAX or RAX before executing the MONITOR @param RegisterEax The value to load into EAX or RAX before executing the MONITOR
instruction. instruction.
@param Ecx The value to load into ECX or RCX before executing the MONITOR @param RegisterEcx The value to load into ECX or RCX before executing the MONITOR
instruction. instruction.
@return Eax @return RegisterEax
**/ **/
UINTN UINTN

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmReadPmc function AsmReadPmc function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,9 +12,6 @@
**/ **/
/** /**
Reads the current value of a Performance Counter (PMC). Reads the current value of a Performance Counter (PMC).
@ -29,11 +26,11 @@
UINT64 UINT64
EFIAPI EFIAPI
AsmReadPmc ( AsmReadPmc (
IN UINT32 PmcIndex IN UINT32 Index
) )
{ {
_asm { _asm {
mov ecx, PmcIndex mov ecx, Index
rdpmc rdpmc
} }
} }

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteCr0 function AsmWriteCr0 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Control Register 0 (CR0). Writes a value to Control Register 0 (CR0).
Writes and returns a new value to CR0. This function is only available on Writes and returns a new value to CR0. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Cr0 The value to write to CR0. @param Value The value to write to CR0.
@return The value written to CR0. @return The value written to CR0.

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteCr2 function AsmWriteCr2 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Control Register 2 (CR2). Writes a value to Control Register 2 (CR2).
Writes and returns a new value to CR2. This function is only available on Writes and returns a new value to CR2. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Cr2 The value to write to CR2. @param Value The value to write to CR2.
@return The value written to CR2. @return The value written to CR2.

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteCr3 function AsmWriteCr3 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Control Register 3 (CR3). Writes a value to Control Register 3 (CR3).
Writes and returns a new value to CR3. This function is only available on Writes and returns a new value to CR3. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Cr3 The value to write to CR3. @param Value The value to write to CR3.
@return The value written to CR3. @return The value written to CR3.

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteCr4 function AsmWriteCr4 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Control Register 4 (CR4). Writes a value to Control Register 4 (CR4).
Writes and returns a new value to CR4. This function is only available on Writes and returns a new value to CR4. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Cr4 The value to write to CR4. @param Value The value to write to CR4.
@return The value written to CR4. @return The value written to CR4.

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr0 function AsmWriteDr0 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 0 (DR0). Writes a value to Debug Register 0 (DR0).
Writes and returns a new value to DR0. This function is only available on Writes and returns a new value to DR0. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr0 The value to write to Dr0. @param Value The value to write to Dr0.
@return The value written to Debug Register 0 (DR0). @return The value written to Debug Register 0 (DR0).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr1 function AsmWriteDr1 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 1 (DR1). Writes a value to Debug Register 1 (DR1).
Writes and returns a new value to DR1. This function is only available on Writes and returns a new value to DR1. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr1 The value to write to Dr1. @param Value The value to write to Dr1.
@return The value written to Debug Register 1 (DR1). @return The value written to Debug Register 1 (DR1).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr2 function AsmWriteDr2 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 2 (DR2). Writes a value to Debug Register 2 (DR2).
Writes and returns a new value to DR2. This function is only available on Writes and returns a new value to DR2. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr2 The value to write to Dr2. @param Value The value to write to Dr2.
@return The value written to Debug Register 2 (DR2). @return The value written to Debug Register 2 (DR2).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr3 function AsmWriteDr3 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 3 (DR3). Writes a value to Debug Register 3 (DR3).
Writes and returns a new value to DR3. This function is only available on Writes and returns a new value to DR3. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr3 The value to write to Dr3. @param Value The value to write to Dr3.
@return The value written to Debug Register 3 (DR3). @return The value written to Debug Register 3 (DR3).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr4 function AsmWriteDr4 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 4 (DR4). Writes a value to Debug Register 4 (DR4).
Writes and returns a new value to DR4. This function is only available on Writes and returns a new value to DR4. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr4 The value to write to Dr4. @param Value The value to write to Dr4.
@return The value written to Debug Register 4 (DR4). @return The value written to Debug Register 4 (DR4).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr5 function AsmWriteDr5 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 5 (DR5). Writes a value to Debug Register 5 (DR5).
Writes and returns a new value to DR5. This function is only available on Writes and returns a new value to DR5. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr5 The value to write to Dr5. @param Value The value to write to Dr5.
@return The value written to Debug Register 5 (DR5). @return The value written to Debug Register 5 (DR5).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr6 function AsmWriteDr6 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 6 (DR6). Writes a value to Debug Register 6 (DR6).
Writes and returns a new value to DR6. This function is only available on Writes and returns a new value to DR6. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr6 The value to write to Dr6. @param Value The value to write to Dr6.
@return The value written to Debug Register 6 (DR6). @return The value written to Debug Register 6 (DR6).

View File

@ -1,7 +1,7 @@
/** @file /** @file
AsmWriteDr7 function AsmWriteDr7 function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -12,16 +12,13 @@
**/ **/
/** /**
Writes a value to Debug Register 7 (DR7). Writes a value to Debug Register 7 (DR7).
Writes and returns a new value to DR7. This function is only available on Writes and returns a new value to DR7. This function is only available on
IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64. IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.
@param Dr7 The value to write to Dr7. @param Value The value to write to Dr7.
@return The value written to Debug Register 7 (DR7). @return The value written to Debug Register 7 (DR7).

View File

@ -1,7 +1,7 @@
/** @file /** @file
InterLockedIncrement function InterLockedIncrement function
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at

View File

@ -1,7 +1,7 @@
/** @file /** @file
CpuBreakpoint function. CpuBreakpoint function.
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at

View File

@ -1,7 +1,7 @@
/** @file /** @file
CpuBreakpoint function. CpuBreakpoint function.
Copyright (c) 2006 - 2007, Intel Corporation<BR> Copyright (c) 2006 - 2008, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at