public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alexander van Heukelum" <heukelum@fastmail.fm>
To: "H. Peter Anvin" <hpa@zytor.com>,
	"Antonino A. Daplas" <adaplas@gmail.com>,
	"Andi Kleen" <ak@suse.de>, "Andrew Morton" <akpm@osdl.org>,
	"Matt Domsch" <Matt_Domsch@dell.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Vivek Goyal" <vgoyal@in.ibm.com>,
	"James Bottomley" <James.Bottomley@HansenPar>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Alexander van Heukelum" <heukelum@mailshack.com>
Subject: Re: x86 setup rewrite tree ready for flamage^W review
Date: Thu, 10 May 2007 16:10:35 +0200	[thread overview]
Message-ID: <1178806235.18785.1189115515@webmail.messagingengine.com> (raw)
In-Reply-To: <464158E9.2000207@zytor.com>

On Tue, 08 May 2007 22:15:21 -0700, "H. Peter Anvin" <hpa@zytor.com>
said:
> I believe the x86 setup tree is now finished.  I will turn it into a
> "clean patchset" later this week, but I wanted to get flamed^W feedback
> on it first.

Hi!

Only tiny sparks^Wremarks, I'm afraid. ;)

I've briefly looked at the new code in arch/i386/boot and as far 
as I can determine in a short amount of time all functionality is
basically there, with the exception of the 'scan' functionality for 
bios modes. Maybe it is not needed anymore? I have used this 
functionality to find non-standard modes recently (for a kernel 
crash during boot).

Random remarks about config-differences:

The new code does not use VIDEO_SELECT and X86_SPEEDSTEP_SMI
(i386-only): both parts are always compiled in. The new code uses FB:
the old code allowed setting a graphics mode, even without FB support.
Shared config options that affect the code generation: EDD, RELOCATABLE,
FIRMWARE_EDID, and APM (i386-only). Some code also depends on X86_ELAN
and X86_VOYAGER.

Allnoconfig realmode kernel part increases by about 3.5 kb:
old x86_64:  Boot sector 512 bytes. / Setup is 4737 bytes.
new x86_64:  Setup is 8808 bytes (padded to 9216 bytes).
old i386:  Boot sector 512 bytes. / Setup is 4842 bytes.
new i386:  Setup is 8776 bytes (padded to 9216 bytes).

When all relevant options are enabled about 1.5 kb:
old x86_64:  Boot sector 512 bytes. / Setup is 7394 bytes.
new x86_64:  Setup is 9672 bytes (padded to 9728 bytes).
old i386:  Boot sector 512 bytes. / Setup is 7649 bytes.
new i386:  Setup is 9896 bytes (padded to 10240 bytes).

So the code explosion is not too bad. Although... it is helps quite a
bit that the old setup contains a chunk of slightly more than 3 kb of
zeros which has disappeared with the new code. On the other hand, the
new code provides a valuable debugging tool in the form of a printf
function.

$ size arch/i386/boot/setup.elf
   text    data     bss     dec     hex filename
   9768      96    6056   15920    3e30 setup.elf

How much memory should we expect to be available? Is the assert for
32 kb for text+data+bss in setup.ld reasonable? Is it guaranteed
that the bootloader stores the commandline after _end?

The amount of code that depends on config options is relatively small.
Would it make sense to just compile everything independent of config
options and determine what should be done at run-time? And/or separate
the bootcode related config-options and put them under EMBEDDED/TINY?

If space is not that much of an issue, could you imagine putting
the decompression/relocation/misc.c code in setup too? This would
make it easier to start thinking of a new kernel image format without
breaking bootloaders that use a bzImage in the intended way.

Good luck,
        Alexander
-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - A fast, anti-spam email service.


  parent reply	other threads:[~2007-05-10 14:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09  5:15 x86 setup rewrite tree ready for flamage^W review H. Peter Anvin
2007-05-09  6:51 ` Sam Ravnborg
2007-05-09  7:02   ` H. Peter Anvin
2007-05-09  8:11     ` Sam Ravnborg
2007-05-10 14:10 ` Alexander van Heukelum [this message]
2007-05-10 18:08   ` H. Peter Anvin
2007-05-10 18:38     ` Martin Mares
2007-05-11  0:55       ` H. Peter Anvin
2007-05-10 22:04     ` Alexander van Heukelum
2007-05-10 22:48       ` H. Peter Anvin
2007-05-12 12:21         ` Alexander van Heukelum
2007-05-12 14:20           ` Eric W. Biederman
2007-05-12 18:09             ` H. Peter Anvin
2007-05-12 18:35               ` Eric W. Biederman
2007-05-12 18:59                 ` H. Peter Anvin
2007-05-12 22:04                   ` Eric W. Biederman
2007-05-12 22:08                     ` H. Peter Anvin
2007-05-11  4:37 ` Vivek Goyal
2007-05-11 23:58 ` Kevin Winchester
2007-05-12  0:23   ` H. Peter Anvin
2007-05-13  0:35     ` Kevin Winchester
2007-05-15 20:45     ` Rob Landley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1178806235.18785.1189115515@webmail.messagingengine.com \
    --to=heukelum@fastmail.fm \
    --cc=James.Bottomley@HansenPar \
    --cc=Matt_Domsch@dell.com \
    --cc=adaplas@gmail.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=heukelum@mailshack.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vgoyal@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox