From owner-freebsd-acpi@FreeBSD.ORG Sat Apr 8 15:28:04 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6241616A406 for ; Sat, 8 Apr 2006 15:28:04 +0000 (UTC) (envelope-from Alex.Kovalenko@verizon.net) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D78543D53 for ; Sat, 8 Apr 2006 15:28:01 +0000 (GMT) (envelope-from Alex.Kovalenko@verizon.net) Received: from RabbitsDen ([70.21.195.141]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IXE00N7VTMO0NY1@vms048.mailsrvcs.net> for freebsd-acpi@freebsd.org; Sat, 08 Apr 2006 10:28:01 -0500 (CDT) Date: Sat, 08 Apr 2006 11:27:15 -0400 From: "Alexandre \"Sunny\" Kovalenko" In-reply-to: <20060405123021.S37871-200000@celery.georgewood.net> To: George Wood Message-id: <1144510035.19527.5.camel@RabbitsDen> MIME-version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-type: text/plain; charset=iso-8859-5 Content-transfer-encoding: 8BIT References: <20060405123021.S37871-200000@celery.georgewood.net> Cc: freebsd-acpi@freebsd.org Subject: Re: acpi thermal problem 'fix' (fwd) X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Apr 2006 15:28:04 -0000 On Wed, 2006-04-05 at 13:29 -0700, George Wood wrote: > my pc shuts down when cpu temp exceeds 60 C. > > since 'hw.acpi.thermal.tz0._CRT' is read only, I can't reset > the value there. > > The advice below, edit & recompile a dumped ASL, doesn't work for > me because the ASL will not compile. > > Do I have any alternative other than completely disabling acpi? > > George Wood > > I found a discussion of this online where Nate Lawson said this advice > was correct: > > Date: Thu, 23 Jun 2005 14:25:17 -0700 > From: Nate Lawson > Subject: Re: Changing temperature threshold > (trimmed, full message attached) > > Alexandre "Sunny" Kovalenko wrote: > >>When I try to raise hw.acpi.thermal.tz0._CRT to 85C (which is the > >>threshold in the BIOS setup) it doesn't work: > >> > >>bell# sysctl hw.acpi.thermal.tz0._CRT=3580 # 3580 tenths of > Kelvin=85C > >>sysctl: oid 'hw.acpi.thermal.tz0._CRT' is read only > ... > > One of the ways to deal with that would be to dump your ASL (see > > Handbook for guidance), find lines which look like: > > Method (_CRT, 0, NotSerialized) > > { > > Return (KELV (0x5d)) > > } > > modify them to your liking, compile ASL and override it during boot > > (instructions on how to compile and override are in Handbook as well). > > Please, note that actual value returned is in the 1/10th of the degree > > of Kelvin. Function KELV above has following ASL code associated with > > it: > > Method (KELV, 1, NotSerialized) > > { > > Store (Arg0, Local1) > > Multiply (0x0A, Local1, Local1) > > Add (Local1, 0x0AAC, Local1) > > Return (Local1) > > } > > Thermal management chapter of the ACPI specification should provide you > > with ample explanation of what this is all about. > > So I did as suggested, dumped th asl and looked for the _CRT method; > (the full .asl file is attached). Here's what I found: > > Method (_CRT, 0, NotSerialized) > { > Return (TRPC) > } > > > the only reference I found to TRPC was: > > DefinitionBlock ("DSDT.aml", "DSDT", 1, "KT400 ", "AWRDACPI", 4096) > { > ... > OperationRegion (TEMM, SystemMemory, 0x000FF810, 0x0C) > Field (TEMM, WordAcc, NoLock, Preserve) > { > TP1H, 16, > TP1L, 16, > TP2H, 16, > TP2L, 16, > TRPC, 16, > SENF, 16 > } > ... > } > > so I figured I'd just hard code a corrected temperature into the > _CRT method, recompile the asl and override (per the handbook). > > Before modifying the .asl, I decided to compile the dumped .asl so > I'd know what the 'normal' warnings were. Sadly, the compiler > dumped a pile of errors: > > ---------------- begin compiler output -------------- > > Intel ACPI Component Architecture > ASL Optimizing Compiler / AML Disassembler version 20041119 [Nov 3 2005] > Copyright (C) 2000 - 2004 Intel Corporation > Supports ACPI Specification Revision 2.0c > > acpidump.asl 427: Method (\_WAK, 1, NotSerialized) > Warning 2026 - ^ Reserved method must return a value (_WAK) > > acpidump.asl 470: Store (Local0, Local0) > Error 1013 - ^ Method local variable is not initialized (Local0) > > acpidump.asl 478: Store (Local0, Local0) > Error 1013 - ^ Method local variable is not initialized (Local0) > > acpidump.asl 2133: Method (STM, 0, Serialized) > Warning 2019 - ^ Not all control paths return a value (STM_) > > acpidump.asl 3836: Store (Local0, Local0) > Error 1013 - ^ Method local variable is not initialized (Local0) > > ASL Input: acpidump.asl - 4331 lines, 128623 bytes, 1697 keywords > Compilation complete. 3 Errors, 2 Warnings, 0 Remarks, 508 Optimizations > I would remove offending "Stores" -- I am not ACPI guru, but storing local variable into itself does not strike me as something terribly useful anyway. As far as warnings, I have seen both in my ASL and they do not seem to do any harm. HTH, -- Alexandre "Sunny" Kovalenko (Олександр Коваленко)