1 /*---------------------------------------------------------------------------*
2 
3   Copyright (C) Nintendo.  All rights reserved.
4 
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law.  They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10 
11  *---------------------------------------------------------------------------*/
12 /*
13  * Common memory resource query structure and defines
14  * Created by Gunter M. Zieber 11/11/11
15  */
16 #ifndef __MEM_RES_H__
17 #define __MEM_RES_H__
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 typedef struct {
24     unsigned long int   size;
25     unsigned long int   alignment;
26     unsigned long int   quantum;
27     unsigned long int   num_quanta;
28     unsigned long int   max_quanta;
29     unsigned long int   flags;
30     unsigned long int   links[3];
31 } mem_res_query_element_t;
32 
33 #define FLAG_MEM_RES_DMA                (1 << 0)
34 #define FLAG_MEM_RES_ITD                (1 << 1)
35 #define FLAG_MEM_RES_ITD_PAYLOAD        (1 << 2)
36 #define FLAG_MEM_RES_IPC                (1 << 3)
37 #define FLAG_MEM_RES_INST               (1 << 4)
38 #define FLAG_MEM_RES_OVERPROVIDE        (1 << 5)
39 
40 typedef struct {
41     unsigned long int           num_mem_res;
42     mem_res_query_element_t*    p_mem_res;
43 } mem_res_query_t;
44 
45 typedef struct {
46     unsigned long int   size;
47     unsigned long int   alignment;
48     unsigned long int   quantum;
49     unsigned long int   num_quanta;
50     unsigned long int   flags;
51     void*               pv;
52 } mem_res_element_t;
53 
54 typedef struct {
55     unsigned long int   num_mem_res;
56     mem_res_element_t*  p_mem_res;
57 } mem_res_t;
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif  // __MEM_RES_H__
64