]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/AccessPmr.s
CryptoPkg: Removing ipf which is no longer supported from edk2.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / AccessPmr.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: AccessPmr.s\r
11///\r
12///\r
13/// IPF specific Performance Monitor Configuration/Data Registers accessing functions\r
14///\r
15\r
16//---------------------------------------------------------------------------------\r
17//++\r
18// AsmReadPmc\r
19//\r
20// This routine is used to Reads the current value of Performance Monitor Configuration Register (PMC).\r
21//\r
22// Arguments :\r
23//\r
24// On Entry : The 8-bit PMC index.\r
25//\r
26// Return Value: The current value of PMC by Index.\r
27//\r
28//--\r
29//----------------------------------------------------------------------------------\r
30.text\r
31.type AsmReadPmc, @function\r
32.proc AsmReadPmc\r
33.regstk 1, 0, 0, 0\r
34\r
35AsmReadPmc::\r
36 srlz.i;;\r
37 srlz.d;;\r
38 mov r8 = pmc[in0];;\r
39 br.ret.dpnt b0;;\r
40.endp AsmReadPmc\r
41\r
42//---------------------------------------------------------------------------------\r
43//++\r
44// AsmWritePmc\r
45//\r
46// This routine is used to write the current value to a Performance Monitor Configuration Register (PMC).\r
47//\r
48// Arguments :\r
49//\r
50// On Entry : The 8-bit PMC index.\r
51// The value should be written to PMC\r
52//\r
53// Return Value: The value written to PMC.\r
54//\r
55//--\r
56//----------------------------------------------------------------------------------\r
57.text\r
58.type AsmWritePmc, @function\r
59.proc AsmWritePmc\r
60.regstk 2, 0, 0, 0\r
61\r
62AsmWritePmc::\r
63 mov pmc[in0] = in1\r
64 mov r8 = in1;;\r
65 srlz.i;;\r
66 srlz.d;;\r
67 br.ret.dpnt b0;;\r
68.endp AsmWritePmc\r
69\r
70\r
71//---------------------------------------------------------------------------------\r
72//++\r
73// AsmReadPmd\r
74//\r
75// This routine is used to Reads the current value of Performance Monitor Data Register (PMD).\r
76//\r
77// Arguments :\r
78//\r
79// On Entry : The 8-bit PMD index.\r
80//\r
81// Return Value: The current value of PMD by Index.\r
82//\r
83//--\r
84//----------------------------------------------------------------------------------\r
85.text\r
86.type AsmReadPmd, @function\r
87.proc AsmReadPmd\r
88.regstk 1, 0, 0, 0\r
89\r
90AsmReadPmd::\r
91 srlz.i;;\r
92 srlz.d;;\r
93 mov r8 = pmd[in0];;\r
94 br.ret.dpnt b0;;\r
95.endp AsmReadPmd\r
96\r
97//---------------------------------------------------------------------------------\r
98//++\r
99// AsmWritePmd\r
100//\r
101// This routine is used to write the current value to Performance Monitor Data Register (PMD).\r
102//\r
103// Arguments :\r
104//\r
105// On Entry : The 8-bit PMD index.\r
106// The value should be written to PMD\r
107//\r
108// Return Value: The value written to PMD.\r
109//\r
110//--\r
111//----------------------------------------------------------------------------------\r
112.text\r
113.type AsmWritePmd, @function\r
114.proc AsmWritePmd\r
115.regstk 2, 0, 0, 0\r
116\r
117AsmWritePmd::\r
118 mov pmd[in0] = in1\r
119 mov r8 = in1;;\r
120 srlz.i;;\r
121 srlz.d;;\r
122 br.ret.dpnt b0;;\r
123.endp AsmWritePmd\r