AM64x MCU+ SDK  10.00.00
bootloader_soc.h File Reference

Go to the source code of this file.

Data Structures

struct  Bootloader_CoreBootInfo
 Data structure containing information about a core specific to the AM64x SOC. More...
 

Macros

#define BOOTLOADER_DEVICE_VARIANT_SINGLE_CORE   (0x00000000U)
 
#define BOOTLOADER_DEVICE_VARIANT_DUAL_CORE   (0x00040000U)
 
#define BOOTLOADER_DEVICE_VARIANT_QUAD_CORE   (0x000C0000U)
 
#define BOOTLOADER_R5FSS0   (0x00000000U)
 
#define BOOTLOADER_R5FSS1   (0x00010000U)
 
#define BOOTLOADER_ICSS_CORE_DEFAULT_FREQUENCY   (200000000U)
 

Functions

int32_t Bootloader_socCpuRequest (uint32_t cpuId)
 Request for a particular CPU in the AM64x SOC. More...
 
int32_t Bootloader_socCpuRelease (uint32_t cpuId)
 Release a particular CPU in the AM64x SOC. More...
 
int32_t Bootloader_socCpuSetClock (uint32_t cpuId, uint32_t cpuHz)
 Set the clock of a particular CPU in the AM64x SOC. More...
 
uint64_t Bootloader_socCpuGetClock (uint32_t cpuId)
 Get the clock of a particular CPU in the AM64x SOC. More...
 
uint32_t Bootloader_socCpuGetClkDefault (uint32_t cpuId)
 Get the default clock of a particular CPU in the AM64x SOC. More...
 
int32_t Bootloader_socCpuPowerOnReset (uint32_t cpuId, void *socCoreOpMode)
 Do power-on-reset of a particular CPU in the AM64x SOC. More...
 
int32_t Bootloader_socCpuResetRelease (uint32_t cpuId, uintptr_t entryPoint)
 Release a particular CPU in the AM64x SOC from reset. More...
 
int32_t Bootloader_socCpuResetReleaseSelf (void)
 Release self CPU in the AM64x SOC from reset. More...
 
int32_t Bootloader_socCpuSetEntryPoint (uint32_t cpuId, uintptr_t entryPoint)
 Set entry point for self CPU in the AM64x SOC from reset. More...
 
uint32_t Bootloader_socTranslateSectionAddr (uint32_t cslCoreId, uint32_t addr)
 Translate a CPU address to the SOC address wherever applicable. More...
 
uint32_t Bootloader_socRprcToCslCoreId (uint32_t rprcCoreId)
 Obtain the CSL core ID of a CPU from its RPRC core ID. More...
 
uint32_t * Bootloader_socGetSelfCpuList (void)
 Get the list of self cpus in the SOC. More...
 
char * Bootloader_socGetCoreName (uint32_t cpuId)
 Get the name of a core. More...
 
int32_t Bootloader_socMemInitCpu (uint32_t cpuId)
 Initialize the core memories of a specific core. More...
 
uint32_t Bootloader_socGetSciclientCpuProcId (uint32_t cpuId)
 Obtain the Sciclient Proc Id corresponding to the CSL core ID. More...
 
uint32_t Bootloader_socGetSciclientCpuDevId (uint32_t cpuId)
 Obtain the Sciclient Device Id corresponding to the CSL core ID. More...
 
int32_t Bootloader_socSecHandover (void)
 API to trigger the security handover from SYSFW. More...
 
int32_t Bootloader_socWaitForFWBoot (void)
 API to wait for boot notification from SYSFW/ROM. More...
 
int32_t Bootloader_socOpenFirewalls (void)
 API to open required firewalls using SYSFW. More...
 
int32_t Bootloader_socAuthImage (uint32_t certLoadAddr)
 API to authenticate (and decrypt if needed) an appimage using SYSFW. More...
 
