123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- /****************************************************************
- ****************************************************************
- ** **
- ** (C)Copyright 2008, American Megatrends Inc. **
- ** **
- ** All Rights Reserved. **
- ** **
- ** 6145-F, Northbelt Parkway, Norcross, **
- ** **
- ** Georgia - 30071, USA. Phone-(770)-246-8600. **
- ** **
- ****************************************************************
- *
- * OemCmdhndlr.c
- * Oem Commands used by SMM Channel
- *
- * Author: Anurag Bhatia <anuragb@ami.com>
- * Vinesh Chirstopher <vineshc@ami.com>
- *
- *****************************************************************/
- #define ENABLE_DEBUG_MACROS 0
- #include "Types.h"
- //#include "Debug.h"
- //#include "OemSMMCmds.h"
- //#include "MsgHndlr.h"
- #include "IPMIDefs.h"
- //#include "flashlib.h"
- //#include "PDKEEPROM.h"
- //#include "NVRAccess.h"
- //#include "ubenv.h"
- //#include "IPMIConf.h"
- //#include "gpioifc.h"
- //#include <time.h>
- //#include <linux/ioport.h>
- //#include "libpwmtach.h"
- //#include "hal_hw.h"
- //return BMC version
- int SMMExample_1(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- // char versionStr[]="v1.00 2019-01-16";
- // printf("==== Version: %s ====\n", versionStr);
-
- *pRes= CC_NORMAL;
- *(pRes+1) = 0x20;
- *(pRes+2) = 0x19;
- *(pRes+3) = 0x03;
- *(pRes+4) = 0x21;
- // memcpy(pRes+1,versionStr,sizeof(versionStr));
- return 5;
- }
- //netfn 0x2e
- //cmd 0x02
- //get MARK, slotID
- int SMMExample_2(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
- int SMMExample_3(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return sizeof (*pRes);
- }
- //netfn 0x2e
- //cmd 0x04
- //get MARK, slotID
- int SMMExample_4(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
- //netfn 0x2e
- //cmd 0x02
- //get MARK, slotID
- int SMMExample_5(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
- //netfn 0x2e
- //cmd 0x02
- //get MARK, slotID
- int SMMExample_6(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
- //netfn 0x2e
- //cmd 0x02
- //get MARK, slotID
- int SMMExample_7(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
- //netfn 0x2e
- //cmd 0x02
- //get MARK, slotID
- int SMMExample_8(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
- //netfn 0x2e
- //cmd 0x02
- //get MARK, slotID
- int SMMExample_9(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
- {
- *pRes= CC_NORMAL;
- return 1;
- }
|