MtrrSetMemoryAttributesInMtrrSettings() is a batch-set API.
When setting multiple ranges of memory attributes, the single-set
API (MtrrSetMemoryAttributeInMtrrSettings and MtrrSetMemoryAttribute)
may fail, but batch-set API may succeed.
Add comments to recommend caller to use batch-set API when setting
multiple ranges.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Ming Shao <ming.shao@intel.com>
@retval RETURN_OUT_OF_RESOURCES There are not enough system resources to\r
modify the attributes of the memory\r
resource range.\r
@retval RETURN_OUT_OF_RESOURCES There are not enough system resources to\r
modify the attributes of the memory\r
resource range.\r
+ Multiple memory range attributes setting by calling this API multiple\r
+ times may fail with status RETURN_OUT_OF_RESOURCES. It may not mean\r
+ the number of CPU MTRRs are too small to set such memory attributes.\r
+ Pass the multiple memory range attributes to one call of\r
+ MtrrSetMemoryAttributesInMtrrSettings() may succeed.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\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
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
+ Multiple memory range attributes setting by calling this API multiple\r
+ times may fail with status RETURN_OUT_OF_RESOURCES. It may not mean\r
+ the number of CPU MTRRs are too small to set such memory attributes.\r
+ Pass the multiple memory range attributes to one call of\r
+ MtrrSetMemoryAttributesInMtrrSettings() may succeed.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\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
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
+ Multiple memory range attributes setting by calling this API multiple\r
+ times may fail with status RETURN_OUT_OF_RESOURCES. It may not mean\r
+ the number of CPU MTRRs are too small to set such memory attributes.\r
+ Pass the multiple memory range attributes to one call of\r
+ MtrrSetMemoryAttributesInMtrrSettings() may succeed.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\r
@retval RETURN_OUT_OF_RESOURCES There are not enough system resources to\r
modify the attributes of the memory\r
resource range.\r
@retval RETURN_OUT_OF_RESOURCES There are not enough system resources to\r
modify the attributes of the memory\r
resource range.\r
+ Multiple memory range attributes setting by calling this API multiple\r
+ times may fail with status RETURN_OUT_OF_RESOURCES. It may not mean\r
+ the number of CPU MTRRs are too small to set such memory attributes.\r
+ Pass the multiple memory range attributes to one call of\r
+ MtrrSetMemoryAttributesInMtrrSettings() may succeed.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\r
@retval RETURN_BUFFER_TOO_SMALL The fixed internal scratch buffer is too small for MTRR calculation.\r
Caller should use MtrrSetMemoryAttributesInMtrrSettings() to specify\r
external scratch buffer.\r