api/l4io.h
00001 #if !defined(__L4VMM_INCLUDE_API_L4IO_H__)
00002 #define __L4VMM_INCLUDE_API_L4IO_H__
00003
00004
00005
00006
00007 #include <l4/generic_io/libio.h>
00008
00009 EXTERN_C_BEGIN
00010
00011
00012
00013
00014 L4_CV int l4vmm_pci_find_slot(unsigned int bus, unsigned int devfn, l4io_pci_dev_t *l4io_device);
00015 L4_CV int l4vmm_pci_find_device(unsigned short vendorID, unsigned short deviceID, l4io_pdev_t start,
00016 l4io_pci_dev_t *l4io_device);
00017 L4_CV int l4vmm_pci_find_class(unsigned long dev_class, l4io_pdev_t start, l4io_pci_dev_t *l4io_device);
00018
00019
00020
00021
00022 L4_CV int l4vmm_pci_read_config_space8(l4io_pdev_t handle, int offset, l4_uint8_t *value);
00023 L4_CV int l4vmm_pci_read_config_space16(l4io_pdev_t handle, int offset, l4_uint16_t *value);
00024 L4_CV int l4vmm_pci_read_config_space32(l4io_pdev_t handle, int offset, l4_uint32_t *value);
00025 L4_CV int l4vmm_pci_write_config_space8(l4io_pdev_t handle, int offset, l4_uint8_t value);
00026 L4_CV int l4vmm_pci_write_config_space16(l4io_pdev_t handle, int offset, l4_uint16_t value);
00027 L4_CV int l4vmm_pci_write_config_space32(l4io_pdev_t handle, int offset, l4_uint32_t value);
00028
00029
00030
00031
00032 L4_CV int l4vmm_pci_enable(l4io_pdev_t handle);
00033 L4_CV int l4vmm_pci_disable(l4io_pdev_t handle);
00034 L4_CV void l4vmm_pci_set_master(l4io_pdev_t handle);
00035 L4_CV int l4vmm_pci_set_pm(l4io_pdev_t handle, int state);
00036
00037
00038
00039
00040 L4_CV int l4vmm_iospace_request_region(l4_addr_t base, l4_size_t size);
00041 L4_CV int l4vmm_iospace_release_region(l4_addr_t base, l4_size_t size);
00042
00043
00044
00045
00046 L4_CV l4_addr_t l4vmm_mmio_request_region(l4_addr_t base, l4_size_t size, int flags);
00047 L4_CV int l4vmm_mmio_search_region(l4_addr_t address, l4_addr_t *base, l4_size_t *size);
00048 L4_CV int l4vmm_mmio_release_region(l4_addr_t base, l4_size_t size);
00049
00050 EXTERN_C_END
00051
00052 #endif
00053
00054
00055