45 #define N_IRQC_INTERRUPTS 32 84 uint64_t idata = 0, odata = 0;
89 switch (relative_addr) {
96 fatal(
"[ irqc: WARNING! write to DEV_IRQC_IRQ ]\n");
103 fatal(
"[ irqc: WARNING! read from DEV_IRQC_MASK ]\n");
112 if (!old_assert && new_assert)
114 else if (old_assert && !new_assert)
122 fatal(
"[ irqc: WARNING! read from DEV_IRQC_UNMASK ]\n");
131 if (!old_assert && new_assert)
133 else if (old_assert && !new_assert)
139 fatal(
"[ irqc: unimplemented write to " 140 "offset 0x%x: data=0x%x ]\n", (
int)
141 relative_addr, (
int)idata);
143 fatal(
"[ irqc: unimplemented read from " 144 "offset 0x%x ]\n", (
int)relative_addr);
171 snprintf(n,
sizeof(n),
"%s.irqc.%i",
174 memset(&templ, 0,
sizeof(templ));
uint64_t memory_readmax64(struct cpu *cpu, unsigned char *buf, int len)
void fatal(const char *fmt,...)
void(* interrupt_assert)(struct interrupt *)
void irqc_interrupt_deassert(struct interrupt *interrupt)
#define N_IRQC_INTERRUPTS
void interrupt_handler_register(struct interrupt *templ)
void(* interrupt_deassert)(struct interrupt *)
#define CHECK_ALLOCATION(ptr)
void irqc_interrupt_assert(struct interrupt *interrupt)
#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)
addr & if(addr >=0x24 &&page !=NULL)
#define INTERRUPT_DEASSERT(istruct)