• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #include "GoldfishDma.h"
3 #include "dma_device.h"
4 
defaultDmaGetHostAddr(uint64_t guest_paddr)5 static void* defaultDmaGetHostAddr(uint64_t guest_paddr) { return nullptr; }
defaultDmaUnlock(uint64_t addr)6 static void defaultDmaUnlock(uint64_t addr) { }
7 
8 namespace emugl {
9 
10 emugl_dma_get_host_addr_t g_emugl_dma_get_host_addr = defaultDmaGetHostAddr;
11 emugl_dma_unlock_t g_emugl_dma_unlock = defaultDmaUnlock;
12 
set_emugl_dma_get_host_addr(emugl_dma_get_host_addr_t f)13 void set_emugl_dma_get_host_addr(emugl_dma_get_host_addr_t f) {
14     g_emugl_dma_get_host_addr = f;
15 }
16 
set_emugl_dma_unlock(emugl_dma_unlock_t f)17 void set_emugl_dma_unlock(emugl_dma_unlock_t f) {
18     g_emugl_dma_unlock = f;
19 }
20 
21 }  // namespace emugl
22