Implemented By
AM29F016, AM79C960, AM79C960-dml, AM79C973, BCM5703C, BCM5704C, CL-PD6729, CS8900A, CY82C693_0, CY82C693_1, CY82C693_2, DEC21041, DEC21140A, DEC21140A-dml, DEC21143, DS12887, DS12887-dml, DS1743P, DS17485, FAS366U, GT64120, GT64120-pci, ISP1040, ISP2200, LX164-IRQ-PLD, LX164-NVRAM, M5823, MD1535D-acpi, MD1535D-cfg, MD1535D-ide, MD1535D-isa, MD1535D-power, MD1535D-smb, MD1535D-unknown, MK48T08, NS16450, NS16550, PCF8584, PCI0646, SA1110-device, SIO82378ZB, SYM53C810, SYM53C875, Z8530, apic, apic-bus, apm, artesyn-pm-ppc, bitmask-translator, cassini, cassini_sub, cheerio-e2bus, cheerio-hme, cheetah-mmu, cheetah-plus-mmu, cpc700-gpt, cpc700-iic, cpc700-mc, cpc700-pci, cpc700-pi, cpc700-uic, ebony-fpga, empty-device, fiesta-tomatillo, flash-memory, fourport, hostfs, i21150, i21152, i21554-prim, i21554-scnd, i21555-prim, i21555-scnd, i8042, i82077, i8237x2, i82443bx, i82443bx_agp, i82461GX, i82468GX_0, i8254, i8259x2, ia64-itanium, ia64-itanium2, ide, io-apic, jaguar-mmu, jalapeno-mmu, leon2_cfg, leon2_ioport, leon2_irq, leon2_timer, leon2_uart, malta, niagara-dram-ctl, niagara-iob, niagara-l2c, open-pic, opencores_eth, panther-mmu, pc-config, pc-shadow, pci-bus, pcie-switch, piix4_ide, piix4_isa, piix4_power, piix4_usb, piix4_usb_dummy, ppc405gp-cpc, ppc405gp-ebc, ppc405gp-emac, ppc405gp-gpio, ppc405gp-iic, ppc405gp-mal, ppc405gp-mc, ppc405gp-pci, ppc405gp-uic, ppc440gp-cpc, ppc440gp-dma, ppc440gp-ebc, ppc440gp-emac, ppc440gp-gpio, ppc440gp-iic, ppc440gp-mal, ppc440gp-mc, ppc440gp-pci, ppc440gp-plb, ppc440gp-sram, ppc440gp-uic, ppc440gp-zmii, ppc440gx-cpc, ppc440gx-cpr, ppc440gx-dma, ppc440gx-ebc, ppc440gx-emac, ppc440gx-gpio, ppc440gx-iic, ppc440gx-l2c, ppc440gx-mal, ppc440gx-opb, ppc440gx-pci, ppc440gx-plb, ppc440gx-rgmii, ppc440gx-sdr, ppc440gx-sdram, ppc440gx-sram, ppc440gx-uic, ppc440gx-zmii, pyxis, ragexl, rom-device, sample-device, sample-device-python, sample-pci-device, sb16, sbbc-pci, sbus-hme, serengeti-schizo, set-memory, simple-byte-dump, strata-flash, sun4u-ac, sun4u-clockregs, sun4u-counter, sun4u-fasdma, sun4u-fhc, sun4u-sbus-speed, sun4u-simm-status, sun4u-systemregs, sun4u-temperature, sun4v-rtc, sunfire-psycho, sunfire-sysio, telos-basic-clock, telos-io-ports, telos-sfr, telos-timer, telos-usart, uPD66566S1016, vga, vga_pci, voodoo3, voodoo3-agp, x87_exception

This interface is implemented by devices that can be mapped into address spaces (including port spaces). The map() function is called for an object when it initially is mapped into the address space, and operation() is called when the object is accessed through an address space.

The obj argument is a pointer to the mapped object and map_info contains information about how and where the device is mapped into memory. The memory_or_io argument to map() identifies the type of the address space where the device is mapped. The mem_op argument to operate() contains information about the access.

The offset into the device mapping for the access is typically calculated in the following way:

offset = mem_op->physical_address - map_info.base + map_info.start

The return value from map() is currently not used and should be always be 0.

The exception_type_t type, that is the same as pseudo_exception_t, returned by the operation() function may be used to signal errors to Simics, but should in most cases be Sim_PE_No_Exception. If the device does not support inquiry accesses, it should return Sim_PE_Inquiry_Unhandled if mem_op->inqury is 1.

typedef enum {
} addr_space_t;
typedef int (*map_func_t)(conf_object_t *NOTNULL obj,
                          addr_space_t memory_or_io,
                          map_info_t map_info);
typedef exception_type_t (*operation_func_t)(
        conf_object_t *NOTNULL obj,
        generic_transaction_t *NOTNULL mem_op,
        map_info_t map_info);

typedef struct io_memory_interface {
        map_func_t map;
        operation_func_t operation;
} io_memory_interface_t;

#define IO_MEMORY_INTERFACE "io_memory"