From owner-cvs-src@FreeBSD.ORG Wed Mar 14 23:55:01 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B540316A403 for ; Wed, 14 Mar 2007 23:55:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outI.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id 8A87013C469 for ; Wed, 14 Mar 2007 23:55:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Wed, 14 Mar 2007 16:27:52 -0700 Received: from [192.168.2.5] (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id A0435125ADD; Wed, 14 Mar 2007 16:55:00 -0700 (PDT) Message-ID: <45F88B54.7070305@elischer.org> Date: Wed, 14 Mar 2007 16:55:00 -0700 From: Julian Elischer User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: Nate Lawson References: <20070314223016.7CD4E16A418@hub.freebsd.org> <45F8793E.5080602@elischer.org> <45F8804F.1050606@root.org> In-Reply-To: <45F8804F.1050606@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Alan Cox , cvs-all@freebsd.org Subject: Re: [SRC] cvs commit: src/sys/i386/acpica acpi_wakeup.c src/sys/i386/i386 pmap.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 23:55:01 -0000 Nate Lawson wrote: > Julian Elischer wrote: >> Nate Lawson wrote: >>> njl 2007-03-14 22:30:02 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/i386/acpica acpi_wakeup.c sys/i386/i386 pmap.c >>> Log: >>> Create an identity mapping (V=P) super page for the low memory >>> region on >>> boot. Then, just switch to the kernel pmap when suspending instead of >>> allocating/freeing our own mapping every time. This should solve a >>> panic >>> of pmap_remove() being called with interrupts disabled. Thanks to Alan >>> Cox for developing this patch. >>> Note: this means that ACPI requires super page (PG_PS) support in >>> the CPU. >>> This has been present since the Pentium and first documented in the >>> Pentium Pro. However, it may need to be revisited later. >> I thought we were still supporting 486 class machines. >> if so, shouldn't this be somehow ifdef'd? > > Yes, that part needs to be covered although an ifdef is not necessary > (PG_PS is defined for even 486's so this will compile). > >>> Index: src/sys/i386/i386/pmap.c >>> diff -u src/sys/i386/i386/pmap.c:1.582 src/sys/i386/i386/pmap.c:1.583 >>> --- src/sys/i386/i386/pmap.c:1.582 Mon Mar 5 21:40:10 2007 >>> +++ src/sys/i386/i386/pmap.c Wed Mar 14 22:30:02 2007 >>> @@ -422,6 +422,13 @@ >>> >>> /* Turn on PG_G on kernel page(s) */ >>> pmap_set_pg(); >>> + >>> + /* >>> + * Create an identity mapping (virt == phys) for the low 1 MB >>> + * physical memory region that is used by the ACPI wakeup code. >>> + * This mapping must not have PG_G set. + */ >>> + kernel_pmap->pm_pdir[0] = PG_PS | PG_RW | PG_V; >>> } >>> >>> /* > > I propose conditionalizing this code on "if (pseflag)". Of course, the > acpi suspend code will fail on 486's but we disable acpi entirely if the > bios date < 1999/1/1 and acpi isn't supported on the 486. as long as you are keeping this in mind, I have no objection as to how you tackle it.. so if someone uses a 486 based embedded system (low power etc.) they can definitely not have any acpi support in the bios? >