123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- #ifndef __BMC_TYPE_H__
- #define __BMC_TYPE_H__
- #include <stdint.h>
- #include <unistd.h>
- #include <pthread.h>
- #include "Session.h"
- #include "com_IPMI_ChassisDevice.h"
- #include "PMConfig.h"
- #include "SensorMonitor.h"
- #include "com_BmcType.h"
- #include "MsgHndlr.h"
- #pragma pack(1)
- /***************************************** IPMI ******************************************************/
- typedef struct
- {
- pthread_key_t CurSessionID;
- pthread_key_t CurPrivLevel;
- pthread_key_t CurChannel;
- pthread_key_t CurKCSIfcNum;
- pthread_key_t CurSessionType;
- pthread_key_t OwnerLUN;
- }TLS_T;
- typedef enum
- {
- ORIGIN_UNSPECIFIED = 0,
- ORIGIN_SENDMSG,
- ORIGIN_CMDFWD,
- ORIGIN_INT_REQ,
- ORIGIN_NM,
- }BridgeOrigin;
- typedef struct
- {
- char FirstPowerOnStr[32]; //first power on the bmc
- uint8_t SendMsgTimeout;
- uint8_t SessionTimeOut;
- uint32_t ChassisTimerInterval;
-
- uint8_t SerialIfcSupport ;
- uint8_t SerialTerminalSupport;
- uint8_t LANIfcSupport ;
- uint8_t SYSIfcSupport;
- uint8_t GrpExtnSupport ;
- uint8_t UDSIfcSupport;
- uint32_t FanControlInterval;
- //IPMB
- uint8_t PrimaryIPMBSupport ;
- uint8_t SecondaryIPMBSupport ;
- uint32_t PrimaryIPMBBus;
- uint32_t SecondaryIPMBBus;
- uint8_t PrimaryIPMBAddr; //8bit
- uint8_t SecondaryIPMBAddr; //8bit
- //chassis config
- uint8_t SysRestartCause;
- uint8_t PowerRestorePolicy;
- ChassisPowerState_T ChassisPowerState;
- ChassisCapabilities_T ChassisCapabilities;
- uint8_t PowerCycleInterval;
- uint8_t SysPartitionScan;
-
- uint8_t RearmSetSensorThreshold;
- int16_t SELTimeUTCOffset;
-
- uint8_t MaxSession;
- uint32_t LogOutTimeout;
- } IPMIConfig_T;
- typedef struct
- {
- IPMIConfig_T IpmiConfig;
- OemFRUData_T FRU;
- uint8_t* pSDR;
- uint8_t* pSEL;
- //time
- uint32_t CurTimerTick; //uint: 1ms
- uint32_t CurTimerSecond;
- uint32_t BootValidMinutes; //This work time
- uint32_t TotalBootValidMinutes; //Total work time
- // uint32_t SELTimeSecond; //seconds from 1970-1-1 00:00:00, UTC
-
- //chassis
- uint8_t SlotID;
- uint8_t ChassisID;
- uint8_t PowerGoodFlag;
- uint8_t FirstPowerOn;
- uint8_t SelfTestByte;
- uint8_t ChassisIdentifyForce;
- uint8_t ChassisIdentifyTimeout;
- uint8_t ChassisIdentify;
- uint8_t HealthLevel;
-
- SensorSharedMem_T SensorSharedMem;
- SENSOR_T SenConfig;
-
- //message handler
- uint8_t SendMsgSeqNum;
-
- SDR_T SDRConfig;
- SEL_T SELConfig;
-
- uint8_t DeviceGUID[16];
- // OEM_FLAGS_T OemFlags;
-
- // SessionInfo_T LanSession;
- uint8_t SessionHandle;
- SessionTblInfo_T SessionTblInfo;
- uint8_t UDSSessionHandle;
- UDSSessionTblInfo_T UDSSessionTblInfo;
- uint8_t TimerTaskTblSize;
- TimerTaskTbl_T TimerTaskTbl[20];
- //bool loginOk;
- //uint32_t logOutCnt;
- UserInfo_T UserInfoTbl[MAX_USER_NUM];
- UserInfo_T *pUserInfo;
- uint8_t CurrentNoUser;
-
-
- uint8_t FwMajorVer;
- uint8_t FwMinorVer;
- //global_flags
- uint8_t BladeManageEn;
- uint8_t isChMC;
- uint8_t IndexInChassis; //刀片插在机箱里的第几个槽,index从0开始。
- } BMCInfo_t;
- #pragma pack()
- #endif /* __BMC_TYPE_H__ */
|