mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
firmware: add remote status update client support
Extend Intel Stratix10 service layer to support the second service layer client, Remote Status Update (RSU). RSU is used to provide our customers with protection against loading bad bitstreams onto their devices when those devices are booting from flash. Signed-off-by: Richard Gong <richard.gong@intel.com> Signed-off-by: Alan Tull <atull@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0d5c06aa0e
commit
6b50d882d3
3 changed files with 98 additions and 4 deletions
|
@ -10,8 +10,10 @@
|
|||
* Service layer driver supports client names
|
||||
*
|
||||
* fpga: for FPGA configuration
|
||||
* rsu: for remote status update
|
||||
*/
|
||||
#define SVC_CLIENT_FPGA "fpga"
|
||||
#define SVC_CLIENT_RSU "rsu"
|
||||
|
||||
/**
|
||||
* Status of the sent command, in bit number
|
||||
|
@ -36,6 +38,9 @@
|
|||
*
|
||||
* SVC_COMMAND_STATUS_RECONFIG_ERROR:
|
||||
* Error encountered during FPGA configuration.
|
||||
*
|
||||
* SVC_STATUS_RSU_OK:
|
||||
* Secure firmware accepts the request of remote status update (RSU).
|
||||
*/
|
||||
#define SVC_STATUS_RECONFIG_REQUEST_OK 0
|
||||
#define SVC_STATUS_RECONFIG_BUFFER_SUBMITTED 1
|
||||
|
@ -43,7 +48,8 @@
|
|||
#define SVC_STATUS_RECONFIG_COMPLETED 3
|
||||
#define SVC_STATUS_RECONFIG_BUSY 4
|
||||
#define SVC_STATUS_RECONFIG_ERROR 5
|
||||
|
||||
#define SVC_STATUS_RSU_OK 6
|
||||
#define SVC_STATUS_RSU_ERROR 7
|
||||
/**
|
||||
* Flag bit for COMMAND_RECONFIG
|
||||
*
|
||||
|
@ -56,9 +62,11 @@
|
|||
/**
|
||||
* Timeout settings for service clients:
|
||||
* timeout value used in Stratix10 FPGA manager driver.
|
||||
* timeout value used in RSU driver
|
||||
*/
|
||||
#define SVC_RECONFIG_REQUEST_TIMEOUT_MS 100
|
||||
#define SVC_RECONFIG_BUFFER_TIMEOUT_MS 240
|
||||
#define SVC_RSU_REQUEST_TIMEOUT_MS 300
|
||||
|
||||
struct stratix10_svc_chan;
|
||||
|
||||
|
@ -81,13 +89,21 @@ struct stratix10_svc_chan;
|
|||
* @COMMAND_RECONFIG_STATUS: check the status of the configuration, return
|
||||
* status is SVC_STATUS_RECONFIG_COMPLETED, or SVC_STATUS_RECONFIG_BUSY, or
|
||||
* SVC_STATUS_RECONFIG_ERROR
|
||||
*
|
||||
* @COMMAND_RSU_STATUS: request remote system update boot log, return status
|
||||
* is log data or SVC_STATUS_RSU_ERROR
|
||||
*
|
||||
* @COMMAND_RSU_UPDATE: set the offset of the bitstream to boot after reboot,
|
||||
* return status is SVC_STATUS_RSU_OK or SVC_STATUS_RSU_ERROR
|
||||
*/
|
||||
enum stratix10_svc_command_code {
|
||||
COMMAND_NOOP = 0,
|
||||
COMMAND_RECONFIG,
|
||||
COMMAND_RECONFIG_DATA_SUBMIT,
|
||||
COMMAND_RECONFIG_DATA_CLAIM,
|
||||
COMMAND_RECONFIG_STATUS
|
||||
COMMAND_RECONFIG_STATUS,
|
||||
COMMAND_RSU_STATUS,
|
||||
COMMAND_RSU_UPDATE
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue