dev_lca.cc Source File
Back to the index.
Go to the documentation of this file.
47 #define LCA_ISA_BASE (LCA_PCI_SIO + 0x10000000)
48 #define LCA_ISA_MEMBASE (LCA_PCI_SIO + 0x18000000)
72 fatal(
"lca_interrupt_assert: TODO\n");
84 fatal(
"lca_interrupt_deassert: TODO\n");
91 uint64_t idata = 0, odata = 0;
92 int tag, bus, dev, func,
reg;
105 reg = (relative_addr >> 5) & 0xfc;
106 tag = (relative_addr >> 5) & ~0xff;
124 for (dev=0; dev<21; dev++)
125 if (tag & (0x800 << dev))
133 fatal(
"TODO. Non-zero bus.\n");
137 func = (tag >> 8) & 7;
143 &odata : &idata, len, writeflag);
159 ofs = relative_addr & 3;
161 fatal(
"[ ofs=%i len=%i in lca_isa access function. "
162 "aborting ]\n", ofs, len);
167 byte =
data[ofs % len];
169 relative_addr, &
byte, 1, writeflag,
CACHE_NONE);
175 for (i=0; i<len; i++)
176 data[i] = i == ofs?
byte : 0x00;
184 uint64_t idata = 0, odata = 0;
204 fatal(
"TODO: Write to unimplemented bit of"
205 " IOC_CONF: 0x%x\n", (
int)idata);
223 fatal(
"TODO: LCA_IOC_TB_ENA value "
224 " (0x%" PRIx64
") has unimplemented "
225 "bits.\n", (uint64_t)idata);
237 if (idata != 0ULL && idata != 0x300800000ULL) {
238 fatal(
"TODO: LCA_IOC_W_BASE0 value differs"
239 " (0x%" PRIx64
") from the only implemented"
240 " values\n", (uint64_t)idata);
252 if (idata != 0x700000ULL) {
253 fatal(
"TODO: LCA_IOC_W_MASK0 value differs"
254 " (0x%" PRIx64
") from the only implemented"
255 " value\n", (uint64_t)idata);
276 if (idata != 0x240000000ULL) {
277 fatal(
"TODO: LCA_IOC_W_BASE1 value differs"
278 " (0x%" PRIx64
") from the only implemented"
279 " value\n", (uint64_t)idata);
291 if (idata != 0x3ff00000ULL) {
292 fatal(
"TODO: LCA_IOC_W_MASK1 value differs"
293 " (0x%" PRIx64
") from the only implemented"
294 " value\n", (uint64_t)idata);
309 default:
fatal(
"[ lca_ioc: unimplemented %s to offset 0x%x",
310 writeflag ==
MEM_WRITE?
"write" :
"read", (
int)
313 fatal(
": 0x%x", (
int)idata);
327 char *interrupt_path;
332 memset(d, 0,
sizeof(
struct lca_data));
342 "TODO: pci irq base",
345 "TODO: irqbase isa");
349 0, 7, 0,
"i82378zb");
352 LCA_PCI_CONF, 0x20000000, dev_lca_pci_conf_access, (
void *)d,
356 LCA_PCI_SIO, 0x10000 << 5, dev_lca_isa_access, (
void *)d,
360 LCA_IOC_BASE, 0x20000000, dev_lca_ioc_access, (
void *)d,
368 memset(&interrupt_template, 0,
sizeof(interrupt_template));
369 interrupt_template.
line = 0;
370 interrupt_template.
name = interrupt_path;
371 interrupt_template.
extra = d;
void(* interrupt_deassert)(struct interrupt *)
void bus_pci_setaddr(struct cpu *cpu, struct pci_data *pci_data, int bus, int device, int function, int reg)
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)
void bus_pci_data_access(struct cpu *cpu, struct pci_data *pci_data, uint64_t *data, int len, int writeflag)
void lca_interrupt_assert(struct interrupt *interrupt)
struct pci_data * bus_pci_init(struct machine *machine, const char *irq_path, uint64_t pci_actual_io_offset, uint64_t pci_actual_mem_offset, uint64_t pci_portbase, uint64_t pci_membase, const char *pci_irqbase, uint64_t isa_portbase, uint64_t isa_membase, const char *isa_irqbase)
void COMBINE() strlen(struct cpu *cpu, struct arm_instr_call *ic, int low_addr)
void fatal(const char *fmt,...)
#define LCA_IOC_W_T_BASE0
void lca_interrupt_deassert(struct interrupt *interrupt)
uint64_t memory_readmax64(struct cpu *cpu, unsigned char *buf, int len)
#define LCA_IOC_W_T_BASE1
struct bus_isa_data * bus_isa_init(struct machine *machine, char *interrupt_base_path, uint32_t bus_isa_flags, uint64_t isa_portbase, uint64_t isa_membase)
struct pci_data * pci_data
void(* interrupt_assert)(struct interrupt *)
void interrupt_handler_register(struct interrupt *templ)
DEVICE_ACCESS(lca_pci_conf)
void memory_writemax64(struct cpu *cpu, unsigned char *buf, int len, uint64_t data)
int(* memory_rw)(struct cpu *cpu, struct memory *mem, uint64_t vaddr, unsigned char *data, size_t len, int writeflag, int cache_flags)
void bus_pci_add(struct machine *machine, struct pci_data *pci_data, struct memory *mem, int bus, int device, int function, const char *name)
#define CHECK_ALLOCATION(ptr)
Generated on Tue Mar 24 2020 14:04:48 for GXemul by
1.8.17