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
17typedef struct msi_info {
18	bool	msi_capable;
19	uint8	capability_offset;
20	uint32	message_count;
21	uint32	configured_count;
22	uint32	start_vector;
23	uint16	control_value;
24	uint32	data_value;
25	uint64	address_value;
26} msi_info;
27
28
29// MSI-X
30typedef struct msix_info {
31	bool	msix_capable;
32	uint8	capability_offset;
33	uint32	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	uint32	configured_count;
43	uint32	start_vector;
44	uint16	control_value;
45	uint32	data_value;
46	uint64	address_value;
47} msix_info;
48
49
50// HyperTransport MSI mapping
51typedef 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