AM62Px MCU+ SDK  10.01.00
sciclient.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2024, 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 
311 #ifndef SCICLIENT_H_
312 #define SCICLIENT_H_
313 
314 /* ========================================================================== */
315 /* Include Files */
316 /* ========================================================================== */
317 
318 #include <stdint.h>
319 #include <stddef.h>
320 #include <kernel/dpl/SystemP.h>
321 
322 /* ========================================================================== */
323 /* Macros & Typedefs */
324 /* ========================================================================== */
325 
326 /* Windows Visual Studio build doesn't __attribute__ indentifier, so forcing it be to dummy for getting build working */
327 #ifdef _MSC_VER
328  #ifndef __attribute__
329  #define __attribute__()
330  #endif
331 #endif
332 
333 /* TISCI Include */
334 #define TISCI_BIT(n) (1UL << (n))
335 
340 typedef uint8_t domgrp_t;
341 
342 #ifndef SYSFW_DEVGRPS_H
343 
347 typedef uint8_t devgrp_t;
348 
349 /* External definitions */
350 
355 #define DEVGRP_ALL (0x00U)
356 
358 #define DEVGRP_00 ((0x01U) << 0U)
359 
360 #define DEVGRP_01 ((0x01U) << 1U)
361 
362 #define DEVGRP_02 ((0x01U) << 2U)
363 
364 #define DEVGRP_03 ((0x01U) << 3U)
365 
366 #define DEVGRP_04 ((0x01U) << 4U)
367 
368 #define DEVGRP_05 ((0x01U) << 5U)
369 
370 #define DEVGRP_06 ((0x01U) << 6U)
371 
375 #define DEVGRP_DMSC ((0x01U) << 7U)
376 
377 #define DEVGRP_DMSC_ALL (0xFFU)
378 
379 #endif
380 
385 #define MAX_NUM_DEVGRPS (8U)
386 
387 #include <drivers/hw_include/cslr_soc.h>
393 #if defined (SOC_AM64X) || defined (SOC_AM243X)
394 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_resasg_types.h>
395 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_hosts.h>
396 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_sec_proxy.h>
397 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_boardcfg_constraints.h>
398 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_devices.h>
399 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_clocks.h>
400 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_hosts.h>
401 #include <drivers/sciclient/include/am64x_am243x/sciclient_fmwMsgParams.h>
402 #endif
403 #if defined (SOC_AM62X)
404 #include <drivers/sciclient/include/tisci/am62x/tisci_resasg_types.h>
405 #include <drivers/sciclient/include/tisci/am62x/tisci_hosts.h>
406 #include <drivers/sciclient/include/tisci/am62x/tisci_sec_proxy.h>
407 #include <drivers/sciclient/include/tisci/am62x/tisci_boardcfg_constraints.h>
408 #include <drivers/sciclient/include/tisci/am62x/tisci_devices.h>
409 #include <drivers/sciclient/include/tisci/am62x/tisci_clocks.h>
410 #include <drivers/sciclient/include/tisci/am62x/tisci_hosts.h>
411 #include <drivers/sciclient/include/am62x/sciclient_fmwMsgParams.h>
412 #endif
413 #if defined (SOC_AM62AX)
414 #include <drivers/sciclient/include/tisci/am62ax/tisci_resasg_types.h>
415 #include <drivers/sciclient/include/tisci/am62ax/tisci_hosts.h>
416 #include <drivers/sciclient/include/tisci/am62ax/tisci_sec_proxy.h>
417 #include <drivers/sciclient/include/tisci/am62ax/tisci_boardcfg_constraints.h>
418 #include <drivers/sciclient/include/tisci/am62ax/tisci_devices.h>
419 #include <drivers/sciclient/include/tisci/am62ax/tisci_clocks.h>
420 #include <drivers/sciclient/include/tisci/am62ax/tisci_hosts.h>
421 #include <drivers/sciclient/include/am62ax/sciclient_fmwMsgParams.h>
422 #endif
423 #if defined (SOC_AM62DX)
424 #include <drivers/sciclient/include/tisci/am62dx/tisci_resasg_types.h>
425 #include <drivers/sciclient/include/tisci/am62dx/tisci_hosts.h>
426 #include <drivers/sciclient/include/tisci/am62dx/tisci_sec_proxy.h>
427 #include <drivers/sciclient/include/tisci/am62dx/tisci_boardcfg_constraints.h>
428 #include <drivers/sciclient/include/tisci/am62dx/tisci_devices.h>
429 #include <drivers/sciclient/include/tisci/am62dx/tisci_clocks.h>
430 #include <drivers/sciclient/include/tisci/am62dx/tisci_hosts.h>
431 #include <drivers/sciclient/include/am62dx/sciclient_fmwMsgParams.h>
432 #endif
433 #if defined (SOC_AM62PX)
442 #endif
470 
471 #ifdef __cplusplus
472 extern "C" {
473 #endif
474 
475 /* ========================================================================== */
476 /* Macros & Typedefs */
477 /* ========================================================================== */
478 
479 /* ========================================================================== */
480 /* Structure Declarations */
481 /* ========================================================================== */
482 
486 typedef struct
487 {
488  uint16_t messageType;
490  uint32_t flags;
494  const uint8_t *pReqPayload;
496  uint32_t reqPayloadSize;
498  uint32_t timeout;
502 
506 typedef struct
507 {
508  uint32_t flags;
510  uint8_t *pRespPayload;
516  uint32_t respPayloadSize;
519 
520 /* ========================================================================== */
521 /* Function Declarations */
522 /* ========================================================================== */
523 
533 int32_t Sciclient_loadFirmware(const uint32_t *pSciclient_firmware);
534 
550 int32_t Sciclient_init(uint32_t coreId);
551 
581 int32_t Sciclient_service(const Sciclient_ReqPrm_t *pReqPrm,
582  Sciclient_RespPrm_t *pRespPrm);
583 
594 int32_t Sciclient_deinit(void);
595 
601 int32_t Sciclient_abiCheck(void);
602 
609 
617 int32_t Sciclient_getVersionCheck(uint32_t doLog);
618 
625 
633 
634 /* ========================================================================== */
635 /* Static Function Definitions */
636 /* ========================================================================== */
637 
638 #ifdef __cplusplus
639 }
640 #endif
641 
642 #endif /* #ifndef SCICLIENT_H_ */
643 
tisci_rm_ra.h
tisci_rm_udmap.h
tisci_pm_clock.h
tisci_secure_jtag.h
tisci_keystore.h
Sciclient_abiCheck
int32_t Sciclient_abiCheck(void)
SystemP.h
sciclient_dkek.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
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:340
Sciclient_deinit
int32_t Sciclient_deinit(void)
De-initialization of sciclient. This de-initialization is specific to the application....
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:507
tisci_sec_handover.h
tisci_pm_core.h
Sciclient_RespPrm_t::flags
uint32_t flags
Definition: sciclient.h:508
tisci_clocks.h
tisci_boardcfg_rm.h
Sciclient_ReqPrm_t::timeout
uint32_t timeout
Definition: sciclient.h:498
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_rm_shared.h
tisci_rm_proxy.h
tisci_boardcfg.h
Sciclient_RespPrm_t::respPayloadSize
uint32_t respPayloadSize
Definition: sciclient.h:516
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 ...
tisci_sec_proxy.h
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_lpm.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
tisci_protocol.h
tisci_sec_macros.h
tisci_boardcfg_macros.h
tisci_boardcfg_constraints.h
tisci_soc_uid.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
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:347
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.
tisci_keywriter.h
tisci_pm_device.h
sciclient_firewall.h
This file contains the definition of all the message IDs, message formats to be able to interact with...
Sciclient_triggerSecHandover
int32_t Sciclient_triggerSecHandover(void)
API to trigger security handover.
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:490
tisci_rm_psil.h
Sciclient_ReqPrm_t::reqPayloadSize
uint32_t reqPayloadSize
Definition: sciclient.h:496
Sciclient_ReqPrm_t::messageType
uint16_t messageType
Definition: sciclient.h:488
Sciclient_getSelfDevIdCore
uint32_t Sciclient_getSelfDevIdCore(void)
Sciclient_ReqPrm_t
Input parameters for Sciclient_service function.
Definition: sciclient.h:487
Sciclient_RespPrm_t::pRespPayload
uint8_t * pRespPayload
Definition: sciclient.h:510
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_lpm.h
tisci_resasg_types.h
tisci_core.h
Sciclient_ReqPrm_t::pReqPayload
const uint8_t * pReqPayload
Definition: sciclient.h:494
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...