Date: Tue, 21 Nov 2017 11:47:44 +0200 From: Andriy Gapon <avg@FreeBSD.org> To: "freebsd-acpi@freebsd.org" <freebsd-acpi@FreeBSD.org> Subject: Fwd: ACPICA missing support for device I/O port ranges Message-ID: <a3384d5b-0962-0d79-9e43-5b99d7cee966@FreeBSD.org> In-Reply-To: <e8699d73-f38b-3825-67ef-8d8f973e4ce0@fau.de> References: <e8699d73-f38b-3825-67ef-8d8f973e4ce0@fau.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Perhaps you would be interested in this message on hackers@.
-------- 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@fau.de>
To: 'freebsd-hackers@freebsd.org' <freebsd-hackers@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
_______________________________________________
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a3384d5b-0962-0d79-9e43-5b99d7cee966>
