ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-ppc64 / iSeries / mf.h
1 /*
2  * mf.h
3  * Copyright (C) 2001  Troy D. Armstrong IBM Corporation
4  *
5  * This modules exists as an interface between a Linux secondary partition
6  * running on an iSeries and the primary partition's Virtual Service
7  * Processor (VSP) object.  The VSP has final authority over powering on/off
8  * all partitions in the iSeries.  It also provides miscellaneous low-level
9  * machine facility type operations.
10  *
11  * 
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  * 
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
25  */
26 #ifndef MF_H_INCLUDED
27 #define MF_H_INCLUDED
28
29 #include <linux/proc_fs.h>
30
31 #include <asm/iSeries/HvTypes.h>
32 #include <asm/iSeries/HvLpEvent.h>
33
34 struct rtc_time;
35
36 typedef void (*MFCompleteHandler)(void *clientToken, int returnCode);
37
38 extern void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
39                 unsigned size, unsigned amount, MFCompleteHandler hdlr,
40                 void *userToken);
41 extern void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
42                 unsigned count, MFCompleteHandler hdlr, void *userToken);
43
44 extern void mf_powerOff(void);
45 extern void mf_reboot(void);
46
47 extern void mf_displaySrc(u32 word);
48 extern void mf_displayProgress(u16 value);
49 extern void mf_clearSrc(void);
50
51 extern void mf_init(void);
52
53 extern void mf_setSide(char side);
54 extern char mf_getSide(void);
55
56 extern void mf_setCmdLine(const char *cmdline, int size, u64 side);
57 extern int  mf_getCmdLine(char *cmdline, int *size, u64 side);
58
59 extern void mf_getSrcHistory(char *buffer, int size);
60
61 extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset,
62                 u64 side);
63 extern int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side);
64
65 extern int mf_setRtcTime(unsigned long time);
66 extern int mf_getRtcTime(unsigned long *time);
67 extern int mf_getRtc( struct rtc_time * tm );
68 extern int mf_setRtc( struct rtc_time * tm );
69
70 #endif /* MF_H_INCLUDED */