Revision 3cbee15b hw/cuda.c
b/hw/cuda.c | ||
---|---|---|
1 | 1 |
/* |
2 |
* QEMU CUDA support
|
|
2 |
* QEMU PowerMac CUDA device support
|
|
3 | 3 |
* |
4 |
* Copyright (c) 2004 Fabrice Bellard |
|
4 |
* Copyright (c) 2004-2007 Fabrice Bellard |
|
5 |
* Copyright (c) 2007 Jocelyn Mayer |
|
5 | 6 |
* |
6 | 7 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
7 | 8 |
* of this software and associated documentation files (the "Software"), to deal |
... | ... | |
22 | 23 |
* THE SOFTWARE. |
23 | 24 |
*/ |
24 | 25 |
#include "vl.h" |
26 |
#include "ppc_mac.h" |
|
25 | 27 |
|
26 | 28 |
/* XXX: implement all timer modes */ |
27 | 29 |
|
... | ... | |
634 | 636 |
&cuda_readl, |
635 | 637 |
}; |
636 | 638 |
|
637 |
int cuda_init(qemu_irq irq)
|
|
639 |
void cuda_init (int *cuda_mem_index, qemu_irq irq)
|
|
638 | 640 |
{ |
639 | 641 |
CUDAState *s = &cuda_state; |
640 |
int cuda_mem_index; |
|
641 | 642 |
|
642 | 643 |
s->irq = irq; |
643 | 644 |
|
... | ... | |
653 | 654 |
set_counter(s, &s->timers[1], 0xffff); |
654 | 655 |
|
655 | 656 |
s->adb_poll_timer = qemu_new_timer(vm_clock, cuda_adb_poll, s); |
656 |
cuda_mem_index = cpu_register_io_memory(0, cuda_read, cuda_write, s); |
|
657 |
return cuda_mem_index; |
|
657 |
*cuda_mem_index = cpu_register_io_memory(0, cuda_read, cuda_write, s); |
|
658 | 658 |
} |
Also available in: Unified diff