Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Dec 2017 21:20:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 224096] [PATCH] acpi bus driver: support resource allocation for buggy _CRS entries where fixed I/O ranges are defined like relocatable ones
Message-ID:  <bug-224096-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224096

            Bug ID: 224096
           Summary: [PATCH] acpi bus driver: support resource allocation
                    for buggy _CRS entries where fixed I/O ranges are
                    defined like relocatable ones
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: harald.boehm@fau.de
          Keywords: patch

Created attachment 188532
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D188532&action=
=3Dedit
Patch that adds call to bus_set_resource() for fixed I/O port ranges that
wrongly have been defined as relocatable ones

The MacBook Pro 11,3's (and possibly other versions') BIOS has a buggy _CRS
entry[0]. It is defined as a relocatable I/O range, although its actually a
fixed one. This bug currently prevents drivers from allocating the device's
resources, since the function acpi_res_set_iorange() in
sys/dev/acpica/acpi_resource.c just prints the message: "I/O range not
supported".

The attached patch adds a call to bus_set_resource(), if range_min + length=
 =3D=3D
range_max, which should be an indication that the BIOS is buggy and the
resource is actually a fixed I/O range. Additionally, a warning message is
printed if the system boots in verbose mode, since the _CRS should not cont=
ain
resource definitions like these. This was suggested by John Baldwin [1].=20

[0] The device's _CRS as returned by acpidump -td:
Device (GMUX)
{
    ...
    Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
    {
        IO (Decode16,
            0x0700,             // Range Minimum
            0x07FF,             // Range Maximum
            0x01,               // Alignment
            0xFF,               // Length
            )
    })
    ...
}
[1]
https://lists.freebsd.org/pipermail/freebsd-hackers/2017-November/051744.ht=
ml

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224096-8>