Home | History | Annotate | Download | only in osal
      1 /*
      2  *
      3  * Copyright 2012 Samsung Electronics S.LSI Co. LTD
      4  *
      5  * Licensed under the Apache License, Version 2.0 (the "License");
      6  * you may not use this file except in compliance with the License.
      7  * You may obtain a copy of the License at
      8  *
      9  *      http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  * Unless required by applicable law or agreed to in writing, software
     12  * distributed under the License is distributed on an "AS IS" BASIS,
     13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  * See the License for the specific language governing permissions and
     15  * limitations under the License.
     16  */
     17 
     18 /*
     19  * @file        Exynos_OSAL_SharedMemory.h
     20  * @brief
     21  * @author      SeungBeom Kim (sbcrux.kim (at) samsung.com)
     22  *              Taehwan Kim (t_h.kim (at) samsung.com)
     23  * @version     2.0.0
     24  * @history
     25  *   2012.02.20 : Create
     26  */
     27 
     28 #ifndef EXYNOS_OSAL_SHAREDMEMORY
     29 #define EXYNOS_OSAL_SHAREDMEMORY
     30 
     31 #include "OMX_Types.h"
     32 
     33 typedef enum _MEMORY_TYPE
     34 {
     35     NORMAL_MEMORY = 0x00,
     36     SECURE_MEMORY = 0x01,
     37     SYSTEM_MEMORY = 0x02
     38 } MEMORY_TYPE;
     39 
     40 #ifdef __cplusplus
     41 extern "C" {
     42 #endif
     43 
     44 OMX_HANDLETYPE Exynos_OSAL_SharedMemory_Open();
     45 void Exynos_OSAL_SharedMemory_Close(OMX_HANDLETYPE handle);
     46 OMX_PTR Exynos_OSAL_SharedMemory_Alloc(OMX_HANDLETYPE handle, OMX_U32 size, MEMORY_TYPE memoryType);
     47 void Exynos_OSAL_SharedMemory_Free(OMX_HANDLETYPE handle, OMX_PTR pBuffer);
     48 int Exynos_OSAL_SharedMemory_VirtToION(OMX_HANDLETYPE handle, OMX_PTR pBuffer);
     49 OMX_PTR Exynos_OSAL_SharedMemory_IONToVirt(OMX_HANDLETYPE handle, int ion_addr);
     50 
     51 #ifdef __cplusplus
     52 }
     53 #endif
     54 
     55 #endif
     56 
     57