--- /dev/null
+/// @file\r
+/// IPF specific Global Control Registers accessing functions\r
+///\r
+/// Copyright (c) 2006, Intel Corporation\r
+/// All rights reserved. This program and the accompanying materials\r
+/// are licensed and made available under the terms and conditions of the BSD License\r
+/// which accompanies this distribution. The full text of the license may be found at\r
+/// http://opensource.org/licenses/bsd-license.php\r
+///\r
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+///\r
+/// Module Name: AccessGcr.s\r
+///\r
+///\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmReadDcr\r
+//\r
+// This routine is used to Read the value of Default Control Register (DCR).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry :\r
+//\r
+// Return Value: The current value of DCR.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmReadDcr, @function\r
+.proc AsmReadDcr\r
+\r
+AsmReadDcr::\r
+ mov r8 = cr.dcr;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmReadDcr\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmWriteDcr\r
+//\r
+// This routine is used to write the value to Default Control Register (DCR).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry : The value need to be written to DCR\r
+//\r
+// Return Value: The value written to DCR.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmWriteDcr, @function\r
+.proc AsmWriteDcr\r
+.regstk 1, 0, 0, 0\r
+\r
+AsmWriteDcr::\r
+ mov cr.dcr = in0\r
+ mov r8 = in0;;\r
+ srlz.i;;\r
+ srlz.d;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmWriteDcr\r
+\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmReadItc\r
+//\r
+// This routine is used to Read the value of Interval Timer Counter Register (ITC).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry :\r
+//\r
+// Return Value: The current value of ITC.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmReadItc, @function\r
+.proc AsmReadItc\r
+\r
+AsmReadItc::\r
+ mov r8 = ar.itc;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmReadItc\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmWriteItc\r
+//\r
+// This routine is used to write the value to Interval Timer Counter Register (ITC).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry : The value need to be written to the ITC\r
+//\r
+// Return Value: The value written to the ITC.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmWriteItc, @function\r
+.proc AsmWriteItc\r
+.regstk 1, 0, 0, 0\r
+\r
+AsmWriteItc::\r
+ mov ar.itc = in0\r
+ mov r8 = in0;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmWriteItc\r
+\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmReadItm\r
+//\r
+// This routine is used to Read the value of Interval Timer Match Register (ITM).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry :\r
+//\r
+// Return Value: The current value of ITM.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmReadItm, @function\r
+.proc AsmReadItm\r
+\r
+AsmReadItm::\r
+ mov r8 = cr.itm;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmReadItm\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmWriteItm\r
+//\r
+// This routine is used to write the value to Interval Timer Match Register (ITM).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry : The value need to be written to ITM\r
+//\r
+// Return Value: The value written to ITM.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmWriteItm, @function\r
+.proc AsmWriteItm\r
+.regstk 1, 0, 0, 0\r
+\r
+AsmWriteItm::\r
+ mov cr.itm = in0\r
+ mov r8 = in0;;\r
+ srlz.d;\r
+ br.ret.dpnt b0;;\r
+.endp AsmWriteItm\r
+\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmReadIva\r
+//\r
+// This routine is used to read the value of Interruption Vector Address Register (IVA).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry :\r
+//\r
+// Return Value: The current value of IVA.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmReadIva, @function\r
+.proc AsmReadIva\r
+\r
+AsmReadIva::\r
+ mov r8 = cr.iva;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmReadIva\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmWriteIva\r
+//\r
+// This routine is used to write the value to Interruption Vector Address Register (IVA).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry : The value need to be written to IVA\r
+//\r
+// Return Value: The value written to IVA.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmWriteIva, @function\r
+.proc AsmWriteIva\r
+.regstk 1, 0, 0, 0\r
+\r
+AsmWriteIva::\r
+ mov cr.iva = in0\r
+ mov r8 = in0;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmWriteIva\r
+\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmReadPta\r
+//\r
+// This routine is used to read the value of Page Table Address Register (PTA).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry :\r
+//\r
+// Return Value: The current value of PTA.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmReadPta, @function\r
+.proc AsmReadPta\r
+\r
+AsmReadPta::\r
+ mov r8 = cr.pta;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmReadPta\r
+\r
+//---------------------------------------------------------------------------------\r
+//++\r
+// AsmWritePta\r
+//\r
+// This routine is used to write the value to Page Table Address Register (PTA)).\r
+//\r
+// Arguments :\r
+//\r
+// On Entry : The value need to be written to PTA\r
+//\r
+// Return Value: The value written to PTA.\r
+//\r
+//--\r
+//----------------------------------------------------------------------------------\r
+.text\r
+.type AsmWritePta, @function\r
+.proc AsmWritePta\r
+.regstk 1, 0, 0, 0\r
+\r
+AsmWritePta::\r
+ mov cr.pta = in0\r
+ mov r8 = in0;;\r
+ srlz.i;;\r
+ srlz.d;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmWritePta
\ No newline at end of file