[PATCH] ppc64 iSeries: header file white space cleanups
[powerpc.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  * 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 HvMaxArchitectedLps             ((HvLpIndex)HVMAXARCHITECTEDLPS)
70 #define HvMaxArchitectedVirtualLans     ((HvLpVirtualLanIndex)16)
71 #define HvLpIndexInvalid                ((HvLpIndex)0xff)
72
73 /*
74  * Enums for the sub-components under PLIC
75  * Used in HvCall  and HvPrimaryCall
76  */
77 enum   HvCallCompIds {
78         HvCallCompId = 0,
79         HvCallCpuCtlsCompId = 1,
80         HvCallCfgCompId = 2,
81         HvCallEventCompId = 3,
82         HvCallHptCompId = 4,
83         HvCallPciCompId = 5,
84         HvCallSlmCompId = 6,
85         HvCallSmCompId = 7,
86         HvCallSpdCompId = 8,
87         HvCallXmCompId = 9,
88         HvCallRioCompId = 10,
89         HvCallRsvd3CompId = 11,
90         HvCallRsvd2CompId = 12,
91         HvCallRsvd1CompId = 13,
92         HvCallMaxCompId = 14,
93         HvPrimaryCallCompId = 0,
94         HvPrimaryCallCfgCompId = 1,
95         HvPrimaryCallPciCompId = 2,
96         HvPrimaryCallSmCompId = 3,
97         HvPrimaryCallSpdCompId = 4,
98         HvPrimaryCallXmCompId = 5,
99         HvPrimaryCallRioCompId = 6,
100         HvPrimaryCallRsvd7CompId = 7,
101         HvPrimaryCallRsvd6CompId = 8,
102         HvPrimaryCallRsvd5CompId = 9,
103         HvPrimaryCallRsvd4CompId = 10,
104         HvPrimaryCallRsvd3CompId = 11,
105         HvPrimaryCallRsvd2CompId = 12,
106         HvPrimaryCallRsvd1CompId = 13,
107         HvPrimaryCallMaxCompId = HvCallMaxCompId
108 };
109
110 struct HvLpBufferList {
111         u64 addr;
112         u64 len;
113 };
114
115 #endif /* _HVTYPES_H */