Function uacpi_kernel_pci_device_open

uacpi_status uacpi_kernel_pci_device_open(uacpi_pci_address address, uacpi_handle* out_handle)

Description

Open a PCI device at 'address' for reading & writing.

The device at 'address' might not actually exist on the system, in this case the api is allowed to return UACPI_STATUS_NOT_FOUND to indicate that, this error is handled gracefully by creating a dummy device internally that always returns 0xFF on reads and is no-op for writes. This is to support a common pattern in AML that probes for 0xFF reads to detect whether a device exists. The handle returned via 'out_handle' is used to perform IO on the configuration space of the device.