2 /// IPF specific Machine Specific Registers accessing functions.
3 /// This implementation uses raw data to prepresent the assembly instruction of
4 /// mov msr[]= and mov =msr[].
6 /// Copyright (c) 2008, Intel Corporation
7 /// All rights reserved. This program and the accompanying materials
8 /// are licensed and made available under the terms and conditions of the BSD License
9 /// which accompanies this distribution. The full text of the license may be found at
10 /// http://opensource.org/licenses/bsd-license.php
12 /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 //---------------------------------------------------------------------------------
23 // Reads the current value of a Machine Specific Register (MSR).
25 // Reads and returns the current value of the Machine Specific Register specified by Index. No
26 // parameter checking is performed on Index, and if the Index value is beyond the implemented MSR
27 // register range, a Reserved Register/Field fault may occur. The caller must either guarantee that
28 // Index is valid, or the caller must set up fault handlers to catch the faults. This function is
29 // only available on IPF.
33 // On Entry : The 8-bit Machine Specific Register index to read.
35 // Return Value: The current value of the Machine Specific Register specified by Index.
38 //----------------------------------------------------------------------------------
40 .type AsmReadMsr, @function
46 // The follow 16 bytes stand for the bundle of
48 // since MSFT tool chain does not support mov =msr[] instruction
69 //---------------------------------------------------------------------------------
73 // Writes the current value of a Machine Specific Register (MSR).
75 // Writes Value to the Machine Specific Register specified by Index. Value is returned. No
76 // parameter checking is performed on Index, and if the Index value is beyond the implemented MSR
77 // register range, a Reserved Register/Field fault may occur. The caller must either guarantee that
78 // Index is valid, or the caller must set up fault handlers to catch the faults. This function is
79 // only available on IPF.
83 // On Entry : The 8-bit Machine Specific Register index to write.
84 // The 64-bit value to write to the Machine Specific Register.
86 // Return Value: The 64-bit value to write to the Machine Specific Register.
89 //----------------------------------------------------------------------------------
91 .type AsmWriteMsr, @function
97 // The follow 16 bytes stand for the bundle of
100 // since MSFT tool chain does not support mov msr[]= instruction