From patchwork Thu May 26 12:04:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Renninger X-Patchwork-Id: 820612 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4QC488I024629 for ; Thu, 26 May 2011 12:04:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757369Ab1EZME3 (ORCPT ); Thu, 26 May 2011 08:04:29 -0400 Received: from cantor.suse.de ([195.135.220.2]:59922 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755268Ab1EZME3 (ORCPT ); Thu, 26 May 2011 08:04:29 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id B2B3D94A12; Thu, 26 May 2011 14:04:28 +0200 (CEST) From: Thomas Renninger Cc: Thomas Renninger , Robert.Moore@intel.com, rjwysocki@sisk.pl, youquan.song@intel.com, linux-acpi@vger.kernel.org, lenb@kernel.org, stable@kernel.org Subject: [PATCH] ACPI OSC: Increase buffer length of 3rd argument to 12 bytes Date: Thu, 26 May 2011 14:04:25 +0200 Message-Id: <1306411465-9779-1-git-send-email-trenn@suse.de> X-Mailer: git-send-email 1.7.3.4 To: unlisted-recipients:; (no To-header on input) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 26 May 2011 12:04:30 +0000 (UTC) This works around a widespread BIOS issue (seen on quite some Intel systems). There the BIOS tries to reference the capabilities buffer beyond the buffer's size. According to the ACPI spec the capabilities buffer (3rd argument) must at least be 4 bytes in size and is used to return error codes Compare with ACPI spec: 6.2.10 _OSC (Operating System Capabilities) But BIOSes reference up to 12 bytes without checking the size of the 3rd argument. This results in breaking out of interpreting/processing the _OSC method and in this error message: ACPI Error: Field [CPB3] at 96 exceeds Buffer [NULL] size 64 (bits) (20110112/dsopcode-597) ACPI Error: Method parse/execution failed [\_SB_._OSC] (Node ffff88081f4cdb78), AE_AML_BUFFER_LIMIT (20110112/psparse-536) This patch fixes the issue. Signed-off-by: Thomas Renninger CC: Robert.Moore@intel.com CC: rjwysocki@sisk.pl CC: youquan.song@intel.com CC: linux-acpi@vger.kernel.org CC: lenb@kernel.org CC: stable@kernel.org --- drivers/acpi/bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 9749980..feb97b3 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -526,7 +526,7 @@ static void acpi_bus_osc_support(void) struct acpi_osc_context context = { .uuid_str = sb_uuid_str, .rev = 1, - .cap.length = 8, + .cap.length = 12, .cap.pointer = capbuf, }; acpi_handle handle;