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 27typedef u8 HvLpIndex; 28typedef u16 HvLpInstanceId; 29typedef u64 HvLpTOD; 30typedef u64 HvLpSystemSerialNum; 31typedef u8 HvLpDeviceSerialNum[12]; 32typedef u16 HvLpSanHwSet; 33typedef u16 HvLpBus; 34typedef u16 HvLpBoard; 35typedef u16 HvLpCard; 36typedef u8 HvLpDeviceType[4]; 37typedef u8 HvLpDeviceModel[3]; 38typedef u64 HvIoToken; 39typedef u8 HvLpName[8]; 40typedef u32 HvIoId; 41typedef u64 HvRealMemoryIndex; 42typedef u32 HvLpIndexMap; /* Must hold HVMAXARCHITECTEDLPS bits!!! */ 43typedef u16 HvLpVrmIndex; 44typedef u32 HvXmGenerationId; 45typedef u8 HvLpBusPool; 46typedef u8 HvLpSharedPoolIndex; 47typedef u16 HvLpSharedProcUnitsX100; 48typedef u8 HvLpVirtualLanIndex; 49typedef u16 HvLpVirtualLanIndexMap; /* Must hold HVMAXARCHITECTEDVIRTUALLANS bits!!! */ 50typedef u16 HvBusNumber; /* Hypervisor Bus Number */ 51typedef u8 HvSubBusNumber; /* Hypervisor SubBus Number */ 52typedef 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 */ 74enum { 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 107struct HvLpBufferList { 108 u64 addr; 109 u64 len; 110}; 111 112#endif /* _ASM_POWERPC_ISERIES_HV_TYPES_H */ 113