]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/X86Msr.c
Make comments match the Spec.
[mirror_edk2.git] / MdePkg / Library / BaseLib / X86Msr.c
index 60d0087ad9546914fda1129b7b6354616495fbf5..612b29c0e6b2ff233114c3f152d6d90c09b75f36 100644 (file)
@@ -13,7 +13,7 @@
 **/\r
 \r
 \r
-#include <BaseLibInternals.h>\r
+#include "BaseLibInternals.h"\r
 \r
 \r
 /**\r
@@ -23,7 +23,7 @@
   No parameter checking is performed on Index, and some Index values may cause\r
   CPU exceptions. The caller must either guarantee that Index is valid, or the\r
   caller must set up exception handlers to catch the exceptions. This function\r
-  is only available on IA-32 and X64.\r
+  is only available on IA-32 and x64.\r
 \r
   @param  Index The 32-bit MSR index to read.\r
 \r
@@ -47,7 +47,7 @@ AsmReadMsr32 (
   the MSR is returned. No parameter checking is performed on Index or Value,\r
   and some of these may cause CPU exceptions. The caller must either guarantee\r
   that Index and Value are valid, or the caller must establish proper exception\r
-  handlers. This function is only available on IA-32 and X64.\r
+  handlers. This function is only available on IA-32 and x64.\r
 \r
   @param  Index The 32-bit MSR index to write.\r
   @param  Value The 32-bit value to write to the MSR.\r
@@ -66,17 +66,17 @@ AsmWriteMsr32 (
 }\r
 \r
 /**\r
-  Reads a 64-bit MSR, performs a bitwise inclusive OR on the lower 32-bits, and\r
+  Reads a 64-bit MSR, performs a bitwise OR on the lower 32-bits, and\r
   writes the result back to the 64-bit MSR.\r
 \r
-  Reads the 64-bit MSR specified by Index, performs a bitwise inclusive OR\r
+  Reads the 64-bit MSR specified by Index, performs a bitwise OR\r
   between the lower 32-bits of the read result and the value specified by\r
   OrData, and writes the result to the 64-bit MSR specified by Index. The lower\r
   32-bits of the value written to the MSR is returned. No parameter checking is\r
   performed on Index or OrData, and some of these may cause CPU exceptions. The\r
   caller must either guarantee that Index and OrData are valid, or the caller\r
   must establish proper exception handlers. This function is only available on\r
-  IA-32 and X64.\r
+  IA-32 and x64.\r
 \r
   @param  Index   The 32-bit MSR index to write.\r
   @param  OrData  The value to OR with the read value from the MSR.\r
@@ -105,7 +105,7 @@ AsmMsrOr32 (
   on Index or AndData, and some of these may cause CPU exceptions. The caller\r
   must either guarantee that Index and AndData are valid, or the caller must\r
   establish proper exception handlers. This function is only available on IA-32\r
-  and X64.\r
+  and x64.\r
 \r
   @param  Index   The 32-bit MSR index to write.\r
   @param  AndData The value to AND with the read value from the MSR.\r
@@ -124,19 +124,19 @@ AsmMsrAnd32 (
 }\r
 \r
 /**\r
-  Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise inclusive OR\r
+  Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise OR\r
   on the lower 32-bits, and writes the result back to the 64-bit MSR.\r
 \r
   Reads the 64-bit MSR specified by Index, performs a bitwise AND between the\r
   lower 32-bits of the read result and the value specified by AndData\r
-  preserving the upper 32-bits, performs a bitwise inclusive OR between the\r
+  preserving the upper 32-bits, performs a bitwise OR between the\r
   result of the AND operation and the value specified by OrData, and writes the\r
   result to the 64-bit MSR specified by Address. The lower 32-bits of the value\r
   written to the MSR is returned. No parameter checking is performed on Index,\r
   AndData, or OrData, and some of these may cause CPU exceptions. The caller\r
   must either guarantee that Index, AndData, and OrData are valid, or the\r
   caller must establish proper exception handlers. This function is only\r
-  available on IA-32 and X64.\r
+  available on IA-32 and x64.\r
 \r
   @param  Index   The 32-bit MSR index to write.\r
   @param  AndData The value to AND with the read value from the MSR.\r
@@ -163,7 +163,7 @@ AsmMsrAndThenOr32 (
   specified by the StartBit and the EndBit. The value of the bit field is\r
   returned. The caller must either guarantee that Index is valid, or the caller\r
   must set up exception handlers to catch the exceptions. This function is only\r
-  available on IA-32 and X64.\r
+  available on IA-32 and x64.\r
 \r
   If StartBit is greater than 31, then ASSERT().\r
   If EndBit is greater than 31, then ASSERT().\r
@@ -195,10 +195,9 @@ AsmMsrBitFieldRead32 (
   Writes Value to a bit field in the lower 32-bits of a  64-bit MSR. The bit\r
   field is specified by the StartBit and the EndBit. All other bits in the\r
   destination MSR are preserved. The lower 32-bits of the MSR written is\r
-  returned. Extra left bits in Value are stripped. The caller must either\r
-  guarantee that Index and the data written is valid, or the caller must set up\r
-  exception handlers to catch the exceptions. This function is only available\r
-  on IA-32 and X64.\r
+  returned. The caller must either guarantee that Index and the data written \r
+  is valid, or the caller must set up exception handlers to catch the exceptions. \r
+  This function is only available on IA-32 and x64.\r
 \r
   If StartBit is greater than 31, then ASSERT().\r
   If EndBit is greater than 31, then ASSERT().\r
@@ -232,13 +231,13 @@ AsmMsrBitFieldWrite32 (
   Reads a bit field in a 64-bit MSR, performs a bitwise OR, and writes the\r
   result back to the bit field in the 64-bit MSR.\r
 \r
-  Reads the 64-bit MSR specified by Index, performs a bitwise inclusive OR\r
+  Reads the 64-bit MSR specified by Index, performs a bitwise OR\r
   between the read result and the value specified by OrData, and writes the\r
   result to the 64-bit MSR specified by Index. The lower 32-bits of the value\r
   written to the MSR are returned. Extra left bits in OrData are stripped. The\r
   caller must either guarantee that Index and the data written is valid, or\r
   the caller must set up exception handlers to catch the exceptions. This\r
-  function is only available on IA-32 and X64.\r
+  function is only available on IA-32 and x64.\r
 \r
   If StartBit is greater than 31, then ASSERT().\r
   If EndBit is greater than 31, then ASSERT().\r
@@ -278,7 +277,7 @@ AsmMsrBitFieldOr32 (
   MSR are returned. Extra left bits in AndData are stripped. The caller must\r
   either guarantee that Index and the data written is valid, or the caller must\r
   set up exception handlers to catch the exceptions. This function is only\r
-  available on IA-32 and X64.\r
+  available on IA-32 and x64.\r
 \r
   If StartBit is greater than 31, then ASSERT().\r
   If EndBit is greater than 31, then ASSERT().\r
@@ -310,17 +309,17 @@ AsmMsrBitFieldAnd32 (
 \r
 /**\r
   Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a\r
-  bitwise inclusive OR, and writes the result back to the bit field in the\r
+  bitwise OR, and writes the result back to the bit field in the\r
   64-bit MSR.\r
 \r
   Reads the 64-bit MSR specified by Index, performs a bitwise AND followed by a\r
-  bitwise inclusive OR between the read result and the value specified by\r
+  bitwise OR between the read result and the value specified by\r
   AndData, and writes the result to the 64-bit MSR specified by Index. The\r
   lower 32-bits of the value written to the MSR are returned. Extra left bits\r
   in both AndData and OrData are stripped. The caller must either guarantee\r
   that Index and the data written is valid, or the caller must set up exception\r
   handlers to catch the exceptions. This function is only available on IA-32\r
-  and X64.\r
+  and x64.\r
 \r
   If StartBit is greater than 31, then ASSERT().\r
   If EndBit is greater than 31, then ASSERT().\r
@@ -359,16 +358,16 @@ AsmMsrBitFieldAndThenOr32 (
 }\r
 \r
 /**\r
-  Reads a 64-bit MSR, performs a bitwise inclusive OR, and writes the result\r
+  Reads a 64-bit MSR, performs a bitwise OR, and writes the result\r
   back to the 64-bit MSR.\r
 \r
-  Reads the 64-bit MSR specified by Index, performs a bitwise inclusive OR\r
+  Reads the 64-bit MSR specified by Index, performs a bitwise OR\r
   between the read result and the value specified by OrData, and writes the\r
   result to the 64-bit MSR specified by Index. The value written to the MSR is\r
   returned. No parameter checking is performed on Index or OrData, and some of\r
   these may cause CPU exceptions. The caller must either guarantee that Index\r
   and OrData are valid, or the caller must establish proper exception handlers.\r
-  This function is only available on IA-32 and X64.\r
+  This function is only available on IA-32 and x64.\r
 \r
   @param  Index   The 32-bit MSR index to write.\r
   @param  OrData  The value to OR with the read value from the MSR.\r
@@ -396,7 +395,7 @@ AsmMsrOr64 (
   parameter checking is performed on Index or OrData, and some of these may\r
   cause CPU exceptions. The caller must either guarantee that Index and OrData\r
   are valid, or the caller must establish proper exception handlers. This\r
-  function is only available on IA-32 and X64.\r
+  function is only available on IA-32 and x64.\r
 \r
   @param  Index   The 32-bit MSR index to write.\r
   @param  AndData The value to AND with the read value from the MSR.\r
@@ -415,18 +414,18 @@ AsmMsrAnd64 (
 }\r
 \r
 /**\r
-  Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise inclusive\r
+  Reads a 64-bit MSR, performs a bitwise AND followed by a bitwise \r
   OR, and writes the result back to the 64-bit MSR.\r
 \r
   Reads the 64-bit MSR specified by Index, performs a bitwise AND between read\r
-  result and the value specified by AndData, performs a bitwise inclusive OR\r
+  result and the value specified by AndData, performs a bitwise OR\r
   between the result of the AND operation and the value specified by OrData,\r
   and writes the result to the 64-bit MSR specified by Index. The value written\r
   to the MSR is returned. No parameter checking is performed on Index, AndData,\r
   or OrData, and some of these may cause CPU exceptions. The caller must either\r
   guarantee that Index, AndData, and OrData are valid, or the caller must\r
   establish proper exception handlers. This function is only available on IA-32\r
-  and X64.\r
+  and x64.\r
 \r
   @param  Index   The 32-bit MSR index to write.\r
   @param  AndData The value to AND with the read value from the MSR.\r
@@ -453,7 +452,7 @@ AsmMsrAndThenOr64 (
   StartBit and the EndBit. The value of the bit field is returned. The caller\r
   must either guarantee that Index is valid, or the caller must set up\r
   exception handlers to catch the exceptions. This function is only available\r
-  on IA-32 and X64.\r
+  on IA-32 and x64.\r
 \r
   If StartBit is greater than 63, then ASSERT().\r
   If EndBit is greater than 63, then ASSERT().\r
@@ -484,10 +483,9 @@ AsmMsrBitFieldRead64 (
 \r
   Writes Value to a bit field in a 64-bit MSR. The bit field is specified by\r
   the StartBit and the EndBit. All other bits in the destination MSR are\r
-  preserved. The MSR written is returned. Extra left bits in Value are\r
-  stripped. The caller must either guarantee that Index and the data written is\r
-  valid, or the caller must set up exception handlers to catch the exceptions.\r
-  This function is only available on IA-32 and X64.\r
+  preserved. The MSR written is returned. The caller must either guarantee \r
+  that Index and the data written is valid, or the caller must set up exception \r
+  handlers to catch the exceptions. This function is only available on IA-32 and x64.\r
 \r
   If StartBit is greater than 63, then ASSERT().\r
   If EndBit is greater than 63, then ASSERT().\r
@@ -519,16 +517,16 @@ AsmMsrBitFieldWrite64 (
 }\r
 \r
 /**\r
-  Reads a bit field in a 64-bit MSR, performs a bitwise inclusive OR, and\r
+  Reads a bit field in a 64-bit MSR, performs a bitwise OR, and\r
   writes the result back to the bit field in the 64-bit MSR.\r
 \r
-  Reads the 64-bit MSR specified by Index, performs a bitwise inclusive OR\r
+  Reads the 64-bit MSR specified by Index, performs a bitwise OR\r
   between the read result and the value specified by OrData, and writes the\r
   result to the 64-bit MSR specified by Index. The value written to the MSR is\r
   returned. Extra left bits in OrData are stripped. The caller must either\r
   guarantee that Index and the data written is valid, or the caller must set up\r
   exception handlers to catch the exceptions. This function is only available\r
-  on IA-32 and X64.\r
+  on IA-32 and x64.\r
 \r
   If StartBit is greater than 63, then ASSERT().\r
   If EndBit is greater than 63, then ASSERT().\r
@@ -569,7 +567,7 @@ AsmMsrBitFieldOr64 (
   Extra left bits in AndData are stripped. The caller must either guarantee\r
   that Index and the data written is valid, or the caller must set up exception\r
   handlers to catch the exceptions. This function is only available on IA-32\r
-  and X64.\r
+  and x64.\r
 \r
   If StartBit is greater than 63, then ASSERT().\r
   If EndBit is greater than 63, then ASSERT().\r
@@ -602,16 +600,16 @@ AsmMsrBitFieldAnd64 (
 \r
 /**\r
   Reads a bit field in a 64-bit MSR, performs a bitwise AND followed by a\r
-  bitwise inclusive OR, and writes the result back to the bit field in the\r
+  bitwise OR, and writes the result back to the bit field in the\r
   64-bit MSR.\r
 \r
   Reads the 64-bit MSR specified by Index, performs a bitwise AND followed by\r
-  a bitwise inclusive OR between the read result and the value specified by\r
+  a bitwise OR between the read result and the value specified by\r
   AndData, and writes the result to the 64-bit MSR specified by Index. The\r
   value written to the MSR is returned. Extra left bits in both AndData and\r
   OrData are stripped. The caller must either guarantee that Index and the data\r
   written is valid, or the caller must set up exception handlers to catch the\r
-  exceptions. This function is only available on IA-32 and X64.\r
+  exceptions. This function is only available on IA-32 and x64.\r
 \r
   If StartBit is greater than 63, then ASSERT().\r
   If EndBit is greater than 63, then ASSERT().\r