From owner-freebsd-bugs@freebsd.org Mon Dec 4 21:20:41 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4C9EE6B072 for ; Mon, 4 Dec 2017 21:20:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89BE779EDB for ; Mon, 4 Dec 2017 21:20:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vB4LKf44087516 for ; Mon, 4 Dec 2017 21:20:41 GMT (envelope-from bugzilla-noreply@freebsd.org) 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 Date: Mon, 04 Dec 2017 21:20:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: harald.boehm@fau.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 21:20:41 -0000 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.=