X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FInterfaces%2FUDI%2Ftrans%2Fbus_pci.c;h=32f2eea7c2f6c01eaeec1e89a06a2b475a63f051;hb=2baa2d6adf2fc9bddb9b4bf439b42ac3bd4906ba;hp=0dac0c2b5b0869bead05b0e330ac9ecedd1c9e9e;hpb=743dfbb0e8f53a92333c6212f20cc65afaa05cf2;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Interfaces/UDI/trans/bus_pci.c b/KernelLand/Modules/Interfaces/UDI/trans/bus_pci.c index 0dac0c2b..32f2eea7 100644 --- a/KernelLand/Modules/Interfaces/UDI/trans/bus_pci.c +++ b/KernelLand/Modules/Interfaces/UDI/trans/bus_pci.c @@ -7,6 +7,7 @@ */ #include #include +#include #include #include // acess @@ -103,7 +104,16 @@ void pci_enumerate_req(udi_enumerate_cb_t *cb, udi_ubit8_t enumeration_level) Uint16 ven, dev; Uint32 class; PCI_GetDeviceInfo(rdata->cur_iter, &ven, &dev, &class); - + Uint8 revision; + PCI_GetDeviceVersion(rdata->cur_iter, &revision); + Uint16 sven, sdev; + PCI_GetDeviceSubsys(rdata->cur_iter, &sven, &sdev); + + udi_strcpy(attr_list->attr_name, "identifier"); + attr_list->attr_length = snprintf(attr_list->attr_value, + "%04x%04x%02x%04x%04x", + ven, dev, revision, sven, sdev); + attr_list ++; DPT_SET_ATTR_STRING(attr_list, "bus_type", "pci", 3); attr_list ++; DPT_SET_ATTR32(attr_list, "pci_vendor_id", ven); @@ -133,6 +143,8 @@ void pci_bridge_ch_event_ind(udi_channel_event_cb_t *cb) } void pci_bind_req(udi_bus_bind_cb_t *cb) { + // TODO: "Lock" PCI device + // TODO: DMA constraints udi_bus_bind_ack(cb, 0, UDI_DMA_LITTLE_ENDIAN, UDI_OK); }