Multicore Manager (MCMGR) User's Guide  Rev. 4.0.3
NXP Semiconductors
mcmgr.h
1 /*
2  * Copyright (c) 2014-2016, Freescale Semiconductor, Inc.
3  * Copyright 2016 NXP
4  * All rights reserved.
5  *
6  *
7  * SPDX-License-Identifier: BSD-3-Clause
8  */
9 
10 #ifndef MCMGR_H
11 #define MCMGR_H
12 
13 #include <stdbool.h>
14 #include <stdint.h>
15 
22 typedef enum _mcmgr_status
23 {
32 
34 
37 {
45 
47 typedef enum _mcmgr_core_type
48 {
58 
60 typedef enum _mcmgr_core
61 {
66 } mcmgr_core_t;
67 
69 typedef enum _mcmgr_start_mode
70 {
75 
77 
79 typedef enum _mcmgr_event_type_t
80 {
81  kMCMGR_RemoteCoreUpEvent = 1,
82  kMCMGR_RemoteCoreDownEvent,
83  kMCMGR_RemoteExceptionEvent,
84  kMCMGR_StartupDataEvent,
85  kMCMGR_FeedStartupDataEvent,
86  kMCMGR_RemoteRPMsgEvent,
87  kMCMGR_RemoteApplicationEvent,
88  kMCMGR_EventTableLength
90 
92 typedef void (*mcmgr_event_callback_t)(uint16_t data, void *context);
93 
95 #ifndef MCMGR_HANDLE_EXCEPTIONS
96 #define MCMGR_HANDLE_EXCEPTIONS (0)
97 #endif
98 
104 {
105  kMCMGR_Version = 0x00040003
106 };
107 
108 #if defined(__cplusplus)
109 extern "C" {
110 #endif // __cplusplus
111 
120 
129 
145 mcmgr_status_t MCMGR_StartCore(mcmgr_core_t coreNum, void *bootAddress, uint32_t startupData, mcmgr_start_mode_t mode);
146 
157 mcmgr_status_t MCMGR_GetStartupData(uint32_t *startupData);
158 
169 
177 int32_t MCMGR_GetVersion(void);
178 
192  mcmgr_core_property_t property,
193  void *value,
194  uint32_t *length);
195 
203 uint32_t MCMGR_GetCoreCount(void);
204 
213 
227 
239 mcmgr_status_t MCMGR_TriggerEvent(mcmgr_event_type_t type, uint16_t eventData);
240 
253 
254 #if defined(__cplusplus)
255 }
256 #endif // __cplusplus
257 
260 #endif
Enum value for starting synchronously.
Definition: mcmgr.h:72
enum _mcmgr_event_type_t mcmgr_event_type_t
Type definition of event types.
Operation was successful.
Definition: mcmgr.h:25
Status of core read from hardware core status flag.
Definition: mcmgr.h:39
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:65
Operation was not successful.
Definition: mcmgr.h:27
Operation result not ready.
Definition: mcmgr.h:31
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.
Cortex M33.
Definition: mcmgr.h:56
mcmgr_status_t MCMGR_EarlyInit(void)
Initialize the multicore manager, early init.
mcmgr_version_enum
Version of MCMGR.
Definition: mcmgr.h:103
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:36
mcmgr_status_t MCMGR_GetStartupData(uint32_t *startupData)
Get startup data for the slave core.
Enum value for Core 0.
Definition: mcmgr.h:63
enum _mcmgr_core mcmgr_core_t
Enumeration that defines core.
Cortex M4.
Definition: mcmgr.h:54
Cortex M0.
Definition: mcmgr.h:50
_mcmgr_event_type_t
Type definition of event types.
Definition: mcmgr.h:79
mcmgr_core_t MCMGR_GetCurrentCore(void)
Get current CPU core.
_mcmgr_core_type
Enumeration that defines property value of core type.
Definition: mcmgr.h:47
Power Mode of Core - implementation is hardware-specific.
Definition: mcmgr.h:43
mcmgr_status_t MCMGR_TriggerEventForce(mcmgr_event_type_t type, uint16_t eventData)
Trigger event handler, force version.
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:74
Function is not implemented.
Definition: mcmgr.h:29
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:22
mcmgr_status_t MCMGR_RegisterEvent(mcmgr_event_type_t type, mcmgr_event_callback_t callback, void *callbackData)
Register event handler.
mcmgr_status_t MCMGR_TriggerEvent(mcmgr_event_type_t type, uint16_t eventData)
Trigger event handler.
enum _mcmgr_start_mode mcmgr_start_mode_t
Enumeration that defines start type.
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.
Cortex M0+.
Definition: mcmgr.h:52
Type of Core.
Definition: mcmgr.h:41
_mcmgr_start_mode
Enumeration that defines start type.
Definition: mcmgr.h:69
_mcmgr_core
Enumeration that defines core.
Definition: mcmgr.h:60
void(* mcmgr_event_callback_t)(uint16_t data, void *context)
Type definition of event callback function pointer.
Definition: mcmgr.h:92