24 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* $Id: dev_gc.c,v 1.12 2007/02/16 17:17:51 debug Exp $ |
* $Id: dev_gc.c,v 1.14 2007/09/11 21:42:52 debug Exp $ |
28 |
* |
* |
29 |
* Grand Central Interrupt controller (used by MacPPC). |
* COMMENT: Grand Central Interrupt controller (used by MacPPC) |
30 |
*/ |
*/ |
31 |
|
|
32 |
#include <stdio.h> |
#include <stdio.h> |
185 |
} |
} |
186 |
break; |
break; |
187 |
|
|
188 |
|
case 0x1c: |
189 |
case 0x2c: |
case 0x2c: |
190 |
/* Avoid a debug message. */ |
/* Avoid a debug message. */ |
191 |
break; |
break; |
212 |
struct gc_data *d; |
struct gc_data *d; |
213 |
int i; |
int i; |
214 |
|
|
215 |
d = malloc(sizeof(struct gc_data)); |
CHECK_ALLOCATION(d = malloc(sizeof(struct gc_data))); |
|
if (d == NULL) { |
|
|
fprintf(stderr, "out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
216 |
memset(d, 0, sizeof(struct gc_data)); |
memset(d, 0, sizeof(struct gc_data)); |
217 |
|
|
218 |
/* Connect to the CPU: */ |
/* Connect to the CPU interrupt pin: */ |
219 |
INTERRUPT_CONNECT(devinit->interrupt_path, d->cpu_irq); |
INTERRUPT_CONNECT(devinit->interrupt_path, d->cpu_irq); |
220 |
|
|
221 |
/* |
/* |