1 /* 2 * Copyright 2013, Jérôme Duval, korli@users.berlios.de. 3 * Copyright 2010, Michael Lotz, mmlr@mlotz.ch. All Rights Reserved. 4 * Distributed under the terms of the MIT License. 5 */ 6 #ifndef _PCI_x86_MSI_H 7 #define _PCI_x86_MSI_H 8 9 #include <OS.h> 10 #include <SupportDefs.h> 11 12 13 // Message Signaled Interrupts 14 15 16 // MSI 17 typedef struct msi_info { 18 bool msi_capable; 19 uint8 capability_offset; 20 uint8 message_count; 21 uint8 configured_count; 22 uint8 start_vector; 23 uint16 control_value; 24 uint16 data_value; 25 uint64 address_value; 26 } msi_info; 27 28 29 // MSI-X 30 typedef struct msix_info { 31 bool msix_capable; 32 uint8 capability_offset; 33 uint8 message_count; 34 uint8 table_bar; 35 uint32 table_offset; 36 area_id table_area_id; 37 addr_t table_address; 38 uint8 pba_bar; 39 uint32 pba_offset; 40 area_id pba_area_id; 41 addr_t pba_address; 42 uint8 configured_count; 43 uint8 start_vector; 44 uint16 control_value; 45 uint16 data_value; 46 uint64 address_value; 47 } msix_info; 48 49 50 // HyperTransport MSI mapping 51 typedef struct ht_mapping_info { 52 bool ht_mapping_capable; 53 uint8 capability_offset; 54 uint16 control_value; 55 uint64 address_value; 56 } ht_mapping_info; 57 58 59 #endif // _PCI_x86_MSI_H 60