diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ppc64/iSeries/HvCall.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCall.h')
-rw-r--r-- | include/asm-ppc64/iSeries/HvCall.h | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/include/asm-ppc64/iSeries/HvCall.h b/include/asm-ppc64/iSeries/HvCall.h new file mode 100644 index 000000000000..d9a2e74e2399 --- /dev/null +++ b/include/asm-ppc64/iSeries/HvCall.h | |||
@@ -0,0 +1,205 @@ | |||
1 | /* | ||
2 | * HvCall.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | //=========================================================================== | ||
21 | // | ||
22 | // This file contains the "hypervisor call" interface which is used to | ||
23 | // drive the hypervisor from the OS. | ||
24 | // | ||
25 | //=========================================================================== | ||
26 | #ifndef _HVCALL_H | ||
27 | #define _HVCALL_H | ||
28 | |||
29 | //------------------------------------------------------------------- | ||
30 | // Standard Includes | ||
31 | //------------------------------------------------------------------- | ||
32 | #include <asm/iSeries/HvCallSc.h> | ||
33 | #include <asm/iSeries/HvTypes.h> | ||
34 | #include <asm/paca.h> | ||
35 | |||
36 | /* | ||
37 | enum HvCall_ReturnCode | ||
38 | { | ||
39 | HvCall_Good = 0, | ||
40 | HvCall_Partial = 1, | ||
41 | HvCall_NotOwned = 2, | ||
42 | HvCall_NotFreed = 3, | ||
43 | HvCall_UnspecifiedError = 4 | ||
44 | }; | ||
45 | |||
46 | enum HvCall_TypeOfSIT | ||
47 | { | ||
48 | HvCall_ReduceOnly = 0, | ||
49 | HvCall_Unconditional = 1 | ||
50 | }; | ||
51 | |||
52 | enum HvCall_TypeOfYield | ||
53 | { | ||
54 | HvCall_YieldTimed = 0, // Yield until specified time | ||
55 | HvCall_YieldToActive = 1, // Yield until all active procs have run | ||
56 | HvCall_YieldToProc = 2 // Yield until the specified processor has run | ||
57 | }; | ||
58 | |||
59 | enum HvCall_InterruptMasks | ||
60 | { | ||
61 | HvCall_MaskIPI = 0x00000001, | ||
62 | HvCall_MaskLpEvent = 0x00000002, | ||
63 | HvCall_MaskLpProd = 0x00000004, | ||
64 | HvCall_MaskTimeout = 0x00000008 | ||
65 | }; | ||
66 | |||
67 | enum HvCall_VaryOffChunkRc | ||
68 | { | ||
69 | HvCall_VaryOffSucceeded = 0, | ||
70 | HvCall_VaryOffWithdrawn = 1, | ||
71 | HvCall_ChunkInLoadArea = 2, | ||
72 | HvCall_ChunkInHPT = 3, | ||
73 | HvCall_ChunkNotAccessible = 4, | ||
74 | HvCall_ChunkInUse = 5 | ||
75 | }; | ||
76 | */ | ||
77 | |||
78 | /* Type of yield for HvCallBaseYieldProcessor */ | ||
79 | #define HvCall_YieldTimed 0 // Yield until specified time (tb) | ||
80 | #define HvCall_YieldToActive 1 // Yield until all active procs have run | ||
81 | #define HvCall_YieldToProc 2 // Yield until the specified processor has run | ||
82 | |||
83 | /* interrupt masks for setEnabledInterrupts */ | ||
84 | #define HvCall_MaskIPI 0x00000001 | ||
85 | #define HvCall_MaskLpEvent 0x00000002 | ||
86 | #define HvCall_MaskLpProd 0x00000004 | ||
87 | #define HvCall_MaskTimeout 0x00000008 | ||
88 | |||
89 | /* Log buffer formats */ | ||
90 | #define HvCall_LogBuffer_ASCII 0 | ||
91 | #define HvCall_LogBuffer_EBCDIC 1 | ||
92 | |||
93 | #define HvCallBaseAckDeferredInts HvCallBase + 0 | ||
94 | #define HvCallBaseCpmPowerOff HvCallBase + 1 | ||
95 | #define HvCallBaseGetHwPatch HvCallBase + 2 | ||
96 | #define HvCallBaseReIplSpAttn HvCallBase + 3 | ||
97 | #define HvCallBaseSetASR HvCallBase + 4 | ||
98 | #define HvCallBaseSetASRAndRfi HvCallBase + 5 | ||
99 | #define HvCallBaseSetIMR HvCallBase + 6 | ||
100 | #define HvCallBaseSendIPI HvCallBase + 7 | ||
101 | #define HvCallBaseTerminateMachine HvCallBase + 8 | ||
102 | #define HvCallBaseTerminateMachineSrc HvCallBase + 9 | ||
103 | #define HvCallBaseProcessPlicInterrupts HvCallBase + 10 | ||
104 | #define HvCallBaseIsPrimaryCpmOrMsdIpl HvCallBase + 11 | ||
105 | #define HvCallBaseSetVirtualSIT HvCallBase + 12 | ||
106 | #define HvCallBaseVaryOffThisProcessor HvCallBase + 13 | ||
107 | #define HvCallBaseVaryOffMemoryChunk HvCallBase + 14 | ||
108 | #define HvCallBaseVaryOffInteractivePercentage HvCallBase + 15 | ||
109 | #define HvCallBaseSendLpProd HvCallBase + 16 | ||
110 | #define HvCallBaseSetEnabledInterrupts HvCallBase + 17 | ||
111 | #define HvCallBaseYieldProcessor HvCallBase + 18 | ||
112 | #define HvCallBaseVaryOffSharedProcUnits HvCallBase + 19 | ||
113 | #define HvCallBaseSetVirtualDecr HvCallBase + 20 | ||
114 | #define HvCallBaseClearLogBuffer HvCallBase + 21 | ||
115 | #define HvCallBaseGetLogBufferCodePage HvCallBase + 22 | ||
116 | #define HvCallBaseGetLogBufferFormat HvCallBase + 23 | ||
117 | #define HvCallBaseGetLogBufferLength HvCallBase + 24 | ||
118 | #define HvCallBaseReadLogBuffer HvCallBase + 25 | ||
119 | #define HvCallBaseSetLogBufferFormatAndCodePage HvCallBase + 26 | ||
120 | #define HvCallBaseWriteLogBuffer HvCallBase + 27 | ||
121 | #define HvCallBaseRouter28 HvCallBase + 28 | ||
122 | #define HvCallBaseRouter29 HvCallBase + 29 | ||
123 | #define HvCallBaseRouter30 HvCallBase + 30 | ||
124 | #define HvCallBaseSetDebugBus HvCallBase + 31 | ||
125 | |||
126 | #define HvCallCcSetDABR HvCallCc + 7 | ||
127 | |||
128 | //===================================================================================== | ||
129 | static inline void HvCall_setVirtualDecr(void) | ||
130 | { | ||
131 | /* Ignore any error return codes - most likely means that the target value for the | ||
132 | * LP has been increased and this vary off would bring us below the new target. */ | ||
133 | HvCall0(HvCallBaseSetVirtualDecr); | ||
134 | } | ||
135 | //===================================================================== | ||
136 | static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm) | ||
137 | { | ||
138 | HvCall2( HvCallBaseYieldProcessor, typeOfYield, yieldParm ); | ||
139 | } | ||
140 | //===================================================================== | ||
141 | static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts) | ||
142 | { | ||
143 | HvCall1(HvCallBaseSetEnabledInterrupts,enabledInterrupts); | ||
144 | } | ||
145 | |||
146 | //===================================================================== | ||
147 | static inline void HvCall_clearLogBuffer(HvLpIndex lpindex) | ||
148 | { | ||
149 | HvCall1(HvCallBaseClearLogBuffer,lpindex); | ||
150 | } | ||
151 | |||
152 | //===================================================================== | ||
153 | static inline u32 HvCall_getLogBufferCodePage(HvLpIndex lpindex) | ||
154 | { | ||
155 | u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage,lpindex); | ||
156 | return retVal; | ||
157 | } | ||
158 | |||
159 | //===================================================================== | ||
160 | static inline int HvCall_getLogBufferFormat(HvLpIndex lpindex) | ||
161 | { | ||
162 | int retVal = HvCall1(HvCallBaseGetLogBufferFormat,lpindex); | ||
163 | return retVal; | ||
164 | } | ||
165 | |||
166 | //===================================================================== | ||
167 | static inline u32 HvCall_getLogBufferLength(HvLpIndex lpindex) | ||
168 | { | ||
169 | u32 retVal = HvCall1(HvCallBaseGetLogBufferLength,lpindex); | ||
170 | return retVal; | ||
171 | } | ||
172 | |||
173 | //===================================================================== | ||
174 | static inline void HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage) | ||
175 | { | ||
176 | HvCall2(HvCallBaseSetLogBufferFormatAndCodePage,format, codePage); | ||
177 | } | ||
178 | |||
179 | //===================================================================== | ||
180 | int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen); | ||
181 | void HvCall_writeLogBuffer(const void *buffer, u64 bufLen); | ||
182 | |||
183 | //===================================================================== | ||
184 | static inline void HvCall_sendIPI(struct paca_struct * targetPaca) | ||
185 | { | ||
186 | HvCall1( HvCallBaseSendIPI, targetPaca->paca_index ); | ||
187 | } | ||
188 | |||
189 | //===================================================================== | ||
190 | static inline void HvCall_terminateMachineSrc(void) | ||
191 | { | ||
192 | HvCall0( HvCallBaseTerminateMachineSrc ); | ||
193 | } | ||
194 | |||
195 | static inline void HvCall_setDABR(unsigned long val) | ||
196 | { | ||
197 | HvCall1(HvCallCcSetDABR, val); | ||
198 | } | ||
199 | |||
200 | static inline void HvCall_setDebugBus(unsigned long val) | ||
201 | { | ||
202 | HvCall1(HvCallBaseSetDebugBus, val); | ||
203 | } | ||
204 | |||
205 | #endif /* _HVCALL_H */ | ||