Date: Thu, 09 Feb 2006 11:23:44 -0800 From: Nate Lawson <nate@root.org> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-acpi@freebsd.org Subject: Re: Kernel panic with ACPI enabled Message-ID: <43EB96C0.7070900@root.org> In-Reply-To: <200602091124.05153.jhb@freebsd.org> References: <43E7D1A2.1030008@o2.pl> <200602081036.34530.jhb@freebsd.org> <43EA42B6.4000603@root.org> <200602091124.05153.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/cdefs.h> > __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 <sys/param.h> > #include <sys/kernel.h> > @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43EB96C0.7070900>