1 /*
2 * gcmem.h
3 *
4 * Copyright (C) 2010-2011 Vivante Corporation.
5 *
6 * This package is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
11 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
12 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 */
15 #ifndef GCMEM_H
16 #define GCMEM_H
18 struct gcpage {
19 unsigned int order;
20 struct page *pages;
22 unsigned int size;
23 unsigned int physical;
24 unsigned int *logical;
25 };
27 enum gcerror gc_alloc_noncached(struct gcpage *p, unsigned int size);
28 void gc_free_noncached(struct gcpage *p);
30 enum gcerror gc_alloc_cached(struct gcpage *p, unsigned int size);
31 void gc_free_cached(struct gcpage *p);
32 void gc_flush_cached(struct gcpage *p);
33 void gc_flush_region(unsigned int physical, void *logical,
34 unsigned int offset, unsigned int size);
36 #endif