ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-ppc64 / iSeries / HvTypes.h
1 /*
2  * HvTypes.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 #ifndef _HVTYPES_H
20 #define _HVTYPES_H
21
22 //===========================================================================
23 //                                                             Header File Id
24 // Name______________:  HvTypes.H
25 //
26 // Description_______:
27 //
28 //      General typedefs for the hypervisor.
29 //
30 // Declared Class(es):
31 //
32 //===========================================================================
33
34 #include <asm/types.h>
35
36 //-------------------------------------------------------------------
37 // Typedefs
38 //-------------------------------------------------------------------
39 typedef u8      HvLpIndex;
40 typedef u16     HvLpInstanceId;
41 typedef u64     HvLpTOD;
42 typedef u64     HvLpSystemSerialNum;
43 typedef u8      HvLpDeviceSerialNum[12];
44 typedef u16     HvLpSanHwSet;
45 typedef u16     HvLpBus;
46 typedef u16     HvLpBoard;
47 typedef u16     HvLpCard;
48 typedef u8      HvLpDeviceType[4];
49 typedef u8      HvLpDeviceModel[3];
50 typedef u64     HvIoToken;
51 typedef u8      HvLpName[8];
52 typedef u32     HvIoId;
53 typedef u64     HvRealMemoryIndex;
54 typedef u32     HvLpIndexMap;           // Must hold HvMaxArchitectedLps bits!!!
55 typedef u16     HvLpVrmIndex;
56 typedef u32     HvXmGenerationId;
57 typedef u8      HvLpBusPool;                    
58 typedef u8      HvLpSharedPoolIndex;            
59 typedef u16     HvLpSharedProcUnitsX100;
60 typedef u8      HvLpVirtualLanIndex;
61 typedef u16     HvLpVirtualLanIndexMap; // Must hold HvMaxArchitectedVirtualLans bits!!!
62 typedef u16     HvBusNumber;            // Hypervisor Bus Number
63 typedef u8      HvSubBusNumber;         // Hypervisor SubBus Number
64 typedef u8      HvAgentId;              // Hypervisor DevFn
65
66
67 #define HVMAXARCHITECTEDLPS 32
68 #define HVCHUNKSIZE 256 * 1024
69 #define HVPAGESIZE 4 * 1024
70 #define HVLPMINMEGSPRIMARY 256
71 #define HVLPMINMEGSSECONDARY 64
72 #define HVCHUNKSPERMEG 4
73 #define HVPAGESPERMEG 256
74 #define HVPAGESPERCHUNK 64
75  
76 #define HvMaxArchitectedLps             ((HvLpIndex)HVMAXARCHITECTEDLPS)
77 #define HvMaxArchitectedVirtualLans     ((HvLpVirtualLanIndex)16)
78 #define HvLpIndexInvalid                ((HvLpIndex)0xff)
79
80 //--------------------------------------------------------------------
81 // Enums for the sub-components under PLIC
82 // Used in HvCall  and HvPrimaryCall
83 //--------------------------------------------------------------------
84 enum   HvCallCompIds
85 {
86         HvCallCompId = 0,
87         HvCallCpuCtlsCompId = 1,
88         HvCallCfgCompId = 2,
89         HvCallEventCompId = 3,
90         HvCallHptCompId = 4,
91         HvCallPciCompId = 5,
92         HvCallSlmCompId = 6,
93         HvCallSmCompId = 7,
94         HvCallSpdCompId = 8,
95         HvCallXmCompId = 9,
96         HvCallRioCompId = 10, 
97         HvCallRsvd3CompId = 11,
98         HvCallRsvd2CompId = 12,
99         HvCallRsvd1CompId = 13,
100         HvCallMaxCompId = 14,
101         HvPrimaryCallCompId = 0,    
102         HvPrimaryCallCfgCompId = 1,
103         HvPrimaryCallPciCompId = 2,    
104         HvPrimaryCallSmCompId = 3,
105         HvPrimaryCallSpdCompId = 4,
106         HvPrimaryCallXmCompId = 5,
107         HvPrimaryCallRioCompId = 6, 
108         HvPrimaryCallRsvd7CompId = 7,
109         HvPrimaryCallRsvd6CompId = 8,
110         HvPrimaryCallRsvd5CompId = 9,
111         HvPrimaryCallRsvd4CompId = 10,
112         HvPrimaryCallRsvd3CompId = 11,
113         HvPrimaryCallRsvd2CompId = 12,
114         HvPrimaryCallRsvd1CompId = 13,
115         HvPrimaryCallMaxCompId = HvCallMaxCompId     
116 };
117
118 struct HvLpBufferList {
119         u64 addr;
120         u64 len;
121 };
122
123 #endif /* _HVTYPES_H */