memregion.h revision 3db5540dfd889bc008db3ff2f868cce0f6fb2a04
1/* memregion.h 2 * 3 * Copyright (C) 2010 - 2013 UNISYS CORPORATION 4 * All rights reserved. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or (at 9 * your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, but 12 * WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or 14 * NON INFRINGEMENT. See the GNU General Public License for more 15 * details. 16 */ 17 18#ifndef __MEMREGION_H__ 19#define __MEMREGION_H__ 20 21#include "timskmod.h" 22 23/* MEMREGION is an opaque structure to users. 24 * Fields are declared only in the implementation .c files. 25 */ 26typedef struct MEMREGION_Tag MEMREGION; 27 28MEMREGION *visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes); 29MEMREGION *visor_memregion_create_overlapped(MEMREGION *parent, 30 ulong offset, ulong nbytes); 31int visor_memregion_resize(MEMREGION *memregion, ulong newsize); 32int visor_memregion_read(MEMREGION *memregion, 33 ulong offset, void *dest, ulong nbytes); 34int visor_memregion_write(MEMREGION *memregion, 35 ulong offset, void *src, ulong nbytes); 36void visor_memregion_destroy(MEMREGION *memregion); 37HOSTADDRESS visor_memregion_get_physaddr(MEMREGION *memregion); 38ulong visor_memregion_get_nbytes(MEMREGION *memregion); 39void memregion_dump(MEMREGION *memregion, char *s, 40 ulong off, ulong len, struct seq_file *seq); 41void __iomem *visor_memregion_get_pointer(MEMREGION *memregion); 42 43#endif 44