root / lab4 / .minix-src / include / minix / acpi.h @ 13
History | View | Annotate | Download (1.02 KB)
1 |
#include <sys/types.h> |
---|---|
2 |
#include <minix/ipc.h> |
3 |
|
4 |
#define ACPI_REQ_GET_IRQ 1 |
5 |
#define ACPI_REQ_MAP_BRIDGE 2 |
6 |
|
7 |
struct acpi_request_hdr {
|
8 |
endpoint_t m_source; /* message header */
|
9 |
u32_t request; |
10 |
}; |
11 |
|
12 |
/*
|
13 |
* Message to request dev/pin translation to IRQ by acpi using the acpi routing
|
14 |
* tables
|
15 |
*/
|
16 |
struct acpi_get_irq_req {
|
17 |
struct acpi_request_hdr hdr;
|
18 |
u32_t bus; |
19 |
u32_t dev; |
20 |
u32_t pin; |
21 |
u32_t __padding[4];
|
22 |
}; |
23 |
|
24 |
/* response from acpi to acpi_get_irq_req */
|
25 |
struct acpi_get_irq_resp {
|
26 |
endpoint_t m_source; /* message header */
|
27 |
i32_t irq; |
28 |
u32_t __padding[7];
|
29 |
}; |
30 |
|
31 |
/* message format for pci bridge mappings to acpi */
|
32 |
struct acpi_map_bridge_req {
|
33 |
struct acpi_request_hdr hdr;
|
34 |
u32_t primary_bus; |
35 |
u32_t secondary_bus; |
36 |
u32_t device; |
37 |
u32_t __padding[4];
|
38 |
}; |
39 |
|
40 |
struct acpi_map_bridge_resp {
|
41 |
endpoint_t m_source; /* message header */
|
42 |
int err;
|
43 |
u32_t __padding[7];
|
44 |
}; |
45 |
|
46 |
int acpi_init(void); |
47 |
int acpi_get_irq(unsigned bus, unsigned dev, unsigned pin); |
48 |
void acpi_map_bridge(unsigned int pbnr, unsigned int dev, unsigned int sbnr); |