dma_resource_test.cpp revision 730798eb999c92638144f6fb700e548d66a190e9
1317017Sdim/*
2317017Sdim * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3317017Sdim * Copyright 2008, Axel D��rfler, axeld@pinc-software.de.
4317017Sdim * Distributed under the terms of the MIT License.
5317017Sdim */
6317017Sdim
7317017Sdim#include <stdio.h>
8317017Sdim#include <string.h>
9317017Sdim
10320397Sdim#include <device_manager.h>
11320397Sdim
12317017Sdim#include <vm.h>
13317017Sdim
14317017Sdim#include "dma_resources.h"
15317017Sdim#include "io_requests.h"
16320397Sdim#include "IOScheduler.h"
17331838Sdim
18317017Sdim
19317017Sdim#define DMA_TEST_BLOCK_SIZE		512
20317017Sdim#define DMA_TEST_BUFFER_COUNT	10
21317017Sdim
22317017Sdim
23346296Sdimclass TestSuite;
24344213Sdim
25344213Sdimclass TestSuiteContext {
26346296Sdimpublic:
27346296Sdim							TestSuiteContext();
28317017Sdim							~TestSuiteContext();
29346296Sdim
30346296Sdim			status_t		Init(size_t size);
31346296Sdim
32346296Sdim			addr_t			DataBase() const { return fDataBase; }
33346296Sdim			addr_t			PhysicalDataBase() const
34346296Sdim								{ return fPhysicalDataBase; }
35346296Sdim
36346296Sdim			addr_t			CompareBase() const { return fCompareBase; }
37346296Sdim
38346296Sdim			size_t			Size() const { return fSize; }
39346296Sdim
40346296Sdimprivate:
41346296Sdim			area_id			fDataArea;
42346296Sdim			addr_t			fDataBase;
43346296Sdim			addr_t			fPhysicalDataBase;
44346296Sdim			area_id			fCompareArea;
45346296Sdim			addr_t			fCompareBase;
46346296Sdim			size_t			fSize;
47346296Sdim};
48346296Sdim
49346296Sdimclass Test : public DoublyLinkedListLinkImpl<Test> {
50346296Sdimpublic:
51