]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessGcr.s
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / AccessGcr.s
CommitLineData
2c7e5c2f
HT
1/// Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
2/// This program and the accompanying materials\r
c7f33ca4 3/// are licensed and made available under the terms and conditions of the BSD License\r
4/// which accompanies this distribution. The full text of the license may be found at\r
5/// http://opensource.org/licenses/bsd-license.php\r
6///\r
7/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
8/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
9///\r
10/// Module Name: AccessGcr.s\r
11///\r
12///\r
13/// IPF specific Global Control Registers accessing functions\r
14///\r
15\r
16//---------------------------------------------------------------------------------\r
17//++\r
18// AsmReadDcr\r
19//\r
20// This routine is used to Read the value of Default Control Register (DCR).\r
21//\r
22// Arguments :\r
23//\r
24// On Entry :\r
25//\r
26// Return Value: The current value of DCR.\r
27//\r
28//--\r
29//----------------------------------------------------------------------------------\r
30.text\r
31.type AsmReadDcr, @function\r
32.proc AsmReadDcr\r
33\r
34AsmReadDcr::\r
35 mov r8 = cr.dcr;;\r
36 br.ret.dpnt b0;;\r
37.endp AsmReadDcr\r
38\r
39//---------------------------------------------------------------------------------\r
40//++\r
41// AsmWriteDcr\r
42//\r
43// This routine is used to write the value to Default Control Register (DCR).\r
44//\r
45// Arguments :\r
46//\r
47// On Entry : The value need to be written to DCR\r
48//\r
49// Return Value: The value written to DCR.\r
50//\r
51//--\r
52//----------------------------------------------------------------------------------\r
53.text\r
54.type AsmWriteDcr, @function\r
55.proc AsmWriteDcr\r
56.regstk 1, 0, 0, 0\r
57\r
58AsmWriteDcr::\r
59 mov cr.dcr = in0\r
60 mov r8 = in0;;\r
61 srlz.i;;\r
62 srlz.d;;\r
63 br.ret.dpnt b0;;\r
64.endp AsmWriteDcr\r
65\r
66\r
67//---------------------------------------------------------------------------------\r
68//++\r
69// AsmReadItc\r
70//\r
71// This routine is used to Read the value of Interval Timer Counter Register (ITC).\r
72//\r
73// Arguments :\r
74//\r
75// On Entry :\r
76//\r
77// Return Value: The current value of ITC.\r
78//\r
79//--\r
80//----------------------------------------------------------------------------------\r
81.text\r
82.type AsmReadItc, @function\r
83.proc AsmReadItc\r
84\r
85AsmReadItc::\r
86 mov r8 = ar.itc;;\r
87 br.ret.dpnt b0;;\r
88.endp AsmReadItc\r
89\r
90//---------------------------------------------------------------------------------\r
91//++\r
92// AsmWriteItc\r
93//\r
94// This routine is used to write the value to Interval Timer Counter Register (ITC).\r
95//\r
96// Arguments :\r
97//\r
98// On Entry : The value need to be written to the ITC\r
99//\r
100// Return Value: The value written to the ITC.\r
101//\r
102//--\r
103//----------------------------------------------------------------------------------\r
104.text\r
105.type AsmWriteItc, @function\r
106.proc AsmWriteItc\r
107.regstk 1, 0, 0, 0\r
108\r
109AsmWriteItc::\r
110 mov ar.itc = in0\r
111 mov r8 = in0;;\r
112 br.ret.dpnt b0;;\r
113.endp AsmWriteItc\r
114\r
115\r
116//---------------------------------------------------------------------------------\r
117//++\r
118// AsmReadItm\r
119//\r
120// This routine is used to Read the value of Interval Timer Match Register (ITM).\r
121//\r
122// Arguments :\r
123//\r
124// On Entry :\r
125//\r
126// Return Value: The current value of ITM.\r
127//\r
128//--\r
129//----------------------------------------------------------------------------------\r
130.text\r
131.type AsmReadItm, @function\r
132.proc AsmReadItm\r
133\r
134AsmReadItm::\r
135 mov r8 = cr.itm;;\r
136 br.ret.dpnt b0;;\r
137.endp AsmReadItm\r
138\r
139//---------------------------------------------------------------------------------\r
140//++\r
141// AsmWriteItm\r
142//\r
143// This routine is used to write the value to Interval Timer Match Register (ITM).\r
144//\r
145// Arguments :\r
146//\r
147// On Entry : The value need to be written to ITM\r
148//\r
149// Return Value: The value written to ITM.\r
150//\r
151//--\r
152//----------------------------------------------------------------------------------\r
153.text\r
154.type AsmWriteItm, @function\r
155.proc AsmWriteItm\r
156.regstk 1, 0, 0, 0\r
157\r
158AsmWriteItm::\r
159 mov cr.itm = in0\r
160 mov r8 = in0;;\r
161 srlz.d;\r
162 br.ret.dpnt b0;;\r
163.endp AsmWriteItm\r
164\r
165\r
166//---------------------------------------------------------------------------------\r
167//++\r
168// AsmReadIva\r
169//\r
170// This routine is used to read the value of Interruption Vector Address Register (IVA).\r
171//\r
172// Arguments :\r
173//\r
174// On Entry :\r
175//\r
176// Return Value: The current value of IVA.\r
177//\r
178//--\r
179//----------------------------------------------------------------------------------\r
180.text\r
181.type AsmReadIva, @function\r
182.proc AsmReadIva\r
183\r
184AsmReadIva::\r
185 mov r8 = cr.iva;;\r
186 br.ret.dpnt b0;;\r
187.endp AsmReadIva\r
188\r
189//---------------------------------------------------------------------------------\r
190//++\r
191// AsmWriteIva\r
192//\r
193// This routine is used to write the value to Interruption Vector Address Register (IVA).\r
194//\r
195// Arguments :\r
196//\r
197// On Entry : The value need to be written to IVA\r
198//\r
199// Return Value: The value written to IVA.\r
200//\r
201//--\r
202//----------------------------------------------------------------------------------\r
203.text\r
204.type AsmWriteIva, @function\r
205.proc AsmWriteIva\r
206.regstk 1, 0, 0, 0\r
207\r
208AsmWriteIva::\r
209 mov cr.iva = in0\r
210 mov r8 = in0;;\r
211 br.ret.dpnt b0;;\r
212.endp AsmWriteIva\r
213\r
214\r
215//---------------------------------------------------------------------------------\r
216//++\r
217// AsmReadPta\r
218//\r
219// This routine is used to read the value of Page Table Address Register (PTA).\r
220//\r
221// Arguments :\r
222//\r
223// On Entry :\r
224//\r
225// Return Value: The current value of PTA.\r
226//\r
227//--\r
228//----------------------------------------------------------------------------------\r
229.text\r
230.type AsmReadPta, @function\r
231.proc AsmReadPta\r
232\r
233AsmReadPta::\r
234 mov r8 = cr.pta;;\r
235 br.ret.dpnt b0;;\r
236.endp AsmReadPta\r
237\r
238//---------------------------------------------------------------------------------\r
239//++\r
240// AsmWritePta\r
241//\r
242// This routine is used to write the value to Page Table Address Register (PTA)).\r
243//\r
244// Arguments :\r
245//\r
246// On Entry : The value need to be written to PTA\r
247//\r
248// Return Value: The value written to PTA.\r
249//\r
250//--\r
251//----------------------------------------------------------------------------------\r
252.text\r
253.type AsmWritePta, @function\r
254.proc AsmWritePta\r
255.regstk 1, 0, 0, 0\r
256\r
257AsmWritePta::\r
258 mov cr.pta = in0\r
259 mov r8 = in0;;\r
260 srlz.i;;\r
261 srlz.d;;\r
262 br.ret.dpnt b0;;\r
263.endp AsmWritePta