changeset 1286:ddda67d4284c draft

added Prefetch Referenced Dma Manager
author Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
date Tue, 29 Nov 2011 17:31:48 +0900
parents e38a4f3e238d
children d126621d99b6
files TaskManager/Fifo/PreRefDmaManager.cc TaskManager/Fifo/PreRefDmaManager.h
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Fifo/PreRefDmaManager.cc	Tue Nov 29 17:31:48 2011 +0900
@@ -0,0 +1,13 @@
+#include "PreRefDmaManager.h"
+#include "Scheduler.h"
+#include "TaskManagerImpl.h"
+
+void *
+PreRefDmaManager::dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask)
+{
+#ifdef __CERIUM_FIFO__
+	asm("prefetcht0 %0"::"m"(addr):"memory");
+#endif // __CERIUM_FIFO__
+	return (void*)addr;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Fifo/PreRefDmaManager.h	Tue Nov 29 17:31:48 2011 +0900
@@ -0,0 +1,13 @@
+#ifndef INCLUDED_PRE_REFERENCED_DMA_MANAGER
+#define INCLUDED_PRE_REFERENCED_DMA_MANAGER
+
+#include "ReferencedDmaManager.h"
+
+class PreRefDmaManager : public ReferencedDmaManager {
+
+public:
+	/* functions */
+    virtual void *dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask);
+} ;
+
+#endif/* PRE_REFERENCED_DMA_MANAGER */