Multicore Manager (MCMGR) User's Guide  Rev. 2.0.1
NXP Semiconductors
mcmgr.h
1 /*
2  * Copyright (c) 2014-2016, Freescale Semiconductor, Inc.
3  * Copyright 2016 NXP
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without modification,
7  * are permitted provided that the following conditions are met:
8  *
9  * o Redistributions of source code must retain the above copyright notice, this list
10  * of conditions and the following disclaimer.
11  *
12  * o Redistributions in binary form must reproduce the above copyright notice, this
13  * list of conditions and the following disclaimer in the documentation and/or
14  * other materials provided with the distribution.
15  *
16  * o Neither the name of the copyright holder nor the names of its
17  * contributors may be used to endorse or promote products derived from this
18  * software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 #ifndef MCMGR_H
33 #define MCMGR_H
34 
35 #include <stdint.h>
36 
43 typedef enum _mcmgr_status
44 {
52 
54 typedef enum _mcmgr_boot_source
55 {
63 
66 {
74 
76 typedef enum _mcmgr_core_status
77 {
83 
85 typedef enum _mcmgr_core_type
86 {
94 
96 typedef enum _mcmgr_src_addr
97 {
103 
105 typedef enum _mcmgr_core
106 {
111 } mcmgr_core_t;
112 
114 typedef enum _mcmgr_start_mode
115 {
120 
122 
125 #define MCMGR_NO_STARTUP_DATA (0)
126 
133 {
134  kMCMGR_Version = 0x00020001
135 };
136 
137 #if defined(__cplusplus)
138 extern "C" {
139 #endif // __cplusplus
140 
147 
162 mcmgr_status_t MCMGR_StartCore(mcmgr_core_t coreNum, void *bootAddress, uint32_t startupData, mcmgr_start_mode_t mode);
163 
175 mcmgr_status_t MCMGR_GetStartupData(mcmgr_core_t coreNum, uint32_t *startupData);
176 
187 
198 
211 mcmgr_status_t MCMGR_LoadApp(mcmgr_core_t coreNum, void *srcAddr, mcmgr_src_addr_t srcAddrType);
212 
220 int32_t MCMGR_GetVersion(void);
221 
234 mcmgr_status_t MCMGR_MapAddress(void *inAddress, void **outAddress, mcmgr_core_t srcCore, mcmgr_core_t destCore);
235 
249  mcmgr_core_property_t property,
250  void *value,
251  uint32_t *length);
252 
260 uint32_t MCMGR_GetCoreCount(void);
261 
270 
271 #if defined(__cplusplus)
272 }
273 #endif // __cplusplus
274 
277 #endif
Enum value for starting synchronously.
Definition: mcmgr.h:117
_mcmgr_core_status
Enumeration that defines property value of core status.
Definition: mcmgr.h:76
mcmgr_status_t MCMGR_SignalReady(mcmgr_core_t coreNum)
Signal to the master core, that we are ready.
Core is holded in reset.
Definition: mcmgr.h:79
Operation was success.
Definition: mcmgr.h:46
Status of Core.
Definition: mcmgr.h:68
enum _mcmgr_boot_source mcmgr_boot_source_t
Enumeration that defines a boot source address for non-primary cores.
mcmgr_status_t MCMGR_StartCore(mcmgr_core_t coreNum, void *bootAddress, uint32_t startupData, mcmgr_start_mode_t mode)
Start a selected core.
enum _mcmgr_core_property mcmgr_core_property_t
Enumeration that defines property of core.
Enum value for Core 1.
Definition: mcmgr.h:110
Operation was not success.
Definition: mcmgr.h:48
mcmgr_status_t MCMGR_GetCoreProperty(mcmgr_core_t coreNum, mcmgr_core_property_t property, void *value, uint32_t *length)
Get property of the CPU core.
mcmgr_version_enum
Version of MCMGR.
Definition: mcmgr.h:132
uint32_t MCMGR_GetCoreCount(void)
Return the count of cores in a multicore system.
_mcmgr_core_property
Enumeration that defines property of core.
Definition: mcmgr.h:65
Enum value for Core 0.
Definition: mcmgr.h:108
Boot from IMEM Base.
Definition: mcmgr.h:61
enum _mcmgr_core mcmgr_core_t
Enumeration that defines core.
mcmgr_status_t MCMGR_LoadApp(mcmgr_core_t coreNum, void *srcAddr, mcmgr_src_addr_t srcAddrType)
Load App image to RAM.
Cortex M4.
Definition: mcmgr.h:92
mcmgr_status_t MCMGR_GetStartupData(mcmgr_core_t coreNum, uint32_t *startupData)
Get startup data for the slave core.
Cortex M0.
Definition: mcmgr.h:88
Address of memory.
Definition: mcmgr.h:101
_mcmgr_src_addr
Enumeration that defines source address of the app image.
Definition: mcmgr.h:96
mcmgr_status_t MCMGR_MapAddress(void *inAddress, void **outAddress, mcmgr_core_t srcCore, mcmgr_core_t destCore)
Map address between two address spaces.
mcmgr_core_t MCMGR_GetCurrentCore(void)
Get current CPU core.
Address of file.
Definition: mcmgr.h:99
_mcmgr_core_type
Enumeration that defines property value of core type.
Definition: mcmgr.h:85
Power Mode of Core.
Definition: mcmgr.h:72
enum _mcmgr_src_addr mcmgr_src_addr_t
Enumeration that defines source address of the app image.
mcmgr_status_t MCMGR_StopCore(mcmgr_core_t coreNum)
Stop a selected core.
mcmgr_status_t MCMGR_Init(void)
Initialize the multicore manager.
Enum value for starting asynchronously.
Definition: mcmgr.h:119
Function is not implemented.
Definition: mcmgr.h:50
enum _mcmgr_status mcmgr_status_t
Enumeration that defines MCMGR function return status codes.
_mcmgr_status
Enumeration that defines MCMGR function return status codes.
Definition: mcmgr.h:43
enum _mcmgr_start_mode mcmgr_start_mode_t
Enumeration that defines start type.
Boot from 0x0.
Definition: mcmgr.h:57
enum _mcmgr_core_type mcmgr_core_type_t
Enumeration that defines property value of core type.
int32_t MCMGR_GetVersion(void)
Get version of MCMGR.
_mcmgr_boot_source
Enumeration that defines a boot source address for non-primary cores.
Definition: mcmgr.h:54
Cortex M0+.
Definition: mcmgr.h:90
Type of Core.
Definition: mcmgr.h:70
_mcmgr_start_mode
Enumeration that defines start type.
Definition: mcmgr.h:114
Core in not in reset.
Definition: mcmgr.h:81
_mcmgr_core
Enumeration that defines core.
Definition: mcmgr.h:105
enum _mcmgr_core_status mcmgr_core_status_t
Enumeration that defines property value of core status.
Boot from DMEM Base.
Definition: mcmgr.h:59