1 /* 2 * Copyright (C) 2001 Mike Corrigan IBM Corporation 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 #ifndef _ASM_POWERPC_ISERIES_HV_TYPES_H 19 #define _ASM_POWERPC_ISERIES_HV_TYPES_H 20 21 /* 22 * General typedefs for the hypervisor. 23 */ 24 25 #include <asm/types.h> 26 27 typedef u8 HvLpIndex; 28 typedef u16 HvLpInstanceId; 29 typedef u64 HvLpTOD; 30 typedef u64 HvLpSystemSerialNum; 31 typedef u8 HvLpDeviceSerialNum[12]; 32 typedef u16 HvLpSanHwSet; 33 typedef u16 HvLpBus; 34 typedef u16 HvLpBoard; 35 typedef u16 HvLpCard; 36 typedef u8 HvLpDeviceType[4]; 37 typedef u8 HvLpDeviceModel[3]; 38 typedef u64 HvIoToken; 39 typedef u8 HvLpName[8]; 40 typedef u32 HvIoId; 41 typedef u64 HvRealMemoryIndex; 42 typedef u32 HvLpIndexMap; /* Must hold HVMAXARCHITECTEDLPS bits!!! */ 43 typedef u16 HvLpVrmIndex; 44 typedef u32 HvXmGenerationId; 45 typedef u8 HvLpBusPool; 46 typedef u8 HvLpSharedPoolIndex; 47 typedef u16 HvLpSharedProcUnitsX100; 48 typedef u8 HvLpVirtualLanIndex; 49 typedef u16 HvLpVirtualLanIndexMap; /* Must hold HVMAXARCHITECTEDVIRTUALLANS bits!!! */ 50 typedef u16 HvBusNumber; /* Hypervisor Bus Number */ 51 typedef u8 HvSubBusNumber; /* Hypervisor SubBus Number */ 52 typedef u8 HvAgentId; /* Hypervisor DevFn */ 53 54 55 #define HVMAXARCHITECTEDLPS 32 56 #define HVMAXARCHITECTEDVIRTUALLANS 16 57 #define HVMAXARCHITECTEDVIRTUALDISKS 32 58 #define HVMAXARCHITECTEDVIRTUALCDROMS 8 59 #define HVMAXARCHITECTEDVIRTUALTAPES 8 60 #define HVCHUNKSIZE (256 * 1024) 61 #define HVPAGESIZE (4 * 1024) 62 #define HVLPMINMEGSPRIMARY 256 63 #define HVLPMINMEGSSECONDARY 64 64 #define HVCHUNKSPERMEG 4 65 #define HVPAGESPERMEG 256 66 #define HVPAGESPERCHUNK 64 67 68 #define HvLpIndexInvalid ((HvLpIndex)0xff) 69 70 /* 71 * Enums for the sub-components under PLIC 72 * Used in HvCall and HvPrimaryCall 73 */ 74 enum { 75 HvCallCompId = 0, 76 HvCallCpuCtlsCompId = 1, 77 HvCallCfgCompId = 2, 78 HvCallEventCompId = 3, 79 HvCallHptCompId = 4, 80 HvCallPciCompId = 5, 81 HvCallSlmCompId = 6, 82 HvCallSmCompId = 7, 83 HvCallSpdCompId = 8, 84 HvCallXmCompId = 9, 85 HvCallRioCompId = 10, 86 HvCallRsvd3CompId = 11, 87 HvCallRsvd2CompId = 12, 88 HvCallRsvd1CompId = 13, 89 HvCallMaxCompId = 14, 90 HvPrimaryCallCompId = 0, 91 HvPrimaryCallCfgCompId = 1, 92 HvPrimaryCallPciCompId = 2, 93 HvPrimaryCallSmCompId = 3, 94 HvPrimaryCallSpdCompId = 4, 95 HvPrimaryCallXmCompId = 5, 96 HvPrimaryCallRioCompId = 6, 97 HvPrimaryCallRsvd7CompId = 7, 98 HvPrimaryCallRsvd6CompId = 8, 99 HvPrimaryCallRsvd5CompId = 9, 100 HvPrimaryCallRsvd4CompId = 10, 101 HvPrimaryCallRsvd3CompId = 11, 102 HvPrimaryCallRsvd2CompId = 12, 103 HvPrimaryCallRsvd1CompId = 13, 104 HvPrimaryCallMaxCompId = HvCallMaxCompId 105 }; 106 107 struct HvLpBufferList { 108 u64 addr; 109 u64 len; 110 }; 111 112 #endif /* _ASM_POWERPC_ISERIES_HV_TYPES_H */ 113