d8192f9b5fe1b070101553f9c8a536e007f87333
1 /*
2 * Copyright (c) 2018-2020, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
33 /**
34 * \defgroup DRV_SCICLIENT_MODULE SCIClient Driver
35 *
36 * @{
37 *
38 * System Controller Interface (SCI) Client
39 *
40 * \par IMPORTANT NOTE
41 * <b> The interfaces defined in this package are bound to change.
42 * Release notes/user guide list the additional limitation/restriction
43 * of this module/interfaces. </b> \n
44 * <b> Refer to top level user guide for detailed features,
45 * limitations and usage description.
46 * </b>
47 *
48 * ## Introduction to SCICLIENT
49 * The SCIClient is an interface to the TI-SCI protocol for RTOS and non-OS
50 * based applications. It exposes the core message details, valid module/clock
51 * IDs to the higher level software and abstracts the communication with the
52 * firmware based on the TI-SCI protocol. These APIs can be called by power,
53 * resource and security RTOS drivers or any other non-OS or RTOS based higher
54 * level software to be able to communicate with DMSC for its services. The
55 * higher level software is expected to populate the necessary message core
56 * parameters. The SCIClient would wrap the core message with the necessary
57 * protocol header and forward this to the DMSC. The SCIClient relies on the
58 * CSL-FL layer to program and interact with the Secure Proxy Threads. The
59 * SCIClient's goal is to ensure there is no duplication of the interface to
60 * the DMSC from different software components which need to interact with
61 * the DMSC or other System Control Entities in future devices.
62 * The Sciclient contains
63 * - \ref SCICLIENT_HAL
64 * - \ref SCICLIENT_FMW_PM_IF
65 * - \ref SCICLIENT_FMW_RM_IF
66 * - \ref SCICLIENT_FMW_PROCBOOT_IF
67 * - \ref SCICLIENT_ROM_HAL
68 *
69 * ## Introduction to DMSC
70 * Traditional Texas Instruments SoCs have implemented system control
71 * functions such as power management within operating systems on each of
72 * the processing units (ARM/DSP). However, such a traditional approach
73 * has had tremendous challenges to ensure system stability. Few of the
74 * challenges faced include:
75 *
76 * - Complex interactions between Operating Systems on heterogeneous SoCs for
77 * generic features.
78 * - Lack of centralized knowledge of system state.
79 * - Consistency in SoC feature entitlement in all OSes for the SoC for
80 * complex SoC features and system quirks.
81 *
82 * Device Management and Security control (DMSC) attempts to resolve
83 * these issues by being a consistent component of Keystone 3 SoC
84 * architecture performing the role of a centralized SoC power, security
85 * and device management controller.
86 *
87 * In effect, this is a microcontroller and runs a safety and security
88 * certified firmware that provides services to the rest of the
89 * OSes/Software running on various other processors on the SoC.
90 *
91 * ### DMSC Power Management
92 * DMSC controls the power management of the device, hence is responsible for
93 * bringing the device out of reset, enforce clock and reset rules. DMSC power
94 * management functions are critical to bring device to low power modes, for
95 * example DeepSleep, and sense wake-up events to bring device back online to
96 * active state.
97 *
98 * ### DMSC Security Management
99 * The DMSC firmware Security Management manages SoC central security
100 * resources. The security subsystem provides APIs to other software entities to
101 * avail these features in a controlled and secure way.
102 * The security management firmware is subdivided into modules listed below:
103 * - Firewall management
104 * - ISC management
105 * - Boot authentication
106 * - SA2UL context management (for encryption and authentication)
107 * - Crypto APIs (to access common SA2UL functions such as PKA, RNG)
108 * - Secure keys management
109 * - Secure debug
110 *
111 * ### DMSC Resource Management
112 * The DMSC firmware Resource Management (RM) (sub) system manages SoC shared
113 * resources. RM manages access and configuration of shared resources amongst
114 * SoC processing entities. RM provides a set of interfaces over which SoC
115 * processing entities can allocate and free access to shared resources.
116 *
117 * The resource management firmware is subdivided into modules listed below:
118 * - Core database
119 * - IRQ management
120 * - Ring accelerator management
121 * - UDMA-P management
122 * - PSI-L management
123 * - Non-secure proxy management
124 *
125 * ### Communication with DMSC
126 * DMSC is a "black box" with respect to the other processing
127 * entities (ARM/DSP) on the SoC. Communication with DMSC occurs over
128 * a messaging protocol called the Texas Instruments System Control
129 * Interface (TI-SCI). TI-SCI is a predefined request-response protocol
130 * that provides access to the various services provided by DMSC.
131 *
132 * The actual messaging hardware block varies depending on SoC, but
133 * typical examples include "Proxy over message manager" and
134 * "Secure Proxy over Ring Accellerator". These communication
135 * mechanisms are standardized and secured by DMSC firmware prior to
136 * operation.
137 *
138 * The request/response format is described overall as in Figure 2 . The
139 * message type describes the service to be performed and is operated
140 * on depending on few attributes including privileges allowed and
141 * operational state of the SoC.
142 *
143 * |Type | Byte Index| Data Type| Header
144 * |:----|:---------:|:--------:|:------
145 * |TISCI Header| [0:1]| U16| Message_type
146 * || [2]| U8| Host
147 * || [3]| U8| Sequence_id
148 * || [4:7]| U32| Flags
149 * |Payload | Depends on type of message||Payload Fields|
150 */
151 /* @} */
153 /**
154 * \ingroup DRV_SCICLIENT_MODULE
155 * \defgroup SCICLIENT_HAL System Controller Interface (SCI) Client HAL
156 *
157 * The SCIClient has two major functions:
158 * - Interact with DMSC ROM and load the DMSC Firmware.
159 * - Pass on service requests from higher level software to the DMSC firmware
160 * and forward the response from DMSC firmware to the higher level software.
161 *
162 * The #Sciclient_loadFirmware API is used to cater to the first requirement
163 * and the #Sciclient_service is used to cater to the second. The SCIClient
164 * library requires initialization of the a handle which is used by the
165 * subsequent API calls. This handle is initialized by the #Sciclient_init
166 * function. Once the application/higher level software is being torn down or
167 * exiting the #Sciclient_deinit can be used to de-initialize this handle.
168 *
169 * The SCIClient can operate in the following combinations:
170 *
171 * 1. Non-OS, Polling based message completion.
172 * 2. Non-OS, Interrupt Based message completion.
173 * 3. RTOS, Polling based message completion.
174 * 4. RTOS, Interrupt based message completion.
175 *
176 * The SCIClient depends on the OSAL layer to differentiate between the
177 * Non-OS and the RTOS implementation of Semaphores and Interrupts (HWIs).
178 * The build parameter of the OSAL library would determine if the application
179 * is bare metal or RTOS based. The polling versus interrupt based wait for
180 * message completion is a run time configuration passed during the
181 * #Sciclient_init initialization.
182 *
183 * All the APIs for interacting with the firmware are blocking with a
184 * specified timeout . A common API #Sciclient_service is implemented for
185 * all types of calls to the firmware which takes 2 arguments :
186 * - #Sciclient_ReqPrm_t
187 * - #Sciclient_RespPrm_t
188 *
189 * The API serves a particular request, based on the value of messageType
190 * parameter in #Sciclient_ReqPrm_t, whose response is given to the higher
191 * level API through #Sciclient_RespPrm_t. The #Sciclient_ReqPrm_t contains
192 * the required inputs from the higher level software corresponding to the
193 * message_type, timeout value and the core message as a byte stream.
194 * A pointer #Sciclient_RespPrm_t has to be passed to the sciclient, which
195 * shall be modified by sciclient.
196 *
197 * The Sciclient shall be responsible for abstracting all interaction with the
198 * secure proxy and the ring accelerator.
199 *
200 * @{
201 */
203 /**
204 * \file sciclient.h
205 *
206 * \brief This file contains prototypes for APIs contained
207 * as a part of SCICLIENT as well as the structures
208 * of their arguments.
209 */
211 #ifndef SCICLIENT_H_
212 #define SCICLIENT_H_
214 /* ========================================================================== */
215 /* Include Files */
216 /* ========================================================================== */
218 #include <stdint.h>
219 #include <stddef.h>
221 /* Windows Visual Studio build doesn't __attribute__ indentifier, so forcing it be to dummy for getting build working */
222 #ifdef _MSC_VER
223 #ifndef __attribute__
224 #define __attribute__()
225 #endif
226 #endif
228 /* TISCI Include */
229 #define TISCI_BIT(n) (1UL << (n))
231 /**
232 * \brief Defines the sysfw DEVGRP type. This is meant to be used in code
233 * or data structures that require distinction of devgrps.
234 */
235 typedef uint8_t devgrp_t;
237 /**
238 * \brief Defines the sysfw DOMGRP type. This is meant to be used in code
239 * or data structures that require distinction of domgrps.
240 */
241 typedef uint8_t domgrp_t;
243 /* External definitions */
245 /**
246 * SoC SYSFW devgrp any: NOT TO BE used for SoC data.
247 * This implies that specific sequenced devgrp is NOT used
248 */
249 #define DEVGRP_ALL (0x00U)
251 /** SoC defined SYSFW devgrp 00 */
252 #define DEVGRP_00 ((0x01U) << 0U)
253 /** SoC defined SYSFW devgrp 01 */
254 #define DEVGRP_01 ((0x01U) << 1U)
255 /** SoC defined SYSFW devgrp 02 */
256 #define DEVGRP_02 ((0x01U) << 2U)
257 /** SoC defined SYSFW devgrp 03 */
258 #define DEVGRP_03 ((0x01U) << 3U)
259 /** SoC defined SYSFW devgrp 04 */
260 #define DEVGRP_04 ((0x01U) << 4U)
261 /** SoC defined SYSFW devgrp 05 */
262 #define DEVGRP_05 ((0x01U) << 5U)
263 /** SoC defined SYSFW devgrp 06 */
264 #define DEVGRP_06 ((0x01U) << 6U)
266 /** SYSFW internal usage ONLY */
268 /** Module belonging solely to DMSC operations */
269 #define DEVGRP_DMSC ((0x01U) << 7U)
270 /** Match everything - STRICTLY INTERNAL USAGE ONLY */
271 #define DEVGRP_DMSC_ALL (0xFFU)
273 /**
274 * Maximum number of devgrps that are supported by SYSFW.
275 * Derived from the above definitions
276 */
277 #define MAX_NUM_DEVGRPS (8U)
279 #include <ti/drv/sciclient/soc/sysfw/include/tisci/tisci_protocol.h>
280 #include <ti/drv/sciclient/soc/sysfw/include/tisci/tisci_boardcfg_macros.h>
281 #include <ti/drv/sciclient/soc/sysfw/include/tisci/tisci_boardcfg.h>
282 #include <ti/drv/sciclient/soc/sysfw/include/tisci/tisci_boardcfg_rm.h>
283 #include <ti/drv/sciclient/soc/sysfw/include/tisci/tisci_core.h>
284 #if defined (SOC_AM65XX)
285 #include <ti/drv/sciclient/soc/sysfw/include/am65x/tisci_resasg_types.h>
286 #include <ti/drv/sciclient/soc/sysfw/include/am65x/tisci_hosts.h>
287 #include <ti/drv/sciclient/soc/sysfw/include/am65x/tisci_sec_proxy.h>
288 #include <ti/drv/sciclient/soc/sysfw/include/am65x/tisci_boardcfg_constraints.h>
289 #include <ti/drv/sciclient/soc/sysfw/include/am65x/tisci_clocks.h>
290 #include <ti/drv/sciclient/soc/sysfw/include/am65x_sr2/tisci_clocks.h>
291 #endif
292 #if defined (SOC_J721E)
293 #include <ti/drv/sciclient/soc/sysfw/include/j721e/tisci_resasg_types.h>
294 #include <ti/drv/sciclient/soc/sysfw/include/j721e/tisci_hosts.h>
295 #include <ti/drv/sciclient/soc/sysfw/include/j721e/tisci_sec_proxy.h>
296 #include <ti/drv/sciclient/soc/sysfw/include/j721e/tisci_boardcfg_constraints.h>
297 #endif
298 #if defined (SOC_J7200)
299 #include <ti/drv/sciclient/soc/sysfw/include/j7200/tisci_resasg_types.h>
300 #include <ti/drv/sciclient/soc/sysfw/include/j7200/tisci_hosts.h>
301 #include <ti/drv/sciclient/soc/sysfw/include/j7200/tisci_sec_proxy.h>
302 #include <ti/drv/sciclient/soc/sysfw/include/j7200/tisci_boardcfg_constraints.h>
303 #endif
304 #if defined (SOC_AM64X)
305 #include <ti/drv/sciclient/soc/sysfw/include/am64x/tisci_resasg_types.h>
306 #include <ti/drv/sciclient/soc/sysfw/include/am64x/tisci_hosts.h>
307 #include <ti/drv/sciclient/soc/sysfw/include/am64x/tisci_sec_proxy.h>
308 #include <ti/drv/sciclient/soc/sysfw/include/am64x/tisci_boardcfg_constraints.h>
309 #endif
310 #include <ti/drv/sciclient/soc/sysfw/include/tisci/security/tisci_sec_macros.h>
311 #include <ti/drv/sciclient/soc/sysfw/include/tisci/security/tisci_firewall.h>
312 #include <ti/drv/sciclient/soc/sysfw/include/tisci/security/tisci_procboot.h>
313 #include <ti/drv/sciclient/soc/sysfw/include/tisci/security/tisci_keystore.h>
314 #include <ti/drv/sciclient/soc/sysfw/include/tisci/security/tisci_dkek.h>
315 #include <ti/drv/sciclient/soc/sysfw/include/tisci/pm/tisci_pm_clock.h>
316 #include <ti/drv/sciclient/soc/sysfw/include/tisci/pm/tisci_pm_device.h>
317 #include <ti/drv/sciclient/soc/sysfw/include/tisci/pm/tisci_pm_core.h>
318 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_ra.h>
319 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_irq.h>
320 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_udmap.h>
321 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_psil.h>
322 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_shared.h>
323 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_core.h>
324 #include <ti/drv/sciclient/soc/sysfw/include/tisci/rm/tisci_rm_proxy.h>
325 #include <ti/drv/sciclient/include/sciclient_soc.h>
326 #include <ti/drv/sciclient/include/sciclient_pm.h>
327 #include <ti/drv/sciclient/include/sciclient_rm.h>
328 #include <ti/drv/sciclient/include/sciclient_firewall.h>
329 #include <ti/drv/sciclient/include/sciclient_dkek.h>
330 #include <ti/drv/sciclient/include/sciclient_genericMsgs.h>
331 #include <ti/drv/sciclient/include/sciclient_procboot.h>
332 #include <ti/drv/sciclient/include/sciclient_boardcfg.h>
334 #ifdef __cplusplus
335 extern "C" {
336 #endif
338 /* ========================================================================== */
339 /* Macros & Typedefs */
340 /* ========================================================================== */
342 /**
343 * \anchor Sciclient_ServiceOperationMode
344 * \name Sciclient Service API Operation Mode
345 * @{
346 * Sciclient Service API Operation Mode. The different types of modes supported
347 * are:\n
348 * (1) Polled Mode : no interrupts are registered. The completion of a message
349 * is via polling on the Proxy registers.\n
350 * (2) Interrupt Mode : Interrupt are registered and the response message would
351 * be via a interrupt routine.
352 * Default mode in case #Sciclient_ConfigPrms_t is NULL is interrupt.
353 */
354 #define SCICLIENT_SERVICE_OPERATION_MODE_POLLED (0U)
355 #define SCICLIENT_SERVICE_OPERATION_MODE_INTERRUPT (1U)
356 /* @} */
358 /**
359 * \anchor Sciclient_ServiceOperationTimeout
360 * \name Sciclient Service API Operation Timeout
361 * @{
362 * Sciclient Service API Timeout Values. The different types are:\n
363 * (1) Wait forever for an operation to complete. \n
364 * (2) Do not wait for the operation to complete. \n
365 * (3) Wait for a given time interface for the operation to complete.
366 */
367 #define SCICLIENT_SERVICE_WAIT_FOREVER (0xFFFFFFFFU)
368 #define SCICLIENT_SERVICE_NO_WAIT (0x0U)
369 /* @} */
372 /* ========================================================================== */
373 /* Structure Declarations */
374 /* ========================================================================== */
376 /**
377 * \brief Initialization parameters for sciclient.
378 * Pointer to this is passed to #Sciclient_init.
379 */
380 typedef struct
381 {
382 uint32_t opModeFlag;
383 /**< Operation mode for the Sciclient Service API. Refer to
384 * \ref Sciclient_ServiceOperationMode for valid values.
385 */
386 Sciclient_BoardCfgPrms_t * pBoardCfgPrms;
387 /**< NULL will result in using default board configuration.
388 * Refer #Sciclient_BoardCfgPrms_t
389 */
390 uint32_t isSecureMode;
391 /**< Variable to check whether Core context is secure/non-secure. This has
392 * to be given by the user via configParams. Default value is 0.
393 */
394 uint32_t c66xRatRegion;
395 /**< C66x Rat region to use for mapping the IR */
396 } Sciclient_ConfigPrms_t;
398 /**
399 * \brief Input parameters for #Sciclient_service function.
400 */
401 typedef struct
402 {
403 uint16_t messageType;
404 /**< [IN] Type of message. */
405 uint32_t flags;
406 /**< [IN] Flags for messages that are being transmitted.
407 *
408 */
409 const uint8_t *pReqPayload;
410 /**< [IN] Pointer to the payload to be transmitted */
411 uint32_t reqPayloadSize;
412 /**< [IN] Size of the payload to be transmitted (in bytes)*/
413 uint32_t timeout;
414 /**< [IN] Timeout(number of iterations) for receiving response
415 * (Refer \ref Sciclient_ServiceOperationTimeout) */
416 } Sciclient_ReqPrm_t;
418 /**
419 * \brief Output parameters for #Sciclient_service function.
420 */
421 typedef struct
422 {
423 uint32_t flags;
424 /**< [OUT] Flags of response to messages. */
425 uint8_t *pRespPayload;
426 /**< [IN] Pointer to the received payload. The pointer is an input. The
427 * API will populate this with the firmware response upto the
428 * size mentioned in respPayloadSize. Please ensure respPayloadSize
429 * bytes are allocated.
430 */
431 uint32_t respPayloadSize;
432 /**< [IN] Size of the response payload(in bytes) */
433 } Sciclient_RespPrm_t;
435 /**
436 * \brief Input parameters for #Sciclient_service function.
437 */
438 typedef struct
439 {
440 const uint32_t *boardCfgLow;
441 /**< [OUT] Pointer to default board config */
442 const uint32_t *boardCfgLowRm;
443 /**< [OUT] Pointer to default board config for RM */
444 const uint32_t *boardCfgLowSec;
445 /**< [OUT] Pointer to default board config for Security */
446 const uint32_t *boardCfgLowPm;
447 /**< [OUT] Pointer to default board config for PM */
448 uint32_t boardCfgLowSize;
449 /**< [OUT] Size in bytes for default board config */
450 uint32_t boardCfgLowRmSize;
451 /**< [OUT] Size in bytes for default board config for RM */
452 uint32_t boardCfgLowSecSize;
453 /**< [OUT] Size in bytes for default board config for Security */
454 uint32_t boardCfgLowPmSize;
455 /**< [OUT] Size in bytes for default board config for PM */
456 } Sciclient_DefaultBoardCfgInfo_t;
458 /* ========================================================================== */
459 /* Function Declarations */
460 /* ========================================================================== */
462 /**
463 * \brief Loads the DMSC firmware. This is typically called by SBL. Load
464 * firmware does not require calling the #Sciclient_init function.
465 *
466 * Requirement: DOX_REQ_TAG(PDK-2137), DOX_REQ_TAG(PDK-2138)
467 *
468 * \param pSciclient_firmware [IN] Pointer to signed SYSFW binary
469 *
470 * \return CSL_PASS on success, else failure
471 *
472 */
473 int32_t Sciclient_loadFirmware(const uint32_t *pSciclient_firmware);
475 /**
476 * \brief This API is called once for registering interrupts and creating
477 * semaphore handles to be able to talk to the firmware.
478 * The application should assume that the firmware is pre-loaded while
479 * calling the #Sciclient_init API.
480 * The firmware should have been loaded either via GEL or via the SBL
481 * prior to the application calling the #Sciclient_init.
482 * If a void pointer is passed, default values will be used, else
483 * the values passed will be used.
484 *
485 * Requirement: DOX_REQ_TAG(PDK-2146)
486 *
487 * \param pCfgPrms [IN] Pointer to #Sciclient_ConfigPrms_t
488 *
489 * \return CSL_PASS on success, else failure
490 *
491 */
492 int32_t Sciclient_init(const Sciclient_ConfigPrms_t *pCfgPrms);
494 /**
495 * \brief This API allows communicating with the System firmware which can be
496 * called to perform various functions in the system.
497 * Core sciclient function for transmitting payload and recieving
498 * the response.
499 * The caller is expected to allocate memory for the input request
500 * parameter (Refer #Sciclient_ReqPrm_t). This involves setting the
501 * message type being communicated to the firmware, the response flags,
502 * populate the payload of the message based on the inputs in the
503 * files sciclient_fmwPmMessages.h,sciclient_fmwRmMessages.h,
504 * sciclient_fmwSecMessages.h and sciclient_fmwCommonMessages.h.
505 * Since the payload in considered a stream of bytes in this API,
506 * the caller should also populate the size of this stream in
507 * reqPayloadSize. The timeout is used to determine for what amount
508 * of iterations the API would wait for their operation to complete.
509 *
510 * To make sure the response is captured correctly the caller should
511 * also allocate the space for #Sciclient_RespPrm_t parameters. The
512 * caller should populate the pointer to the pRespPayload and the size
513 * respPayloadSize. The API would populate the response flags to
514 * indicate any firmware specific errors and also populate the memory
515 * pointed by pRespPayload till the size given in respPayloadSize.
516 *
517 *
518 * Requirement: DOX_REQ_TAG(PDK-2142), DOX_REQ_TAG(PDK-2141),
519 * DOX_REQ_TAG(PDK-2140), DOX_REQ_TAG(PDK-2139)
520 *
521 * \param pReqPrm [IN] Pointer to #Sciclient_ReqPrm_t
522 * \param pRespPrm [OUT] Pointer to #Sciclient_RespPrm_t
523 *
524 * \return CSL_PASS on success, else failure
525 *
526 */
527 int32_t Sciclient_service(const Sciclient_ReqPrm_t *pReqPrm,
528 Sciclient_RespPrm_t *pRespPrm);
530 /**
531 * \brief De-initialization of sciclient. This de-initialization is specific
532 * to the application. It only de-initializes the semaphores,
533 * interrupts etc. which are initialized in #Sciclient_init. It does
534 * not de-initialize the system firmware.
535 *
536 * Requirement: DOX_REQ_TAG(PDK-2146)
537 *
538 * \return CSL_PASS on success, else failure
539 *
540 */
542 int32_t Sciclient_deinit(void);
544 /**<
545 * \brief API to verify that firmware ABI matches the supported ABI.
546 *
547 * \return CSL_PASS on success, else failure
548 */
549 int32_t Sciclient_abiCheck(void);
551 /**
552 * \brief API to get the default board config info.
553 *
554 * \return CSL_PASS on success, else failure
555 */
556 int32_t Sciclient_getDefaultBoardCfgInfo(Sciclient_DefaultBoardCfgInfo_t *pBoardCfgInfo);
558 /*
559 * Structure Init functions
560 *
561 * Requirement: DOX_REQ_TAG(PDK-2936)
562 */
563 /**
564 * \brief Sciclient_ConfigPrms_t structure init function.
565 *
566 * \param pCfgPrms [IN] Pointer to #Sciclient_ConfigPrms_t structure.
567 *
568 */
569 static inline void Sciclient_configPrmsInit(Sciclient_ConfigPrms_t *pCfgPrms);
571 /* ========================================================================== */
572 /* Static Function Definitions */
573 /* ========================================================================== */
575 static inline void Sciclient_configPrmsInit(Sciclient_ConfigPrms_t *pCfgPrms)
576 {
577 if(NULL != pCfgPrms)
578 {
579 pCfgPrms->opModeFlag = SCICLIENT_SERVICE_OPERATION_MODE_POLLED;
580 pCfgPrms->pBoardCfgPrms = NULL;
581 pCfgPrms->isSecureMode = 0U;
582 pCfgPrms->c66xRatRegion = 15U;
583 }
584 }
586 #ifdef __cplusplus
587 }
588 #endif
590 #endif /* #ifndef SCICLIENT_H_ */
592 /* @} */
594 /**
595 * \ingroup DRV_SCICLIENT_MODULE
596 * \defgroup TISCI Texas Instruments System Controller Interface
597 *
598 * @{
599 *
600 * ##Power and Clock Management Features
601 * Public APIs are provided to:
602 *
603 * - Enable and release a module, such as a UART or a core
604 * - This configures both power and clock details for the module and keeps track of its usage.
605 * - Configure the lowest/deepest low-power (sleep) mode allowed as well as EMIF details to enable self-refresh
606 * - Query thermal sensors
607 *
608 * ##Resource Management Features
609 * Public APIs are provided to:
610 *
611 * - Manage DMA/Navigator Resources
612 * - UDMAP
613 * - Ring Accelerator
614 * - PSI-L
615 * - Proxy
616 * - Program interrupts (interrupt aggregators and routers) both at SoC and subsystem (DMA/Navigator) level
617 *
618 * ##Security Features
619 * Public APIs are provided to directly configure these features following polices and root of trust:
620 *
621 * - ISC
622 * - Present at originator/master interfaces to control credentials from master
623 * - Firewall
624 * - Additional layer of access control beyond MMU/MPU located at each destination/slave interface to control memory and register access
625 * - SA2-UL Security Contexts
626 * - Contains actual keys for crypto accelerator
627 * - APIs are also provided to authenticate and/or decrypt blobs in memory.
628 */
629 /* @} */