uint32_t Bootloader_socIsAuthRequired (void)
 API to check if authentication is required for the device. Checks the SYS_STATUS register to see if device is GP, HS-FS, HS-SE etc. More...
 
uint32_t Bootloader_socIsR5FSSDual (uint32_t ssNum)
 API to check if an R5 cluster/subsystem has dual cores enabled or not. More...
 
uint32_t Bootloader_socGetCoreVariant (void)
 API to check the GPN variant of the SOC - whether it's a quad core, dual core or a single core variant. More...
 
void Bootloader_socResetWorkaround (void)
 Workaround API to prevent CPSW register lockup. Checks the reset source and does a warm reset in case of POR MCU , POR MAIN or COLD BOOT reset. More...
 
void Bootloader_enableMCUPLL (void)
 Enable MCU PLL. The MCU PLL will be initialized by DMSC if devgrp is set to DEVGRP_ALL. If devgrp is set to DEVGRP_00 (0x01) (Main Domain), the MCU PLL will not be initialized. This API initializes MCU PLL when devgrp is set to DEVGRP_00. More...
 
uint32_t Bootloader_socIsMCUResetIsoEnabled (void)
 Check if MCU domain is reset isolated. More...
 
void Bootloader_socNotifyFirewallOpen (void)
 Notify other cores firewall open from SBL. Function writes a Software defined magic word to PSRAM address (software defined) to signal Firewall open to MCU cores. This function should only be called from SBL. More...
 
int32_t Bootloader_socEnableICSSCores (uint32_t clkFreq)
 API to enable ICSS cores when applicable. More...
 
void Bootloader_socGetBootSeqOid (uint8_t *boot_seq_oid)
 API to get boot sequence oid. More...
 
int32_t Bootloader_socCpuSetAppEntryPoint (uint32_t cpuId, uintptr_t entryPoint)
 

Macro Definition Documentation

◆ BOOTLOADER_DEVICE_VARIANT_SINGLE_CORE

#define BOOTLOADER_DEVICE_VARIANT_SINGLE_CORE   (0x00000000U)

◆ BOOTLOADER_DEVICE_VARIANT_DUAL_CORE

#define BOOTLOADER_DEVICE_VARIANT_DUAL_CORE   (0x00040000U)

◆ BOOTLOADER_DEVICE_VARIANT_QUAD_CORE

#define BOOTLOADER_DEVICE_VARIANT_QUAD_CORE   (0x000C0000U)

◆ BOOTLOADER_R5FSS0

#define BOOTLOADER_R5FSS0   (0x00000000U)

◆ BOOTLOADER_R5FSS1

#define BOOTLOADER_R5FSS1   (0x00010000U)

◆ BOOTLOADER_ICSS_CORE_DEFAULT_FREQUENCY

#define BOOTLOADER_ICSS_CORE_DEFAULT_FREQUENCY   (200000000U)

Function Documentation

◆ Bootloader_socCpuRequest()

int32_t Bootloader_socCpuRequest ( uint32_t  cpuId)

Request for a particular CPU in the AM64x SOC.

This API internally makes Sciclient calls to request control of the CPU

Parameters
cpuId[in] The CSL ID of the core
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socCpuRelease()

int32_t Bootloader_socCpuRelease ( uint32_t  cpuId)

Release a particular CPU in the AM64x SOC.

This API internally makes Sciclient calls to release control of the CPU

Parameters
cpuId[in] The CSL ID of the core
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socCpuSetClock()

int32_t Bootloader_socCpuSetClock ( uint32_t  cpuId,
uint32_t  cpuHz 
)

Set the clock of a particular CPU in the AM64x SOC.

This API internally makes Sciclient calls to set CPU clock

Parameters
cpuId[in] The CSL ID of the core
cpuHz[in] Desired clock frequency of the CPU in Hertz
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socCpuGetClock()

uint64_t Bootloader_socCpuGetClock ( uint32_t  cpuId)

Get the clock of a particular CPU in the AM64x SOC.

