2 /// IPF specific Global Control Registers accessing functions
4 /// Copyright (c) 2006, Intel Corporation
5 /// All rights reserved. This program and the accompanying materials
6 /// are licensed and made available under the terms and conditions of the BSD License
7 /// which accompanies this distribution. The full text of the license may be found at
8 /// http://opensource.org/licenses/bsd-license.php
10 /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 /// Module Name: AccessGcr.s
17 //---------------------------------------------------------------------------------
21 // This routine is used to Read the value of Default Control Register (DCR).
27 // Return Value: The current value of DCR.
30 //----------------------------------------------------------------------------------
32 .type AsmReadDcr, @function
40 //---------------------------------------------------------------------------------
44 // This routine is used to write the value to Default Control Register (DCR).
48 // On Entry : The value need to be written to DCR
50 // Return Value: The value written to DCR.
53 //----------------------------------------------------------------------------------
55 .type AsmWriteDcr, @function
68 //---------------------------------------------------------------------------------
72 // This routine is used to Read the value of Interval Timer Counter Register (ITC).
78 // Return Value: The current value of ITC.
81 //----------------------------------------------------------------------------------
83 .type AsmReadItc, @function
91 //---------------------------------------------------------------------------------
95 // This routine is used to write the value to Interval Timer Counter Register (ITC).
99 // On Entry : The value need to be written to the ITC
101 // Return Value: The value written to the ITC.
104 //----------------------------------------------------------------------------------
106 .type AsmWriteItc, @function
117 //---------------------------------------------------------------------------------
121 // This routine is used to Read the value of Interval Timer Match Register (ITM).
127 // Return Value: The current value of ITM.
130 //----------------------------------------------------------------------------------
132 .type AsmReadItm, @function
140 //---------------------------------------------------------------------------------
144 // This routine is used to write the value to Interval Timer Match Register (ITM).
148 // On Entry : The value need to be written to ITM
150 // Return Value: The value written to ITM.
153 //----------------------------------------------------------------------------------
155 .type AsmWriteItm, @function
167 //---------------------------------------------------------------------------------
171 // This routine is used to read the value of Interruption Vector Address Register (IVA).
177 // Return Value: The current value of IVA.
180 //----------------------------------------------------------------------------------
182 .type AsmReadIva, @function
190 //---------------------------------------------------------------------------------
194 // This routine is used to write the value to Interruption Vector Address Register (IVA).
198 // On Entry : The value need to be written to IVA
200 // Return Value: The value written to IVA.
203 //----------------------------------------------------------------------------------
205 .type AsmWriteIva, @function
209 alloc loc1=ar.pfs,1,4,0,0 ;;
212 rsm 0x6000 // Make sure interrupts are masked
226 //---------------------------------------------------------------------------------
230 // This routine is used to read the value of Page Table Address Register (PTA).
236 // Return Value: The current value of PTA.
239 //----------------------------------------------------------------------------------
241 .type AsmReadPta, @function
249 //---------------------------------------------------------------------------------
253 // This routine is used to write the value to Page Table Address Register (PTA)).
257 // On Entry : The value need to be written to PTA
259 // Return Value: The value written to PTA.
262 //----------------------------------------------------------------------------------
264 .type AsmWritePta, @function