Mercurial > hg > Game > Cerium
view TaskManager/kernel/schedule/DmaManager.h @ 1413:5b024efa2429 draft
fix free on non copy DMA
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 19 Feb 2012 10:07:27 +0900 |
parents | 2187bd10f16d |
children | 94ac6d8e73aa |
line wrap: on
line source
#ifndef INCLUDED_DMA_MANAGER #define INCLUDED_DMA_MANAGER #include "base.h" #include "ListData.h" #include "types.h" enum dma_tag { DMA_READ = 25, DMA_READ2 = 26, DMA_WRITE = 27, // DMA_READ_IN_LIST = 29, // DMA_READ_OUT_LIST = 30, DMA_READ_TASKLIST = 31, }; class Scheduler; class DmaManager { public: virtual ~DmaManager() {}; BASE_NEW_DELETE(DmaManager); // API for DMA transfer virtual void *dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask) { return 0; } virtual void *dma_store(void *buf,memaddr addr, uint32 size, uint32 mask) { return 0; } virtual void free(void *buf) { free(buf); } virtual void *get_writebuf(Scheduler *s, memaddr addr, uint32 size) { return 0; } virtual void dma_wait(uint32 mask) {} virtual void dma_wait(uint32 mask, int cmd) {} virtual void show_dma_wait(Scheduler *s, int cpu) {} virtual void start_profile() {} // API for SPU inbound/outbound mailbox virtual void mail_write(memaddr data) {} virtual void mail_write_finish_list(memaddr data) {} virtual memaddr mail_read() { return 0; } virtual memaddr task_list_mail_read() { return 0; } // API for MFC list DMA transfer virtual void *dma_loadList(Scheduler *s, ListDataPtr list, void *,uint32 mask) { return 0; } virtual void dma_storeList(ListDataPtr, void *buff, uint32 mask) {} virtual void *get_writebuf(Scheduler *s, ListDataPtr, uint32 size) { return 0; } virtual uint32 get_tag() { return 0;} virtual void bound(ListData *) {} }; #endif