1 /******************************************************************************* 2 * Copyright (C) 2018 Cadence Design Systems, Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining 5 * a copy of this software and associated documentation files (the 6 * "Software"), to use this Software with Cadence processor cores only and 7 * not with any other processors and platforms, subject to 8 * the following conditions: 9 * 10 * The above copyright notice and this permission notice shall be included 11 * in all copies or substantial portions of the Software. 12 * 13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 14 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 17 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 18 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 19 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 21 ******************************************************************************/ 22 23 /******************************************************************************* 24 * xf-runtime.h 25 * 26 * Platform-specific runtime data definitions 27 * 28 *******************************************************************************/ 29 30 #ifndef __XF_H 31 #error "xf-runtime.h mustn't be included directly" 32 #endif 33 34 /******************************************************************************* 35 * Includes 36 ******************************************************************************/ 37 38 /* ...platform HAL layer */ 39 #include "xf-hal.h" 40 41 /******************************************************************************* 42 * Mutex (opaque) data definition 43 ******************************************************************************/ 44 45 typedef volatile u32 xf_mutex_t[XF_CFG_CORES_NUM > 1 ? 1 : 0]; 46 47 /******************************************************************************* 48 * Local/remote/ISR IPC (opaque) data 49 ******************************************************************************/ 50 51 typedef struct xf_ipc_handle 52 { 53 /* ...variable we are waiting on */ 54 u32 wait; 55 56 } xf_ipc_handle_t; 57 58 /******************************************************************************* 59 * IPC events 60 ******************************************************************************/ 61 62 /* ...core resumption flag */ 63 #define XF_IPC_EVENT_CORE_ASSERT (1 << 0) 64 65 /* ...core waiting flag */ 66 #define XF_IPC_EVENT_CORE_WAIT (1 << 1) 67 68 /* ...shared memory assertion flag */ 69 #define XF_IPC_EVENT_SHMEM_ASSERT (1 << 2) 70 71 /* ...shared memory waiting flag */ 72 #define XF_IPC_EVENT_SHMEM_WAIT (1 << 3) 73 74 /* ...disabled interrupts status */ 75 #define XF_IPC_EVENT_ISR_OFF (1 << 4) 76 77 /******************************************************************************* 78 * Shared memory interface (opaque) data 79 ******************************************************************************/ 80 81 typedef void * xf_shmem_handle_t; 82