Fwd: ACPICA missing support for device I/O port ranges
Andriy Gapon
avg at FreeBSD.org
Tue Nov 21 09:47:51 UTC 2017
Perhaps you would be interested in this message on hackers at .
-------- Forwarded Message --------
Subject: ACPICA missing support for device I/O port ranges
Date: Sat, 18 Nov 2017 18:52:54 +0100
From: Harald Böhm <harald.boehm at fau.de>
To: 'freebsd-hackers at freebsd.org' <freebsd-hackers at freebsd.org>
Hi all,
I've been working on a device driver lately and was having trouble
allocating its resources using bus_alloc_resource_any(), although its
I/O ports can be read from its _CRS.
This is the output of acpidump -td:
Device (GMUX)
{
...
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
IO (Decode16,
0x0700, // Range Minimum
0x07FF, // Range Maximum
0x01, // Alignment
0xFF, // Length
)
})
...
}
After digging into the code in /sys/dev/acpica/acpi_resources.c I was
able to find the problem. The function acpi_res_set_iorange(), which
seems to be responsible for calling bus_set_resource() is just a
function stub that prints a message that I/O ranges are not supported.
static void
acpi_res_set_iorange(device_t dev, void *context, uint64_t low,
uint64_t high, uint64_t length, uint64_t align)
{
struct acpi_res_context *cp = (struct acpi_res_context *)context;
if (cp == NULL)
return;
device_printf(dev, "I/O range not supported\n");
}
After adding a call to bus_set_resource() to that function, I was able
to allocate the device's resources.
Does anyone know, why the function has not been implemented or why I/O
ranges are not supported?
Thanks,
Harald
_______________________________________________
More information about the freebsd-acpi
mailing list