2 * Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6 * Distributed under the terms of the NewOS License.
10 #include "VMDeviceCache.h"
12 #include <slab/Slab.h>
16 VMDeviceCache::Init(addr_t baseAddress
, uint32 allocationFlags
)
18 fBaseAddress
= baseAddress
;
19 return VMCache::Init(CACHE_TYPE_DEVICE
, allocationFlags
);
24 VMDeviceCache::Read(off_t offset
, const generic_io_vec
*vecs
, size_t count
,
25 uint32 flags
, generic_size_t
*_numBytes
)
27 panic("device_store: read called. Invalid!\n");
33 VMDeviceCache::Write(off_t offset
, const generic_io_vec
* vecs
, size_t count
,
34 uint32 flags
, generic_size_t
* _numBytes
)
36 // no place to write, this will cause the page daemon to skip this store
42 VMDeviceCache::DeleteObject()
44 object_cache_delete(gDeviceCacheObjectCache
, this);