Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Mar 2011 20:02:00 +0000
From:      Alexander Best <arundel@freebsd.org>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        bz@FreeBSD.ORG, freebsd-arch@FreeBSD.ORG
Subject:   Re: kernel memory checks on boot vs. boot time
Message-ID:  <20110323200200.GA85810@freebsd.org>
In-Reply-To: <201103231750.p2NHoSF6009826@lurza.secnetix.de>
References:  <20110323171443.GA59972@freebsd.org> <201103231750.p2NHoSF6009826@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed Mar 23 11, Oliver Fromme wrote:
> Alexander Best wrote:
>  > just as a side note: booting a kernel directly from boot stage 2 is broken on
>  > amd64. :( so there's no way around using the boot loader, which will cost extra
>  > time (even with autoboot_delay=0).
>  > 
>  > so was the adbility to boot a kernel directly from boot2 abandoned? i heard
>  > reports it still works under i386. dunno about the other archs.
> 
> The loader checks the type of the kernel binary (i386 vs
> amd64).  In case of amd64, it enables "long mode", among
> other things.  This is required for amd64, because the
> kernel expects to be started in long mode.  boot2 doesn't
> do that, so you can't start an amd64 kernel directly from
> boot2.

hmm...i can't seem to find the location in loader/main.c. could you pinpoint
me to the exact location? this is something i'd *really* like to try in amd64.

cheers.
alex

> 
> In theory you could write a specialized amd64 variant of
> boot2 that prepares the system for starting an amd64 kernel
> directly.  Whether there's enough space for that in boot2
> (8 KB) and whether it's worth the effort, I don't know.
> 
> To be honest, I don't think that loader takes so much time.
> When you set autoboot_delay="-1" and beastie_disable="YES",
> the time spent in loader is negligible.  (I'm assuming that
> you also set BOOTWAIT=0 in make.conf, so boot2 doesn't wait
> for a keypress either.  I think the default is to wait 3
> seconds.)
> 
> Best regards
>    Oliver
> 
> 
> -- 
> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
> Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
> chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
> 
> FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd
> 
> "[...]  one observation we can make here is that Python makes
> an excellent pseudocoding language, with the wonderful attribute
> that it can actually be executed."  --  Bruce Eckel

-- 
a13x



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110323200200.GA85810>