Mailbox Client Intel® FPGA IP User Guide

ID 683290
Date 8/01/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

1.10.2.6. RSU Client API

Table 59.  rsu_client_get_slot_count
Prototype: rsu_client_get_slot_count(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Get the number of predefined slots and display the number of slots.
Table 60.  rsu_client_get_slot_by_name
Prototype: rsu_client_get_slot_by_name (char *name)
Parameters:
  • name - name of slot
Return: Return 0 for success, or otherwise return error code 18.
Description: Get slot number based on name and display it.
Table 61.  rsu_client_list_slot_attribute
Prototype: rsu_client_list_slot_attribute(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: List the attribute info from the selected slot. The attributes are image name, offset, size and priority level.
Table 62.  rsu_client_get_slot_size
Prototype: rsu_client_get_slot_size(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Get the size for a selected slot and display slot size in bytes.
Table 63.  rsu_client_get_priority
Prototype: rsu_client_get_priority(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Get the priority for a selected slot and display the priority of the selected slot.
Table 64.  rsu_client_slot_enable
Prototype: rsu_client_slot_enable(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Set the selected slot as the highest priority.
Table 65.  rsu_client_slot_disable
Prototype: rsu_client_slot_disable(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Disable selected slot but not erase it.
Table 66.  rsu_client_request_slot_be_loaded
Prototype: rsu_client_request_slot_be_loaded (int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Request the selected slot be loaded.
Table 67.  rsu_client_erase_image
Prototype: rsu_client_erase_image(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Erase the application image from a selected slot.
Table 68.  rsu_client_request_factory_be_loaded
Prototype: rsu_client_request_factory_be_loaded(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Request the factory image be loaded.
Table 69.  rsu_client_add_image
Prototype: rsu_client_add_image (int slot_num, void *buf, int size)
Parameters:
  • slot_num - the selected slot
  • buf - pointer to data buffer
  • size - bytes to read from buffer
Return: Return 0 for success, or otherwise return -1 on error.
Description: Add a new image to the selected slot and make it the highest priority. The slot must be erased first.
Table 70.  rsu_client_verify_data
Prototype: rsu_client_verify_data(int slot_num, void *buf, int size)
Parameters:
  • slot_num - the selected slot
  • buf - pointer to data buffer
  • size - bytes to read from buffer
Return: Return 0 for success, or otherwise return -1 on error.
Description: Verify the Intel FPGA bitstream in the selected slot.
Table 71.  rsu_client_copy_to_buf
Prototype: rsu_client_copy_to_buf(int slot_num, alt_u64 address)
Parameters:
  • slot_num - the selected slot
  • address - the address which saves data
Return: Return 0 for success, or otherwise return -1 on error.
Description: Read the data from a slot then write to an address.
Table 72.  rsu_client_status_log
Prototype: rsu_client_status_log(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Print the status log.
Table 73.  rsu_client_clear_error_status
Prototype: rsu_client_clear_error_status(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Clear errors from the current RSU status.
Table 74.  rsu_client_display_dcmf_version
Prototype: rsu_client_display_dcmf_version(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Display the four decision firmware versions.
Table 75.  rsu_client_display_dcmf_status
Prototype: rsu_client_display_dcmf_status(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Display the status for four decision firmware.
Table 76.  rsu_client_display_max_retry
Prototype: rsu_client_display_max_retry(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Display the max retry parameter
Table 77.  rsu_client_slot_create
Prototype: rsu_client_slot_create(char *slot_name, alt_u64 slot_address, unsigned int slot_size)
Parameters:
  • slot_name - the selected slot
  • slot_address - start address of slot
  • size - size of slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Create a new slot in the SPT, using unused space.
Table 78.  rsu_client_slot_rename
Prototype: rsu_client_slot_rename (int slot, char *name)
Parameters: -
Return: Return 0 for success, or otherwise return error code18.
Description: Rename the selected slot and display it.
Table 79.  rsu_client_slot_delete
Prototype: rsu_client_slot_delete(int slot_num)
Parameters:
  • slot_num - the selected slot
Return: Return 0 for success, or otherwise return -1 on error.
Description: Delete selected slot, freeing up allocated space.
Table 80.  rsu_client_restore_spt
Prototype: rsu_client_restore_spt (alt_u64 address)
Parameters:
  • address - the address which restores SPT
Return: Return 0 for success, or otherwise return -1 on error.
Description: Restore the SPT from an address.
Table 81.  rsu_client_save_spt
Prototype: rsu_client_save_spt (alt_u64 address)
Parameters:
  • address - the address which saves SPT
Return: Return 0 for success, or otherwise return -1 on error.
Description: Save the working SPT to an address.
Table 82.  rsu_client_create_empty_cpb
Prototype: rsu_client_create_empty_cpb(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Create an empty CPB, which includes the CPB header only. All entries are marked as unused.
Table 83.  rsu_client_restore_cpb
Prototype: rsu_client_restore_cpb (alt_u64 address)
Parameters:
  • address - the address which restores CPB
Return: Return 0 for success, or otherwise return -1 on error.
Description: Restore the CPB from an address.
Table 84.  rsu_client_save_cpb
Prototype: rsu_client_save_cpb(alt_u64 address)
Parameters:
  • address - the address which saves CPB
Return: Return 0 for success, or otherwise return -1 on error.
Description: Save the working CPB to an address.
Table 85.  rsu_client_check_running_factory
Prototype: rsu_client_check_running_factory(void)
Parameters: -
Return: Return 0 for success, or otherwise return -1 on error.
Description: Check if currently running image is the factory image.
18 Refer to Error Codes for more information.