ACPI pci-to-pci bridges

- every pci device which implements _PRT acpi method is considered to
  be a pci-to-pci bridge

- acpi driver constructs a hierarchy of pci-to-pci bridges

- when pci driver identifies a pci-to-pci bridge it tells acpi driver
  what is the primary and the secondary bus for this device

- when pci requests IRQ routing information from acpi, it passes the
  bus number too to be able to identify the device accurately
This commit is contained in:
Tomas Hruby
2010-10-21 17:07:09 +00:00
parent 98c93e76d7
commit 40bfed28cd
7 changed files with 392 additions and 159 deletions

View File

@@ -2,6 +2,7 @@
#include <minix/ipc.h>
#define ACPI_REQ_GET_IRQ 1
#define ACPI_REQ_MAP_BRIDGE 2
struct acpi_request_hdr {
endpoint_t m_source; /* message header */
@@ -14,9 +15,10 @@ struct acpi_request_hdr {
*/
struct acpi_get_irq_req {
struct acpi_request_hdr hdr;
u32_t bus;
u32_t dev;
u32_t pin;
u32_t __padding[5];
u32_t __padding[4];
};
/* response from acpi to acpi_get_irq_req */
@@ -25,3 +27,18 @@ struct acpi_get_irq_resp {
i32_t irq;
u32_t __padding[7];
};
/* message format for pci bridge mappings to acpi */
struct acpi_map_bridge_req {
struct acpi_request_hdr hdr;
u32_t primary_bus;
u32_t secondary_bus;
u32_t device;
u32_t __padding[4];
};
struct acpi_map_bridge_resp {
endpoint_t m_source; /* message header */
int err;
u32_t __padding[7];
};