OemCmds.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /****************************************************************
  2. ****************************************************************
  3. ** **
  4. ** (C)Copyright 2008, American Megatrends Inc. **
  5. ** **
  6. ** All Rights Reserved. **
  7. ** **
  8. ** 6145-F, Northbelt Parkway, Norcross, **
  9. ** **
  10. ** Georgia - 30071, USA. Phone-(770)-246-8600. **
  11. ** **
  12. ****************************************************************
  13. *
  14. * OemCmdhndlr.c
  15. * Oem Commands used by SMM Channel
  16. *
  17. * Author: Anurag Bhatia <anuragb@ami.com>
  18. * Vinesh Chirstopher <vineshc@ami.com>
  19. *
  20. *****************************************************************/
  21. #define ENABLE_DEBUG_MACROS 0
  22. #include "Types.h"
  23. //#include "Debug.h"
  24. //#include "OemSMMCmds.h"
  25. //#include "MsgHndlr.h"
  26. #include "IPMIDefs.h"
  27. //#include "flashlib.h"
  28. //#include "PDKEEPROM.h"
  29. //#include "NVRAccess.h"
  30. //#include "ubenv.h"
  31. //#include "IPMIConf.h"
  32. //#include "gpioifc.h"
  33. //#include <time.h>
  34. //#include <linux/ioport.h>
  35. //#include "libpwmtach.h"
  36. //#include "hal_hw.h"
  37. //return BMC version
  38. int SMMExample_1(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  39. {
  40. // char versionStr[]="v1.00 2019-01-16";
  41. // printf("==== Version: %s ====\n", versionStr);
  42. *pRes= CC_NORMAL;
  43. *(pRes+1) = 0x20;
  44. *(pRes+2) = 0x19;
  45. *(pRes+3) = 0x03;
  46. *(pRes+4) = 0x21;
  47. // memcpy(pRes+1,versionStr,sizeof(versionStr));
  48. return 5;
  49. }
  50. //netfn 0x2e
  51. //cmd 0x02
  52. //get MARK, slotID
  53. int SMMExample_2(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  54. {
  55. *pRes= CC_NORMAL;
  56. return 1;
  57. }
  58. int SMMExample_3(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  59. {
  60. *pRes= CC_NORMAL;
  61. return sizeof (*pRes);
  62. }
  63. //netfn 0x2e
  64. //cmd 0x04
  65. //get MARK, slotID
  66. int SMMExample_4(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  67. {
  68. *pRes= CC_NORMAL;
  69. return 1;
  70. }
  71. //netfn 0x2e
  72. //cmd 0x02
  73. //get MARK, slotID
  74. int SMMExample_5(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  75. {
  76. *pRes= CC_NORMAL;
  77. return 1;
  78. }
  79. //netfn 0x2e
  80. //cmd 0x02
  81. //get MARK, slotID
  82. int SMMExample_6(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  83. {
  84. *pRes= CC_NORMAL;
  85. return 1;
  86. }
  87. //netfn 0x2e
  88. //cmd 0x02
  89. //get MARK, slotID
  90. int SMMExample_7(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  91. {
  92. *pRes= CC_NORMAL;
  93. return 1;
  94. }
  95. //netfn 0x2e
  96. //cmd 0x02
  97. //get MARK, slotID
  98. int SMMExample_8(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  99. {
  100. *pRes= CC_NORMAL;
  101. return 1;
  102. }
  103. //netfn 0x2e
  104. //cmd 0x02
  105. //get MARK, slotID
  106. int SMMExample_9(_NEAR_ INT8U* pReq, INT8U ReqLen, _NEAR_ INT8U* pRes)
  107. {
  108. *pRes= CC_NORMAL;
  109. return 1;
  110. }