118 fatal(
"check_cpu_masks(): BeBox cpu int masks collide!\n");
125 uint64_t idata = 0, odata = 0;
130 switch (relative_addr) {
136 if (idata & 0x80000000)
140 check_cpu_masks(cpu, d);
148 if (idata & 0x80000000)
152 check_cpu_masks(cpu, d);
160 if (idata & 0x80000000)
173 odata &= ~0x02000000;
177 fatal(
"[ bebox: unimplemented write to 0x3f0:" 178 " 0x%08x ]\n", (
int)idata);
183 fatal(
"[ bebox: unimplemented read from 0x%08lx ]\n",
184 (
long)relative_addr);
186 fatal(
"[ bebox: unimplemented write to 0x%08lx: 0x" 187 "%08x ]\n", (
long)relative_addr, (
int)idata);
209 for (i=0; i<2; i++) {
210 if (i >= machine->
ncpus) {
211 fatal(
"FATAL ERROR: The machine seem to be " 212 "lacking cpu nr %i (0-based)\n", i);
216 snprintf(n,
sizeof(n),
"%s.cpu[%i]", machine->
path, i);
227 for (i=0; i<32; i++) {
228 struct interrupt templ;
229 snprintf(n,
sizeof(n),
"%s.bebox.%i",
231 memset(&templ, 0,
sizeof(templ));
241 0x7ffff000, 0x500, dev_bebox_access, d,
DM_DEFAULT, NULL);
uint64_t memory_readmax64(struct cpu *cpu, unsigned char *buf, int len)
void fatal(const char *fmt,...)
void(* interrupt_assert)(struct interrupt *)
void interrupt_handler_register(struct interrupt *templ)
void(* interrupt_deassert)(struct interrupt *)
#define CHECK_ALLOCATION(ptr)
#define INTERRUPT_ASSERT(istruct)
#define INTERRUPT_CONNECT(name, istruct)
void memory_writemax64(struct cpu *cpu, unsigned char *buf, int len, uint64_t data)
void memory_device_register(struct memory *mem, const char *, uint64_t baseaddr, uint64_t len, int(*f)(struct cpu *, struct memory *, uint64_t, unsigned char *, size_t, int, void *), void *extra, int flags, unsigned char *dyntrans_data)
struct interrupt cpu_irq[2]
addr & if(addr >=0x24 &&page !=NULL)
#define INTERRUPT_DEASSERT(istruct)