From owner-cvs-all@FreeBSD.ORG Wed Dec 21 02:03:00 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ECABE16A41F; Wed, 21 Dec 2005 02:02:59 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from bugor.portaone.com (bugor.portaone.com [65.61.200.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43CAB43D49; Wed, 21 Dec 2005 02:02:58 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.96] ([70.68.0.213]) (authenticated bits=0) by bugor.portaone.com (8.13.4/8.13.4) with ESMTP id jBL22buo089639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Dec 2005 02:02:37 GMT (envelope-from sobomax@portaone.com) Message-ID: <43A8B7B3.1070105@portaone.com> Date: Tue, 20 Dec 2005 18:02:27 -0800 From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: John Baldwin References: <200512190926.jBJ9QhbD078141@repoman.freebsd.org> <200512191420.03927.jhb@freebsd.org> <43A7895C.9060608@portaone.com> <200512200959.16641.jhb@freebsd.org> In-Reply-To: <200512200959.16641.jhb@freebsd.org> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1213/Mon Dec 19 14:48:34 2005 on bugor.portaone.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on bugor.portaone.com Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/boot/i386/loader main.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maxim.Sobolev@portaone.com List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2005 02:03:00 -0000 OK, I was able to boot bzip2-compressed PAE kernel without any problems on 12MB system (VMWare of course) with those changes. Due to insufficient memory loader(8) whined about not being able to load symbols, but apparently this error is not fatal and kernel booted just fine. -Maxim John Baldwin wrote: > On Monday 19 December 2005 11:32 pm, Maxim Sobolev wrote: >> John Baldwin wrote: >>> On Monday 19 December 2005 01:32 pm, Maxim Sobolev wrote: >>>> John Baldwin wrote: >>>>> On Monday 19 December 2005 04:26 am, Maxim Sobolev wrote: >>>>>> sobomax 2005-12-19 09:26:42 UTC >>>>>> >>>>>> FreeBSD src repository >>>>>> >>>>>> Modified files: >>>>>> sys/boot/i386/loader main.c >>>>>> Log: >>>>>> If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB >>>>>> range to provide enough room for decompression (up to 2.5MB is >>>>>> necessary). This should be safe to do since we load i386 kernels after >>>>>> 8MB mark now, so that 16MB is the minimum amount of RAM necessary to >>>>>> even boot FreeBSD. >>>>> Err, I thought we loaded PAE kernels at 2MB and non-PAE kernels at 4MB >>>>> to skip the first PSE page (PSE pages are 2MB on PAE). >>>> You are right, my mistake, sorry. In any case memory in the range >>>> 1MB-4MB can be used by default. >>> Errm, no it can't. PAE kernels (and amd64 kernels I think) are both >>> loaded at 2MB, so that only leaves memory in the range 1MB-2MB. >> I see, did not know about amd64 (PAE is less a concern for me since it's >> not a default kernel). What do you think about the following patch: >> >> http://www.pbxpress.com/~sobomax/loader.diff >> >> It moves heap to the top of the extended memory and teaches >> i386_copyin() to avoid messing up this region, so that in low memory >> situation it will just fail, not trash heap. > > So, if I understand correctly, you're now sticking the heap at the last 3MB of > RAM. FYI, as long as you have a PPro or newer you can test booting a PAE > kernel. You don't have to have > 4GB of RAM. So, you can test this locally > to see if you can boot a PAE kernel (bzipped at that!) before committing. >