Sciclient as a software block has multiple functional sub-blocks inside it, as shown in the below image:
Sciclient Sub-blocks
More details on the APIs provided on these layers can be found in the API section, linked towards the end of this page.
Generally speaking, the Sciclient driver provides API to communicate with the SYSFW using the TISCI protocol. As mentioned above, this would be for system level tasks like resource allocation, peripheral power on/off, peripheral clock setting, secure services and so on. The sciclient will be part of the application code running on each core.
Typical Sciclient Operation
The above image shows the operation for only one core, but the same thing happens for all the cores. SYSFW deals with all the requests coming from each of the cores.
Sciclient is mostly used by other drivers, like DMA, GPIO etc. Sciclient acts as an interface to the SYSFW for these drivers when they need say a resource like DMA channel, or configure an interrupt route. Below are the high level features supported by the driver:
Features Supported
- Abstracted APIs for Power and Resource Management
- APIs for Processor Boot including secure boot
- APIs for configuring firewalls
- Ability to change and re-build the board configuration data
- Ability to sign the board configuration blobs for HS devices
SysConfig Features
- Note
- It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
- There are no user programmable features for Sciclient SysConfig. However, adding any module makes the PowerClock_init() initialize the module power and clock. This is indirectly done using Sciclient APIs.
Features NOT Supported
NA
Important Usage Guidelines
- Sciclient is mostly used by other peripheral drivers, and mostly not directly by an application. From an application point of view, major usage of Sciclient APIs would be to power on/off a module, set/get the clock of a module, etc.
Board Configuration Overview
SYSFW Board Config files in the sciclient driver is a SOC specific configuration data regarding the various system attributes controlled by the SYSFW. These include resources, power and clock, security etc. This configuration is sent to SYSFW during boot time. The default configuration is stored in source/drivers/sciclient/sciclient_defaultBoardCfg/am62px/
- Default Boardcfg - sciclient_defaultBoardcfg.c
- Resource Management BoardCfg - sciclient_defaultBoardCfg_rm.c
- Power Management BoardCfg - sciclient_defaultBoardCfg_pm.c
- Security BoardCfg - sciclient_defaultBoardCfg_security.c
The user can change the board configuration data based on their requirement and rebuild the board configuration by following the steps in SYSFW Board Config Generation.
Refer SYSFW board config documentation
Enforcing Processor Access Control List
- The Access Control List(ACL) for a processor can be set using the Security Boardcfg data. There can be one primary host and three secondary hosts that can control a processor.
- For example, set the WKUP-R5 core as primary host and A53 core as secondary host for ACL of MCU-R5 processor in the
source/drivers/sciclient/sciclient_defaultBoardCfg/am62px/sciclient_defaultBoardCfg_security.c
file.
.proc_acl_entries = {
{
.processor_id = SCICLIENT_PROC_ID_MCU_R5FSS0_CORE0,
.proc_access_master = TISCI_HOST_ID_WKUP_0_R5_0,
.proc_access_secondary = {TISCI_HOST_ID_A53_0, TISCI_HOST_ID_TIFS, TISCI_HOST_ID_TIFS},
},
/* set the remaining entries to zero */
{
0,
},
.
.
.
{
0,
},
},
Example Usage
Include the below file to access the APIs
Module Power ON Example
uint32_t moduleState, resetState, contextLossState;
&moduleState,
&resetState,
&contextLossState,
{
0x0U,
}
uint32_t gpioIntrNumber = CSLR_R5FSS0_CORE0_INTR_MAIN_GPIOMUX_INTROUTER0_OUTP_8;
uint32_t gpioIntrRtrInputGpio1_Base = 90;
uint32_t gpioPushButtonPinNum = 54;
rmIrqReq.valid_params = 0U;
rmIrqReq.global_event = 0U;
rmIrqReq.dst_id = TISCI_DEV_R5FSS0_CORE0;
rmIrqReq.dst_host_irq = gpioIntrNumber;
rmIrqReq.ia_id = 0U;
rmIrqReq.vint = 0U;
rmIrqReq.vint_status_bit_index = 0U;
{
DebugP_log(
"[Error] Sciclient event config failed!!!\r\n");
}
API
APIs for SCI Client or SYSFW