AM243x MCU+ SDK  08.01.00
bootloader_soc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * 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
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef BOOTLOADER_SOC_AM64X_H_
34 #define BOOTLOADER_SOC_AM64X_H_
35 
36 #include <drivers/hw_include/cslr_soc.h>
37 
45 typedef struct
46 {
47  uint32_t tisciProcId;
48  uint32_t tisciDevId;
49  uint32_t tisciClockId;
50  uint32_t defaultClockHz;
51  char coreName[8];
52 
54 
64 int32_t Bootloader_socCpuRequest(uint32_t cpuId);
65 
75 int32_t Bootloader_socCpuRelease(uint32_t cpuId);
76 
87 int32_t Bootloader_socCpuSetClock(uint32_t cpuId, uint32_t cpuHz);
88 
98 uint64_t Bootloader_socCpuGetClock(uint32_t cpuId);
99 
110 uint32_t Bootloader_socCpuGetClkDefault(uint32_t cpuId);
111 
121 int32_t Bootloader_socCpuPowerOnReset(uint32_t cpuId);
122 
134 int32_t Bootloader_socCpuResetRelease(uint32_t cpuId, uintptr_t entryPoint);
135 
142 
154 int32_t Bootloader_socCpuSetEntryPoint(uint32_t cpuId, uintptr_t entryPoint);
155 
167 
179 uint32_t Bootloader_socTranslateSectionAddr(uint32_t cslCoreId, uint32_t addr);
180 
188 uint32_t Bootloader_socRprcToCslCoreId(uint32_t rprcCoreId);
189 
196 
204 char* Bootloader_socGetCoreName(uint32_t cpuId);
205 
213 int32_t Bootloader_socMemInitCpu(uint32_t cpuId);
214 
221 
233 
234 #endif /* BOOTLOADER_SOC_AM64X_H_ */
Bootloader_socCpuSetClock
int32_t Bootloader_socCpuSetClock(uint32_t cpuId, uint32_t cpuHz)
Set the clock of a particular CPU in the AM64x SOC.
Bootloader_socGetCoreName
char * Bootloader_socGetCoreName(uint32_t cpuId)
Get the name of a core.
Bootloader_CoreBootInfo::tisciDevId
uint32_t tisciDevId
Definition: bootloader_soc.h:48
Bootloader_socCpuRequest
int32_t Bootloader_socCpuRequest(uint32_t cpuId)
Request for a particular CPU in the AM64x SOC.
Bootloader_socCpuPowerOnReset
int32_t Bootloader_socCpuPowerOnReset(uint32_t cpuId)
Do power-on-reset of a particular CPU in the AM64x SOC.
Bootloader_socCpuSetEntryPoint
int32_t Bootloader_socCpuSetEntryPoint(uint32_t cpuId, uintptr_t entryPoint)
Set entry point for self CPU in the AM64x SOC from reset.
Bootloader_CoreBootInfo::defaultClockHz
uint32_t defaultClockHz
Definition: bootloader_soc.h:50
addr
uint64_t addr
Definition: csl_udmap_tr.h:3
Bootloader_socCpuResetRelease
int32_t Bootloader_socCpuResetRelease(uint32_t cpuId, uintptr_t entryPoint)
Release a particular CPU in the AM64x SOC from reset.
Bootloader_CoreBootInfo::tisciProcId
uint32_t tisciProcId
Definition: bootloader_soc.h:47
Bootloader_CoreBootInfo
Data structure containing information about a core specific to the AM64x SOC.
Definition: bootloader_soc.h:46
Bootloader_CoreBootInfo::tisciClockId
uint32_t tisciClockId
Definition: bootloader_soc.h:49
Bootloader_socRprcToCslCoreId
uint32_t Bootloader_socRprcToCslCoreId(uint32_t rprcCoreId)
Obtain the CSL core ID of a CPU from its RPRC core ID.
Bootloader_socCpuGetClock
uint64_t Bootloader_socCpuGetClock(uint32_t cpuId)
Get the clock of a particular CPU in the AM64x SOC.
Bootloader_socCpuRelease
int32_t Bootloader_socCpuRelease(uint32_t cpuId)
Release a particular CPU in the AM64x SOC.
Bootloader_socLoadSysFwLinux
void Bootloader_socLoadSysFwLinux(void)
Loads the System Controller Firmware (SYSFW) onto the Cortex M3 in AM64x SOC (When SBL boots Linux)
Bootloader_socTranslateSectionAddr
uint32_t Bootloader_socTranslateSectionAddr(uint32_t cslCoreId, uint32_t addr)
Translate a CPU address to the SOC address wherever applicable.
Bootloader_socGetSelfCpuList
uint32_t * Bootloader_socGetSelfCpuList(void)
Get the list of self cpus in the SOC.
Bootloader_socCpuGetClkDefault
uint32_t Bootloader_socCpuGetClkDefault(uint32_t cpuId)
Get the default clock of a particular CPU in the AM64x SOC.
Bootloader_socSecHandover
int32_t Bootloader_socSecHandover(void)
API to trigger the security handover from SYSFW.
Bootloader_socCpuResetReleaseSelf
int32_t Bootloader_socCpuResetReleaseSelf()
Release self CPU in the AM64x SOC from reset.
Bootloader_socLoadSysFw
void Bootloader_socLoadSysFw(void)
Loads the System Controller Firmware (SYSFW) onto the Cortex M3 in AM64x SOC.
Bootloader_socMemInitCpu
int32_t Bootloader_socMemInitCpu(uint32_t cpuId)
Initialize the core memories of a specific core.