]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Include/Library/MtrrLib.h
UefiCpuPkg/MtrrLib: Fix some typo and clean up code format
[mirror_edk2.git] / UefiCpuPkg / Include / Library / MtrrLib.h
index f9002e7cbfc710aaef68dc6fb67716293bd032d9..884c7bb6996cf26e851ad43f9bb38bf0b479e41d 100644 (file)
@@ -84,8 +84,8 @@ typedef struct {
 // Structure to hold base and mask pair for variable MTRR register\r
 //\r
 typedef struct _MTRR_VARIABLE_SETTING_ {\r
-       UINT64    Base;\r
-       UINT64    Mask;\r
+  UINT64    Base;\r
+  UINT64    Mask;\r
 } MTRR_VARIABLE_SETTING;\r
 \r
 //\r
@@ -115,11 +115,11 @@ typedef struct _MTRR_SETTINGS_ {
 // Memory cache types\r
 //\r
 typedef enum {\r
-       CacheUncacheable    = 0,\r
-       CacheWriteCombining = 1,\r
-       CacheWriteThrough   = 4,\r
-       CacheWriteProtected = 5,\r
-       CacheWriteBack      = 6\r
+  CacheUncacheable    = 0,\r
+  CacheWriteCombining = 1,\r
+  CacheWriteThrough   = 4,\r
+  CacheWriteProtected = 5,\r
+  CacheWriteBack      = 6\r
 } MTRR_MEMORY_CACHE_TYPE;\r
 \r
 #define  MTRR_CACHE_UNCACHEABLE      0\r
@@ -156,20 +156,27 @@ GetFirmwareVariableMtrrCount (
 /**\r
   This function attempts to set the attributes for a memory range.\r
 \r
-  @param  BaseAddress            The physical address that is the start address of a memory region.\r
-  @param  Length                 The size in bytes of the memory region.\r
-  @param  Attributes             The bit mask of attributes to set for the memory region.\r
+  @param[in]       BaseAddress       The physical address that is the start\r
+                                     address of a memory region.\r
+  @param[in]       Length            The size in bytes of the memory region.\r
+  @param[in]       Attribute         The bit mask of attributes to set for the\r
+                                     memory region.\r
 \r
-  @retval RETURN_SUCCESS            The attributes were set for the memory region.\r
+  @retval RETURN_SUCCESS            The attributes were set for the memory\r
+                                    region.\r
   @retval RETURN_INVALID_PARAMETER  Length is zero.\r
-  @retval RETURN_UNSUPPORTED        The processor does not support one or more bytes of the\r
-                                 memory resource range specified by BaseAddress and Length.\r
-  @retval RETURN_UNSUPPORTED        The bit mask of attributes is not support for the memory resource\r
-                                 range specified by BaseAddress and Length.\r
-  @retval RETURN_ACCESS_DENIED      The attributes for the memory resource range specified by\r
-                                 BaseAddress and Length cannot be modified.\r
-  @retval RETURN_OUT_OF_RESOURCES   There are not enough system resources to modify the attributes of\r
-                                 the memory resource range.\r
+  @retval RETURN_UNSUPPORTED        The processor does not support one or\r
+                                    more bytes of the memory resource range\r
+                                    specified by BaseAddress and Length.\r
+  @retval RETURN_UNSUPPORTED        The bit mask of attributes is not support\r
+                                    for the memory resource range specified\r
+                                    by BaseAddress and Length.\r
+  @retval RETURN_ACCESS_DENIED      The attributes for the memory resource\r
+                                    range specified by BaseAddress and Length\r
+                                    cannot be modified.\r
+  @retval RETURN_OUT_OF_RESOURCES   There are not enough system resources to\r
+                                    modify the attributes of the memory\r
+                                    resource range.\r
 \r
 **/\r
 RETURN_STATUS\r
@@ -185,7 +192,7 @@ MtrrSetMemoryAttribute (
   This function will get the memory cache type of the specific address.\r
   This function is mainly for debugging purposes.\r
 \r
-  @param  Address            The specific address\r
+  @param[in]  Address            The specific address\r
 \r
   @return The memory cache type of the specific address\r
 \r
@@ -200,7 +207,7 @@ MtrrGetMemoryAttribute (
 /**\r
   This function will get the raw value in variable MTRRs\r
 \r
-  @param  VariableSettings   A buffer to hold variable MTRRs content.\r
+  @param[out]  VariableSettings   A buffer to hold variable MTRRs content.\r
 \r
   @return The buffer point to MTRR_VARIABLE_SETTINGS in which holds the content of the variable mtrr\r
 \r
@@ -215,7 +222,7 @@ MtrrGetVariableMtrr (
 /**\r
   This function sets fixed MTRRs\r
 \r
-  @param  VariableSettings   A buffer to hold variable MTRRs content.\r
+  @param[in]  VariableSettings   A buffer to hold variable MTRRs content.\r
 \r
   @return The pointer of VariableSettings\r
 \r
@@ -230,7 +237,7 @@ MtrrSetVariableMtrr (
 /**\r
   This function gets the content in fixed MTRRs\r
 \r
-  @param  FixedSettings      A buffer to hold fixed MTRRs content.\r
+  @param[out]  FixedSettings      A buffer to hold fixed MTRRs content.\r
 \r
   @return The pointer of FixedSettings\r
 \r
@@ -245,7 +252,7 @@ MtrrGetFixedMtrr (
 /**\r
   This function sets fixed MTRRs\r
 \r
-  @param   FixedSettings      A buffer holding fixed MTRRs content.\r
+  @param[in]   FixedSettings      A buffer holding fixed MTRRs content.\r
 \r
   @return  The pointer of FixedSettings\r
 \r
@@ -260,7 +267,7 @@ MtrrSetFixedMtrr (
 /**\r
   This function gets the content in all MTRRs (variable and fixed)\r
 \r
-  @param  MtrrSetting   A buffer to hold all MTRRs content.\r
+  @param[out]  MtrrSetting   A buffer to hold all MTRRs content.\r
 \r
   @return The pointer of MtrrSetting\r
 \r
@@ -275,7 +282,7 @@ MtrrGetAllMtrrs (
 /**\r
   This function sets all MTRRs (variable and fixed)\r
 \r
-  @param  MtrrSetting   A buffer to hold all MTRRs content.\r
+  @param[in]  MtrrSetting   A buffer to hold all MTRRs content.\r
 \r
   @return The pointer of MtrrSetting\r
 \r
@@ -293,11 +300,12 @@ MtrrSetAllMtrrs (
   This function shadows the content of variable MTRRs into\r
   an internal array: VariableMtrr\r
 \r
-  @param  MtrrValidBitsMask     The mask for the valid bit of the MTRR\r
-  @param  MtrrValidAddressMask  The valid address mask for MTRR since the base address in\r
-                                MTRR must align to 4K, so valid address mask equal to\r
-                                MtrrValidBitsMask & 0xfffffffffffff000ULL\r
-  @param  VariableMtrr          The array to shadow variable MTRRs content\r
+  @param[in]   MtrrValidBitsMask    The mask for the valid bit of the MTRR\r
+  @param[in]   MtrrValidAddressMask The valid address mask for MTRR since the base address in\r
+                                    MTRR must align to 4K, so valid address mask equal to\r
+                                    MtrrValidBitsMask & 0xfffffffffffff000ULL\r
+  @param[out]  VariableMtrr         The array to shadow variable MTRRs content\r
+\r
   @return                       The ruturn value of this paramter indicates the number of\r
                                 MTRRs which has been used.\r
 **/\r