AM64x MCU+ SDK  08.02.00
sciclient.h
Go to the documentation of this file.
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  */
32 
212 #ifndef SCICLIENT_H_
213 #define SCICLIENT_H_
214 
215 /* ========================================================================== */
216 /* Include Files */
217 /* ========================================================================== */
218 
219 #include <stdint.h>
220 #include <stddef.h>
221 #include <kernel/dpl/SystemP.h>
222 
223 /* Windows Visual Studio build doesn't __attribute__ indentifier, so forcing it be to dummy for getting build working */
224 #ifdef _MSC_VER
225  #ifndef __attribute__
226  #define __attribute__()
227  #endif
228 #endif
229 
230 /* TISCI Include */
231 #define TISCI_BIT(n) (1UL << (n))
232 
237 typedef uint8_t devgrp_t;
238 
243 typedef uint8_t domgrp_t;
244 
245 /* External definitions */
246 
251 #define DEVGRP_ALL (0x00U)
252 
254 #define DEVGRP_00 ((0x01U) << 0U)
255 
256 #define DEVGRP_01 ((0x01U) << 1U)
257 
258 #define DEVGRP_02 ((0x01U) << 2U)
259 
260 #define DEVGRP_03 ((0x01U) << 3U)
261 
262 #define DEVGRP_04 ((0x01U) << 4U)
263 
264 #define DEVGRP_05 ((0x01U) << 5U)
265 
266 #define DEVGRP_06 ((0x01U) << 6U)
267 
271 #define DEVGRP_DMSC ((0x01U) << 7U)
272 
273 #define DEVGRP_DMSC_ALL (0xFFU)
274 
279 #define MAX_NUM_DEVGRPS (8U)
280 
281 #include <drivers/hw_include/cslr_soc.h>
287 #if defined (SOC_AM64X) || defined (SOC_AM243X)
296 #endif
320 
321 #ifdef __cplusplus
322 extern "C" {
323 #endif
324 
325 /* ========================================================================== */
326 /* Macros & Typedefs */
327 /* ========================================================================== */
328 
329 /* ========================================================================== */
330 /* Structure Declarations */
331 /* ========================================================================== */
332 
336 typedef struct
337 {
338  uint16_t messageType;
340  uint32_t flags;
344  const uint8_t *pReqPayload;
346  uint32_t reqPayloadSize;
348  uint32_t timeout;
352 
356 typedef struct
357 {
358  uint32_t flags;
360  uint8_t *pRespPayload;
366  uint32_t respPayloadSize;
369 
370 /* ========================================================================== */
371 /* Function Declarations */
372 /* ========================================================================== */
373 
383 int32_t Sciclient_loadFirmware(const uint32_t *pSciclient_firmware);
384 
392 
408 int32_t Sciclient_init(uint32_t coreId);
409 
439 int32_t Sciclient_service(const Sciclient_ReqPrm_t *pReqPrm,
440  Sciclient_RespPrm_t *pRespPrm);
441 
452 int32_t Sciclient_deinit(void);
453 
459 int32_t Sciclient_abiCheck(void);
460 
467 
475 int32_t Sciclient_getVersionCheck(uint32_t doLog);
476 
483 
484 /* ========================================================================== */
485 /* Static Function Definitions */
486 /* ========================================================================== */
487 
488 
489 #ifdef __cplusplus
490 }
491 #endif
492 
493 #endif /* #ifndef SCICLIENT_H_ */
494 
tisci_rm_ra.h
tisci_rm_udmap.h
Sciclient_loadFirmware
int32_t Sciclient_loadFirmware(const uint32_t *pSciclient_firmware)
Loads the DMSC firmware. This is typically called by SBL. Load firmware does not require calling the ...
tisci_pm_clock.h
Sciclient_abiCheck
int32_t Sciclient_abiCheck(void)
API to verify that firmware ABI matches the supported ABI.
tisci_keystore.h
SystemP.h
sciclient_dkek.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
sciclient_fmwMsgParams.h
This file contains the definition of all the parameter IDs for PM, RM, Security.
Sciclient_RespPrm_t
Output parameters for Sciclient_service function.
Definition: sciclient.h:357
tisci_sec_handover.h
tisci_pm_core.h
Sciclient_RespPrm_t::flags
uint32_t flags
Definition: sciclient.h:358
tisci_clocks.h
tisci_boardcfg_rm.h
Sciclient_getVersionCheck
int32_t Sciclient_getVersionCheck(uint32_t doLog)
API to send a get version command to SYSFW and optionally log the results to console.
Sciclient_ReqPrm_t::timeout
uint32_t timeout
Definition: sciclient.h:348
domgrp_t
uint8_t domgrp_t
Defines the sysfw DOMGRP type. This is meant to be used in code or data structures that require disti...
Definition: sciclient.h:243
tisci_rm_shared.h
tisci_rm_proxy.h
Sciclient_triggerSecHandover
int32_t Sciclient_triggerSecHandover(void)
API to trigger security handover.
tisci_boardcfg.h
Sciclient_deinit
int32_t Sciclient_deinit(void)
De-initialization of sciclient. This de-initialization is specific to the application....
Sciclient_RespPrm_t::respPayloadSize
uint32_t respPayloadSize
Definition: sciclient.h:366
devgrp_t
uint8_t devgrp_t
Defines the sysfw DEVGRP type. This is meant to be used in code or data structures that require disti...
Definition: sciclient.h:237
tisci_sec_proxy.h
tisci_protocol.h
tisci_sec_macros.h
tisci_boardcfg_macros.h
tisci_boardcfg_constraints.h
tisci_devices.h
tisci_rm_irq.h
sciclient_boardcfg.h
Wrapper function to send the board configuration message to DMSC.
tisci_dkek.h
tisci_procboot.h
tisci_keywriter.h
tisci_pm_device.h
Sciclient_init
int32_t Sciclient_init(uint32_t coreId)
This API is called once for registering interrupts and creating semaphore handles to be able to talk ...
sciclient_firewall.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
Sciclient_waitForBootNotification
int32_t Sciclient_waitForBootNotification(void)
Waits for boot notification from SYSFW.
Sciclient_service
int32_t Sciclient_service(const Sciclient_ReqPrm_t *pReqPrm, Sciclient_RespPrm_t *pRespPrm)
This API allows communicating with the System firmware which can be called to perform various functio...
sciclient_pm.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
Sciclient_ReqPrm_t::flags
uint32_t flags
Definition: sciclient.h:340
tisci_rm_psil.h
Sciclient_ReqPrm_t::reqPayloadSize
uint32_t reqPayloadSize
Definition: sciclient.h:346
Sciclient_getSelfDevIdCore
uint32_t Sciclient_getSelfDevIdCore(void)
Sciclient_ReqPrm_t::messageType
uint16_t messageType
Definition: sciclient.h:338
Sciclient_ReqPrm_t
Input parameters for Sciclient_service function.
Definition: sciclient.h:337
Sciclient_RespPrm_t::pRespPayload
uint8_t * pRespPayload
Definition: sciclient.h:360
sciclient_procboot.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
tisci_hosts.h
tisci_resasg_types.h
tisci_core.h
Sciclient_ReqPrm_t::pReqPayload
const uint8_t * pReqPayload
Definition: sciclient.h:344
tisci_firewall.h
tisci_rm_core.h
sciclient_rm.h
This file contains the definition of all the message IDs, message formats to be able to interact with...