diff options
author | Michael Kinney <michael.d.kinney@intel.com> | 2015-12-10 07:22:31 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-10 07:22:31 +0000 |
commit | e7409a1e259fb56c6a1927398aff5b251fbb444d (patch) | |
tree | a400e3ac01cc390b06f16a9afa11db535a68b275 /UefiCpuPkg/Include/Library | |
parent | 53c6f25007d394164df6669506e643ed73c08577 (diff) | |
download | edk2-platforms-e7409a1e259fb56c6a1927398aff5b251fbb444d.tar.xz |
UefiCpuPkg/MtrrLib: Fix some typo and clean up code format
Fixed some typo. Removed some trailing spaces and TAB key. Clean up code format.
(Sync patch r19152 from main trunk.)
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19196 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/Include/Library')
-rw-r--r-- | UefiCpuPkg/Include/Library/MtrrLib.h | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/UefiCpuPkg/Include/Library/MtrrLib.h b/UefiCpuPkg/Include/Library/MtrrLib.h index f9002e7cbf..884c7bb699 100644 --- a/UefiCpuPkg/Include/Library/MtrrLib.h +++ b/UefiCpuPkg/Include/Library/MtrrLib.h @@ -84,8 +84,8 @@ typedef struct { // Structure to hold base and mask pair for variable MTRR register
//
typedef struct _MTRR_VARIABLE_SETTING_ {
- UINT64 Base;
- UINT64 Mask;
+ UINT64 Base;
+ UINT64 Mask;
} MTRR_VARIABLE_SETTING;
//
@@ -115,11 +115,11 @@ typedef struct _MTRR_SETTINGS_ { // Memory cache types
//
typedef enum {
- CacheUncacheable = 0,
- CacheWriteCombining = 1,
- CacheWriteThrough = 4,
- CacheWriteProtected = 5,
- CacheWriteBack = 6
+ CacheUncacheable = 0,
+ CacheWriteCombining = 1,
+ CacheWriteThrough = 4,
+ CacheWriteProtected = 5,
+ CacheWriteBack = 6
} MTRR_MEMORY_CACHE_TYPE;
#define MTRR_CACHE_UNCACHEABLE 0
@@ -156,20 +156,27 @@ GetFirmwareVariableMtrrCount ( /**
This function attempts to set the attributes for a memory range.
- @param BaseAddress The physical address that is the start address of a memory region.
- @param Length The size in bytes of the memory region.
- @param Attributes The bit mask of attributes to set for the memory region.
+ @param[in] BaseAddress The physical address that is the start
+ address of a memory region.
+ @param[in] Length The size in bytes of the memory region.
+ @param[in] Attribute The bit mask of attributes to set for the
+ memory region.
- @retval RETURN_SUCCESS The attributes were set for the memory region.
+ @retval RETURN_SUCCESS The attributes were set for the memory
+ region.
@retval RETURN_INVALID_PARAMETER Length is zero.
- @retval RETURN_UNSUPPORTED The processor does not support one or more bytes of the
- memory resource range specified by BaseAddress and Length.
- @retval RETURN_UNSUPPORTED The bit mask of attributes is not support for the memory resource
- range specified by BaseAddress and Length.
- @retval RETURN_ACCESS_DENIED The attributes for the memory resource range specified by
- BaseAddress and Length cannot be modified.
- @retval RETURN_OUT_OF_RESOURCES There are not enough system resources to modify the attributes of
- the memory resource range.
+ @retval RETURN_UNSUPPORTED The processor does not support one or
+ more bytes of the memory resource range
+ specified by BaseAddress and Length.
+ @retval RETURN_UNSUPPORTED The bit mask of attributes is not support
+ for the memory resource range specified
+ by BaseAddress and Length.
+ @retval RETURN_ACCESS_DENIED The attributes for the memory resource
+ range specified by BaseAddress and Length
+ cannot be modified.
+ @retval RETURN_OUT_OF_RESOURCES There are not enough system resources to
+ modify the attributes of the memory
+ resource range.
**/
RETURN_STATUS
@@ -185,7 +192,7 @@ MtrrSetMemoryAttribute ( This function will get the memory cache type of the specific address.
This function is mainly for debugging purposes.
- @param Address The specific address
+ @param[in] Address The specific address
@return The memory cache type of the specific address
@@ -200,7 +207,7 @@ MtrrGetMemoryAttribute ( /**
This function will get the raw value in variable MTRRs
- @param VariableSettings A buffer to hold variable MTRRs content.
+ @param[out] VariableSettings A buffer to hold variable MTRRs content.
@return The buffer point to MTRR_VARIABLE_SETTINGS in which holds the content of the variable mtrr
@@ -215,7 +222,7 @@ MtrrGetVariableMtrr ( /**
This function sets fixed MTRRs
- @param VariableSettings A buffer to hold variable MTRRs content.
+ @param[in] VariableSettings A buffer to hold variable MTRRs content.
@return The pointer of VariableSettings
@@ -230,7 +237,7 @@ MtrrSetVariableMtrr ( /**
This function gets the content in fixed MTRRs
- @param FixedSettings A buffer to hold fixed MTRRs content.
+ @param[out] FixedSettings A buffer to hold fixed MTRRs content.
@return The pointer of FixedSettings
@@ -245,7 +252,7 @@ MtrrGetFixedMtrr ( /**
This function sets fixed MTRRs
- @param FixedSettings A buffer holding fixed MTRRs content.
+ @param[in] FixedSettings A buffer holding fixed MTRRs content.
@return The pointer of FixedSettings
@@ -260,7 +267,7 @@ MtrrSetFixedMtrr ( /**
This function gets the content in all MTRRs (variable and fixed)
- @param MtrrSetting A buffer to hold all MTRRs content.
+ @param[out] MtrrSetting A buffer to hold all MTRRs content.
@return The pointer of MtrrSetting
@@ -275,7 +282,7 @@ MtrrGetAllMtrrs ( /**
This function sets all MTRRs (variable and fixed)
- @param MtrrSetting A buffer to hold all MTRRs content.
+ @param[in] MtrrSetting A buffer to hold all MTRRs content.
@return The pointer of MtrrSetting
@@ -293,11 +300,12 @@ MtrrSetAllMtrrs ( This function shadows the content of variable MTRRs into
an internal array: VariableMtrr
- @param MtrrValidBitsMask The mask for the valid bit of the MTRR
- @param MtrrValidAddressMask The valid address mask for MTRR since the base address in
- MTRR must align to 4K, so valid address mask equal to
- MtrrValidBitsMask & 0xfffffffffffff000ULL
- @param VariableMtrr The array to shadow variable MTRRs content
+ @param[in] MtrrValidBitsMask The mask for the valid bit of the MTRR
+ @param[in] MtrrValidAddressMask The valid address mask for MTRR since the base address in
+ MTRR must align to 4K, so valid address mask equal to
+ MtrrValidBitsMask & 0xfffffffffffff000ULL
+ @param[out] VariableMtrr The array to shadow variable MTRRs content
+
@return The ruturn value of this paramter indicates the number of
MTRRs which has been used.
**/
|