1 /* 2 * Copyright 2008-2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. 4 * Distributed under the terms of the MIT License. 5 * 6 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 7 * Distributed under the terms of the NewOS License. 8 */ 9 #ifndef _KERNEL_VM_STORE_DEVICE_H 10 #define _KERNEL_VM_STORE_DEVICE_H 11 12 13 #include <vm/VMCache.h> 14 15 16 class VMDeviceCache : public VMCache { 17 public: 18 status_t Init(addr_t baseAddress, uint32 allocationFlags); 19 20 virtual bool HasPage(off_t offset); 21 22 virtual status_t Read(off_t offset, const iovec *vecs, size_t count, 23 uint32 flags, size_t *_numBytes); 24 virtual status_t Write(off_t offset, const iovec *vecs, size_t count, 25 uint32 flags, size_t *_numBytes); 26 27 virtual status_t Fault(struct VMAddressSpace* addressSpace, 28 off_t offset); 29 30 private: 31 addr_t fBaseAddress; 32 }; 33 34 35 #endif /* _KERNEL_VM_STORE_DEVICE_H */ 36