/********************************************************************************************
 *     LEGAL DISCLAIMER
 *
 *     (Header of MediaTek Software/Firmware Release or Documentation)
 *
 *     BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
 *     THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED
 *     FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS
 *     ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED,
 *     INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
 *     A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY
 *     WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
 *     INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK
 *     ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
 *     NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION
 *     OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
 *
 *     BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH
 *     RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION,
 *     TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE
 *     FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
 *
 *     THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS
 *     OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES.
 ************************************************************************************************/

/* These macros are to be declared in pointers in middleware/driver interfaces,
   to indicate the nature of the memory pointed by this pointer.

  Example: (rm_set parameter)

    typedef struct
    {
        UINT32 abc[32];  // Arrays don't need memory type macros
        UINT8* __cross_space__ pu1buf0;   // The driver can access addr_user_to_kernel(_pu1buf0) directly
        struct SOME_STRUCT_T* __local_space__ ptSome;  // The driver must do copy_from_user to access the content of this structure.
        VOID* __opaque__ pvTag; // pvTag is used for driver to pass it back to middleware.  Driver won't check the contents of pvTag.
    } DRV_FOO_SET_INFO_T;

*/


/* Add this macro to indicate that the memory pointed by this pointer is allocated by x_mem_alloc or static allocation.
   This memory buffer, after calling addr_user_to_kernel or addr_kernel_to_user, is accessible in the other space. */
#define __cross_space__

/* Add this macro to indicate that the memory pointed by this pointer is a local or global variable, or is allocated by new or malloc.
   This memory buffer is not accessible in the the other space unless doing copy_from_user or copy_to_user. */
#define __local_space__

/* Add this macro to indicate that the memory pointed by this pointer will not be dereferenced in the other space.
   Therefore, it doesn't matter how it's allocated. */
#define __opaque__

