mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-12-04 02:02:22 +00:00
1e1e3b618f
* *Modified Files: * .Sanitize ChangeLog *Added Files: * Makefile.in README.Cygnus config.in configure configure.in * device.c device.h dma.c dma.h engine-sky.c gencode.c gpuif.c * gpuif.h hardware.c hardware.h interp.c m16.igen mdmx.igen * mips.dc mips.igen pke0.c pke0.h pke1.c pke1.h r5900.igen * sim-main.h tconfig.in vr5400.igen vu0.c vu0.h vu1.c vu1.h
56 lines
1.2 KiB
C
56 lines
1.2 KiB
C
/* Copyright (C) 1998, Cygnus Solutions
|
|
|
|
*/
|
|
|
|
#include "sim-main.h"
|
|
|
|
#include "device.h"
|
|
#include "gpuif.h"
|
|
|
|
int
|
|
gpuif_io_read_buffer(device *me,
|
|
void *dest,
|
|
int space,
|
|
address_word addr,
|
|
unsigned nr_bytes,
|
|
sim_cpu *processor,
|
|
sim_cia cia)
|
|
{
|
|
printf("%s: Read!\n", me->name);
|
|
return nr_bytes;
|
|
}
|
|
|
|
int
|
|
gpuif_io_write_buffer(device *me,
|
|
const void *source,
|
|
int space,
|
|
address_word addr,
|
|
unsigned nr_bytes,
|
|
sim_cpu *processor,
|
|
sim_cia cia)
|
|
{
|
|
printf("%s: Write!\n", me->name);
|
|
return nr_bytes;
|
|
}
|
|
|
|
device gpuif_device =
|
|
{
|
|
"Gpuif deivce",
|
|
&gpuif_io_read_buffer,
|
|
&gpuif_io_write_buffer
|
|
};
|
|
|
|
void
|
|
gpuif_attach(SIM_DESC sd)
|
|
{
|
|
sim_core_attach (sd, NULL,
|
|
0 /*level*/,
|
|
access_read_write,
|
|
0 /*space ???*/,
|
|
GPUIF_REGISTER_WINDOW_START,
|
|
GPUIF_REGISTER_WINDOW_SIZE /*nr_bytes*/,
|
|
0 /*modulo*/,
|
|
&gpuif_device,
|
|
NULL /*buffer*/);
|
|
}
|