From owner-freebsd-acpi@FreeBSD.ORG Thu Feb 9 19:23:42 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 E5B6316A420; Thu, 9 Feb 2006 19:23:42 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57F6F43D62; Thu, 9 Feb 2006 19:23:41 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.0.53] (adsl-67-119-74-222.dsl.sntc01.pacbell.net [67.119.74.222]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id k19JNeEr007973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 9 Feb 2006 11:23:40 -0800 Message-ID: <43EB96C0.7070900@root.org> Date: Thu, 09 Feb 2006 11:23:44 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <43E7D1A2.1030008@o2.pl> <200602081036.34530.jhb@freebsd.org> <43EA42B6.4000603@root.org> <200602091124.05153.jhb@freebsd.org> In-Reply-To: <200602091124.05153.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: Kernel panic with ACPI enabled 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: Thu, 09 Feb 2006 19:23:43 -0000 John Baldwin wrote: > On Wednesday 08 February 2006 14:12, Nate Lawson wrote: >>I was thinking this goes in the ACPI init. if (maxmem != 0) printf() > > > Something like this: > > Index: dev/acpica/acpi.c > =================================================================== > RCS file: /usr/cvs/src/sys/dev/acpica/acpi.c,v > retrieving revision 1.219 > diff -u -r1.219 acpi.c > --- dev/acpica/acpi.c 7 Nov 2005 21:52:06 -0000 1.219 > +++ dev/acpica/acpi.c 9 Feb 2006 16:22:51 -0000 > @@ -30,6 +30,9 @@ > #include > __FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.219 2005/11/07 21:52:06 jhb Exp $"); > > +#ifdef __i386__ > +#include "opt_maxmem.h" > +#endif > #include "opt_acpi.h" > #include > #include > @@ -284,6 +287,19 @@ > return_VALUE (0); > started = 1; > > +#ifdef __i386__ > + /* Warn about MAXMEM or hw.physmem use. */ > + do { > +#ifndef MAXMEM > + u_long tmp; > + > + if (TUNABLE_ULONG_FETCH("hw.physmem", &tmp)) > +#endif > + printf("WARNING: Usage of MAXMEM or hw.physmem may cause " > + "ACPI to panic!\n"); > + } while (0); > +#endif > + I'd prefer it be in a separate function, something like: int acpi_check_sysconfig() { #ifdef __i386__ #ifndef MAXMEM u_long tmp; if (TUNABLE_ULONG_FETCH("hw.physmem", &tmp) != 0) #endif printf("WARNING: Usage of MAXMEM or hw.physmem may cause " "ACPI to panic!\n"); #endif /* __i386__ */ return (0); } We might add other stuff there later. Anyway, give this a check and commit it. Thanks. -- Nate