HvTypes.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:4k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

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