fixed resource descriptors

This commit is contained in:
Markus Fröschle
2013-11-05 05:47:11 +00:00
parent 70365f08e4
commit 942f417b13
4 changed files with 47 additions and 62 deletions

View File

@@ -91,14 +91,7 @@
#define PCI_IO_LIMIT_UPPER16 0x32
#define PCI_BRIDGE_CONTROL 0x3E /* Bridge Control */
typedef struct
{
unsigned long *subcookie;
unsigned long version;
long routine[45];
} PCI_COOKIE;
typedef struct /* structure of resource descriptor */
struct pci_resource_descriptor /* structure of resource descriptor */
{
unsigned short next; /* length of the following structure */
unsigned short flags; /* type of resource and misc. flags */
@@ -106,7 +99,7 @@ typedef struct /* structure of resource descriptor */
unsigned long length; /* length of resource */
unsigned long offset; /* offset PCI to phys. CPU Address */
unsigned long dmaoffset; /* offset for DMA-transfers */
} __attribute__ ((packed)) PCI_RSC_DESC;
} __attribute__ ((packed));
typedef struct /* structure of address conversion */
{
@@ -209,7 +202,7 @@ extern void pci_write_config_longword(uint16_t handle, uint16_t offset, uint32_t
extern void pci_write_config_word(uint16_t handle, uint16_t offset, uint16_t value);
extern void pci_write_config_byte(uint16_t handle, uint16_t offset, uint8_t value);
extern PCI_RSC_DESC *pci_get_resource(uint16_t handle);
extern struct pci_resource_descriptor *pci_get_resource(uint16_t handle);
extern int16_t pci_hook_interrupt(uint16_t handle, void *interrupt_handler, void *parameter);
extern int16_t pci_unhook_interrupt(uint16_t handle);