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