-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ipmi command to configure clock switch and save it in eeprom
- Loading branch information
1 parent
0b6193a
commit fe352ad
Showing
19 changed files
with
288 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "clock_config.h" | ||
|
||
uint8_t clock_config[16]; | ||
|
||
/* | ||
* Function to configure the clock switch via ipmi. | ||
* The configuration is sent as an array in the data field. | ||
* | ||
*/ | ||
IPMI_HANDLER(ipmi_custom_cmd_write_clock_config, NETFN_CUSTOM, IPMI_CUSTOM_CMD_WRITE_CLOCK_CONFIG, ipmi_msg *req, ipmi_msg *rsp) | ||
{ | ||
memcpy(clock_config, req->data, req->data_len); | ||
payload_send_message(FRU_AMC, PAYLOAD_MESSAGE_CLOCK_CONFIG); | ||
rsp->completion_code = IPMI_CC_OK; | ||
} | ||
|
||
|
||
/* | ||
* Function to read the clock switch configuration via ipmi. | ||
*/ | ||
IPMI_HANDLER(ipmi_custom_cmd_read_clock_config, NETFN_CUSTOM, IPMI_CUSTOM_CMD_READ_CLOCK_CONFIG, ipmi_msg *req, ipmi_msg *rsp) | ||
{ | ||
rsp->data_len = 16; | ||
memcpy(rsp->data, clock_config, rsp->data_len); | ||
rsp->completion_code = IPMI_CC_OK; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include "ipmi.h" | ||
#include "fru.h" | ||
#include "payload.h" | ||
|
||
extern uint8_t clock_config[16]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.