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