AM62x MCU+ SDK  09.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 
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 /* Windows Visual Studio build doesn't __attribute__ indentifier, so forcing it be to dummy for getting build working */
323 #ifdef _MSC_VER
324  #ifndef __attribute__
325  #define __attribute__()
326  #endif
327 #endif
328 
329 /* TISCI Include */
330 #define TISCI_BIT(n) (1UL << (n))
331 
336 typedef uint8_t devgrp_t;
337 
342 typedef uint8_t domgrp_t;
343 
344 /* External definitions */
345 
350 #define DEVGRP_ALL (0x00U)
351 
353 #define DEVGRP_00 ((0x01U) << 0U)
354 
355 #define DEVGRP_01 ((0x01U) << 1U)
356 
357 #define DEVGRP_02 ((0x01U) << 2U)
358 
359 #define DEVGRP_03 ((0x01U) << 3U)
360 
361 #define DEVGRP_04 ((0x01U) << 4U)
362 
363 #define DEVGRP_05 ((0x01U) << 5U)
364 
365 #define DEVGRP_06 ((0x01U) << 6U)
366 
370 #define DEVGRP_DMSC ((0x01U) << 7U)
371 
372 #define DEVGRP_DMSC_ALL (0xFFU)
373 
378 #define MAX_NUM_DEVGRPS (8U)
379 
380 #include <drivers/hw_include/cslr_soc.h>
386 #if defined (SOC_AM64X) || defined (SOC_AM243X)
387 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_resasg_types.h>
388 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_hosts.h>
389 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_sec_proxy.h>
390 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_boardcfg_constraints.h>
391 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_devices.h>
392 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_clocks.h>
393 #include <drivers/sciclient/include/tisci/am64x_am243x/tisci_hosts.h>
394 #include <drivers/sciclient/include/am64x_am243x/sciclient_fmwMsgParams.h>
395 #endif
396 #if defined (SOC_AM62X)
405 #endif
406 #if defined (SOC_AM62AX)
407 #include <drivers/sciclient/include/tisci/am62ax/tisci_resasg_types.h>
408 #include <drivers/sciclient/include/tisci/am62ax/tisci_hosts.h>
409 #include <drivers/sciclient/include/tisci/am62ax/tisci_sec_proxy.h>
410 #include <drivers/sciclient/include/tisci/am62ax/tisci_boardcfg_constraints.h>
411 #include <drivers/sciclient/include/tisci/am62ax/tisci_devices.h>
412 #include <drivers/sciclient/include/tisci/am62ax/tisci_clocks.h>
413 #include <drivers/sciclient/include/tisci/am62ax/tisci_hosts.h>
414 #include <drivers/sciclient/include/am62ax/sciclient_fmwMsgParams.h>
415 #endif
416 #if defined (SOC_AM62PX)
417 #include <drivers/sciclient/include/tisci/am62px/tisci_resasg_types.h>
418 #include <drivers/sciclient/include/tisci/am62px/tisci_hosts.h>
419 #include <drivers/sciclient/include/tisci/am62px/tisci_sec_proxy.h>
420 #include <drivers/sciclient/include/tisci/am62px/tisci_boardcfg_constraints.h>
421 #include <drivers/sciclient/include/tisci/am62px/tisci_devices.h>
422 #include <drivers/sciclient/include/tisci/am62px/tisci_clocks.h>
423 #include <drivers/sciclient/include/tisci/am62px/tisci_hosts.h>
424 #include <drivers/sciclient/include/am62px/sciclient_fmwMsgParams.h>
425 #endif
451 
452 #ifdef __cplusplus
453 extern "C" {
454 #endif
455 
456 /* ========================================================================== */
457 /* Macros & Typedefs */
458 /* ========================================================================== */
459 
460 /* ========================================================================== */
461 /* Structure Declarations */
462 /* ========================================================================== */
463 
467 typedef struct
468 {
469  uint16_t messageType;
471  uint32_t flags;
475  const uint8_t *pReqPayload;
477  uint32_t reqPayloadSize;
479  uint32_t timeout;
483 
487 typedef struct
488 {
489  uint32_t flags;
491  uint8_t *pRespPayload;
497  uint32_t respPayloadSize;
500 
501 /* ========================================================================== */
502 /* Function Declarations */
503 /* ========================================================================== */
504 
514 int32_t Sciclient_loadFirmware(const uint32_t *pSciclient_firmware);
515 
523 
539 int32_t Sciclient_init(uint32_t coreId);
540 
570 int32_t Sciclient_service(const Sciclient_ReqPrm_t *pReqPrm,
571  Sciclient_RespPrm_t *pRespPrm);
572 
583 int32_t Sciclient_deinit(void);
584 
590 int32_t Sciclient_abiCheck(void);
591 
598 
606 int32_t Sciclient_getVersionCheck(bool doLog);
607 
614 
615 /* ========================================================================== */
616 /* Static Function Definitions */
617 /* ========================================================================== */
618 
619 
620 #ifdef __cplusplus
621 }
622 #endif
623 
624 #endif /* #ifndef SCICLIENT_H_ */
625 
tisci_rm_ra.h
tisci_rm_udmap.h
tisci_pm_clock.h
tisci_secure_jtag.h
Sciclient_getVersionCheck
int32_t Sciclient_getVersionCheck(bool doLog)
API to send a get version command to SYSFW and optionally log the results to console.
tisci_keystore.h
Sciclient_abiCheck
int32_t Sciclient_abiCheck(void)
API to verify that firmware ABI matches the supported ABI.
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:342
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:488
tisci_sec_handover.h
tisci_pm_core.h
Sciclient_RespPrm_t::flags
uint32_t flags
Definition: sciclient.h:489
tisci_clocks.h
tisci_boardcfg_rm.h
Sciclient_ReqPrm_t::timeout
uint32_t timeout
Definition: sciclient.h:479
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:497
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...
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:336
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:471
tisci_rm_psil.h
Sciclient_ReqPrm_t::reqPayloadSize
uint32_t reqPayloadSize
Definition: sciclient.h:477
Sciclient_ReqPrm_t::messageType
uint16_t messageType
Definition: sciclient.h:469
Sciclient_getSelfDevIdCore
uint32_t Sciclient_getSelfDevIdCore(void)
Sciclient_ReqPrm_t
Input parameters for Sciclient_service function.
Definition: sciclient.h:468
Sciclient_RespPrm_t::pRespPayload
uint8_t * pRespPayload
Definition: sciclient.h:491
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:475
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...