diff options
Diffstat (limited to 'drivers/staging/unisys/visorutil/memregion.h')
-rw-r--r-- | drivers/staging/unisys/visorutil/memregion.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/staging/unisys/visorutil/memregion.h b/drivers/staging/unisys/visorutil/memregion.h new file mode 100644 index 000000000000..a1fce7bb1e81 --- /dev/null +++ b/drivers/staging/unisys/visorutil/memregion.h @@ -0,0 +1,43 @@ +/* memregion.h + * + * Copyright © 2010 - 2013 UNISYS CORPORATION + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for more + * details. + */ + +#ifndef __MEMREGION_H__ +#define __MEMREGION_H__ + +#include "timskmod.h" + +/* MEMREGION is an opaque structure to users. + * Fields are declared only in the implementation .c files. + */ +typedef struct MEMREGION_Tag MEMREGION; + +MEMREGION *memregion_create(HOSTADDRESS physaddr, ulong nbytes); +MEMREGION *memregion_create_overlapped(MEMREGION *parent, + ulong offset, ulong nbytes); +int memregion_resize(MEMREGION *memregion, ulong newsize); +int memregion_read(MEMREGION *memregion, + ulong offset, void *dest, ulong nbytes); +int memregion_write(MEMREGION *memregion, + ulong offset, void *src, ulong nbytes); +void memregion_destroy(MEMREGION *memregion); +HOSTADDRESS memregion_get_physaddr(MEMREGION *memregion); +ulong memregion_get_nbytes(MEMREGION *memregion); +void memregion_dump(MEMREGION *memregion, char *s, + ulong off, ulong len, struct seq_file *seq); +void *memregion_get_pointer(MEMREGION *memregion); + +#endif |