AM64x MCU+ SDK  08.02.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...
 

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)
 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 ()
 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...
 
void Bootloader_socLoadSysFw (void)
 Loads the System Controller Firmware (SYSFW) onto the Cortex M3 in AM64x SOC. 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...
 
int32_t Bootloader_socSecHandover (void)
 API to trigger the security handover from SYSFW. More...
 
void Bootloader_socLoadSysFwLinux (void)
 Loads the System Controller Firmware (SYSFW) onto the Cortex M3 in AM64x SOC (When SBL boots Linux) More...
 
void Bootloader_socGetSBLMem (uint32_t *start, uint32_t *end)
 API to get the scratch memory limits used by SBL. If the application tries to load in this region, it might over write SBL. More...
 

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)

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
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 ( )

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_socLoadSysFw()

void Bootloader_socLoadSysFw ( void  )

Loads the System Controller Firmware (SYSFW) onto the Cortex M3 in AM64x SOC.

The SYSFW is a special controller firmware loaded onto the Device Management and Security Controller (DMSC) core, i.e the Cortex M3. The SYSFW controls a multitude of things in the SOC, including Power, Clock, Resource Management and Security. So it is important to load the SYSFW onto the DMSC core before booting any application. Typically this API is called before anything else in the main loop of a Bootloader application

◆ 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_socSecHandover()

int32_t Bootloader_socSecHandover ( void  )

API to trigger the security handover from SYSFW.

Returns
SystemP_SUCCESS on success, else failure

◆ Bootloader_socLoadSysFwLinux()

void Bootloader_socLoadSysFwLinux ( void  )

Loads the System Controller Firmware (SYSFW) onto the Cortex M3 in AM64x SOC (When SBL boots Linux)

The SYSFW is a special controller firmware loaded onto the Device Management and Security Controller (DMSC) core, i.e the Cortex M3. The SYSFW controls a multitude of things in the SOC, including Power, Clock, Resource Management and Security. So it is important to load the SYSFW onto the DMSC core before booting any application. Typically this API is called before anything else in the main loop of a Bootloader application

◆ Bootloader_socGetSBLMem()

void Bootloader_socGetSBLMem ( uint32_t *  start,
uint32_t *  end 
)

API to get the scratch memory limits used by SBL. If the application tries to load in this region, it might over write SBL.