This API internally makes Sciclient calls to get the current clock frequency of CPU

Parameters
cpuId[in] The CSL ID of the core
Returns
Current clock speed of the CPU

◆ Bootloader_socCpuGetClkDefault()

uint32_t Bootloader_socCpuGetClkDefault ( uint32_t  cpuId)

Get the default clock of a particular CPU in the AM64x SOC.

This API queries and internal lookup table to fetch the default clock speed at which a particular CPU should run.

Parameters
cpuId[in] The CSL ID of the core
Returns
Default clock speed of the CPU

◆ Bootloader_socCpuPowerOnReset()

int32_t Bootloader_socCpuPowerOnReset ( uint32_t  cpuId,
void *  socCoreOpMode 
)

Do power-on-reset of a particular CPU in the AM64x SOC.

This API is called only when booting a non-self CPU.

Parameters
cpuId[in] The CSL ID of the core
socCoreOpModeLockstep/Dual core mode as per setting in syscfg.
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socCpuResetRelease()

int32_t Bootloader_socCpuResetRelease ( uint32_t  cpuId,
uintptr_t  entryPoint 
)

Release a particular CPU in the AM64x SOC from reset.

This API is called only when booting a non-self CPU. There is a different API Bootloader_socCpuResetReleaseSelf in the case of a self CPU

Parameters
cpuId[in] The CSL ID of the core
entryPoint[in] The entryPoint of the CPU, from where it should start execution
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socCpuResetReleaseSelf()

int32_t Bootloader_socCpuResetReleaseSelf ( void  )

Release self CPU in the AM64x SOC from reset.

Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socCpuSetEntryPoint()

int32_t Bootloader_socCpuSetEntryPoint ( uint32_t  cpuId,
uintptr_t  entryPoint 
)

Set entry point for self CPU in the AM64x SOC from reset.

This API need not be called when booting a non-self CPU. The entry point can be specified in the Bootloader_socCpuResetRelease function itself

Parameters
cpuId[in] The CSL ID of the core
entryPoint[in] The entryPoint of the CPU, from where it should start execution
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socTranslateSectionAddr()

uint32_t Bootloader_socTranslateSectionAddr ( uint32_t  cslCoreId,
uint32_t  addr 
)

Translate a CPU address to the SOC address wherever applicable.

This API need not be called when booting a non-self CPU. The entry point can be specified in the Bootloader_socCpuResetRelease function itself

Parameters
cslCoreId[in] The CSL ID of the core
addr[in] The CPU addr
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socRprcToCslCoreId()

uint32_t Bootloader_socRprcToCslCoreId ( uint32_t  rprcCoreId)

Obtain the CSL core ID of a CPU from its RPRC core ID.

Parameters
rprcCoreId[in] The RPRC ID of the core
Returns
CSL core ID of a CPU

◆ Bootloader_socGetSelfCpuList()

uint32_t* Bootloader_socGetSelfCpuList ( void  )

Get the list of self cpus in the SOC.

Returns
List of self cpus ending with an invalid core id

◆ Bootloader_socGetCoreName()

char* Bootloader_socGetCoreName ( uint32_t  cpuId)

Get the name of a core.

Parameters
cpuId[in] The CSL ID of the core
Returns
Name of the CPU

◆ Bootloader_socMemInitCpu()

int32_t Bootloader_socMemInitCpu ( uint32_t  cpuId)

Initialize the core memories of a specific core.

Parameters
cpuId[in] The CSL ID of the core
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socGetSciclientCpuProcId()

uint32_t Bootloader_socGetSciclientCpuProcId ( uint32_t  cpuId)

Obtain the Sciclient Proc Id corresponding to the CSL core ID.

Parameters
cpuId[in] The CSL ID of the core
Returns
CSL core ID of a CPU

◆ Bootloader_socGetSciclientCpuDevId()

uint32_t Bootloader_socGetSciclientCpuDevId ( uint32_t  cpuId)

