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 27 #ifndef MF_H_INCLUDED 28 #define MF_H_INCLUDED 29 30 #include <asm/iSeries/HvTypes.h> 31 #include <asm/iSeries/HvLpEvent.h> 32 33 struct rtc_time; 34 35 typedef void (*MFCompleteHandler)( void * clientToken, int returnCode ); 36 37 extern void mf_allocateLpEvents( HvLpIndex targetLp, 38 HvLpEvent_Type type, 39 unsigned size, 40 unsigned amount, 41 MFCompleteHandler hdlr, 42 void * userToken ); 43 44 extern void mf_deallocateLpEvents( HvLpIndex targetLp, 45 HvLpEvent_Type type, 46 unsigned count, 47 MFCompleteHandler hdlr, 48 void * userToken ); 49 50 extern void mf_powerOff( void ); 51 52 extern void mf_reboot( void ); 53 54 extern void mf_displaySrc( u32 word ); 55 extern void mf_displayProgress( u16 value ); 56 57 extern void mf_clearSrc( void ); 58 59 extern void mf_init( void ); 60 61 extern void mf_setSide(char side); 62 63 extern char mf_getSide(void); 64 65 extern void mf_setCmdLine(const char *cmdline, int size, u64 side); 66 67 extern int mf_getCmdLine(char *cmdline, int *size, u64 side); 68 69 extern void mf_getSrcHistory(char *buffer, int size); 70 71 extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side); 72 73 extern int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side); 74 75 extern int mf_setRtcTime(unsigned long time); 76 77 extern int mf_getRtcTime(unsigned long *time); 78 79 extern int mf_getRtc( struct rtc_time * tm ); 80 81 extern int mf_setRtc( struct rtc_time * tm ); 82 83 #endif /* MF_H_INCLUDED */ 84