This interface is implemented by all PCI buses and its functions are
accessed by PCI devices. For further details, see Model Builder
User's Guide, chapter "Modeling PCI Devices".
Note:
The memory_access function is deprecated and must not be
called (as it is not implemented by Simics pci-bus object). The
interrupt_acknowledge, special_cycle,
add_default and remove_default functions are also
deprecated, but they are still implemented by Simics pci-bus and thus
callable.
SIM_INTERFACE(pci_bus) {
/* Deprecated; memory_access */
exception_type_t (*memory_access)(
conf_object_t *obj, generic_transaction_t *NOTNULL mem_op);
void (*raise_interrupt)(conf_object_t *obj, conf_object_t *NOTNULL dev,
int pin);
void (*lower_interrupt)(conf_object_t *obj, conf_object_t *NOTNULL dev,
int pin);
/* Deprecated; interrupt_acknowledge */
int (*interrupt_acknowledge)(conf_object_t *obj);
int (*add_map)(conf_object_t *obj, conf_object_t *dev,
addr_space_t space, conf_object_t *target,
map_info_t info);
int (*remove_map)(conf_object_t *obj, conf_object_t *dev,
addr_space_t space, int function);
void (*set_bus_number)(conf_object_t *obj, int bus_id);
void (*set_sub_bus_number)(conf_object_t *obj, int bus_id);
/* Deprecated; add_default, remove_default */
void (*add_default)(conf_object_t *obj, conf_object_t *dev,
addr_space_t space, conf_object_t *target,
map_info_t info);
void (*remove_default)(conf_object_t *obj, addr_space_t space);
void (*bus_reset)(conf_object_t *obj);
/* Deprecated; special_cycle */
void (*special_cycle)(conf_object_t *obj, uint32 value);
void (*system_error)(conf_object_t *obj);
int (*get_bus_address)(conf_object_t *obj, conf_object_t *NOTNULL dev);
void (*set_device_status)(conf_object_t *obj, int device, int function,
int enabled);
/* Memory spaces */
conf_object_t *(*configuration_space)(conf_object_t *obj);
conf_object_t *(*io_space)(conf_object_t *obj);
conf_object_t *(*memory_space)(conf_object_t *obj);
};
#define PCI_BUS_INTERFACE "pci_bus"