Obtain the Sciclient Device Id corresponding to the CSL core ID.

Parameters
cpuId[in] The CSL ID of the core
Returns
CSL core ID of a CPU

◆ Bootloader_socSecHandover()

int32_t Bootloader_socSecHandover ( void  )

API to trigger the security handover from SYSFW.

Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socWaitForFWBoot()

int32_t Bootloader_socWaitForFWBoot ( void  )

API to wait for boot notification from SYSFW/ROM.

Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socOpenFirewalls()

int32_t Bootloader_socOpenFirewalls ( void  )

API to open required firewalls using SYSFW.

Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socAuthImage()

int32_t Bootloader_socAuthImage ( uint32_t  certLoadAddr)

API to authenticate (and decrypt if needed) an appimage using SYSFW.

Parameters
certLoadAddr[in] The SOC address pointing to the certificate+appimage
Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socIsAuthRequired()

uint32_t Bootloader_socIsAuthRequired ( void  )

API to check if authentication is required for the device. Checks the SYS_STATUS register to see if device is GP, HS-FS, HS-SE etc.

Returns
TRUE (1U) if authentication required, FALSE (0U) if not.

◆ Bootloader_socIsR5FSSDual()

uint32_t Bootloader_socIsR5FSSDual ( uint32_t  ssNum)

API to check if an R5 cluster/subsystem has dual cores enabled or not.

Returns
TRUE (1U) if dual cores enabled, FALSE (0U) if not.

◆ Bootloader_socGetCoreVariant()

uint32_t Bootloader_socGetCoreVariant ( void  )

API to check the GPN variant of the SOC - whether it's a quad core, dual core or a single core variant.

Returns
BOOTLOADER_DEVICE_VARIANT_SINGLE_CORE, BOOTLOADER_DEVICE_VARIANT_DUAL_CORE or BOOTLOADER_DEVICE_VARIANT_QUAD_CORE or 0xFFFFFFFF if invalid bit field read

◆ Bootloader_socResetWorkaround()

void Bootloader_socResetWorkaround ( void  )

Workaround API to prevent CPSW register lockup. Checks the reset source and does a warm reset in case of POR MCU , POR MAIN or COLD BOOT reset.

◆ Bootloader_enableMCUPLL()

void Bootloader_enableMCUPLL ( void  )

Enable MCU PLL. The MCU PLL will be initialized by DMSC if devgrp is set to DEVGRP_ALL. If devgrp is set to DEVGRP_00 (0x01) (Main Domain), the MCU PLL will not be initialized. This API initializes MCU PLL when devgrp is set to DEVGRP_00.

◆ Bootloader_socIsMCUResetIsoEnabled()

uint32_t Bootloader_socIsMCUResetIsoEnabled ( void  )

Check if MCU domain is reset isolated.

Returns
TRUE (1U) if MCU domain is reset isolated, else return 0.

◆ Bootloader_socNotifyFirewallOpen()

void Bootloader_socNotifyFirewallOpen ( void  )

Notify other cores firewall open from SBL. Function writes a Software defined magic word to PSRAM address (software defined) to signal Firewall open to MCU cores. This function should only be called from SBL.

◆ Bootloader_socEnableICSSCores()

int32_t Bootloader_socEnableICSSCores ( uint32_t  clkFreq)

API to enable ICSS cores when applicable.

Parameters
clkFreq[in] Clock frequency of ICSS cores in Hz
Returns
System_SUCCESS if enable passes, else return SystemP_FAILURE

◆ Bootloader_socGetBootSeqOid()

void Bootloader_socGetBootSeqOid ( uint8_t *  boot_seq_oid)

API to get boot sequence oid.

Parameters
boot_seq_oid[in] pointer to integer array for populating boot sequence oid

◆ Bootloader_socCpuSetAppEntryPoint()

int32_t Bootloader_socCpuSetAppEntryPoint ( uint32_t  cpuId,
uintptr_t  entryPoint 
)

dummy api call