All of lore.kernel.org
 help / color / mirror / Atom feed
From: Etienne Lorrain <etienne_lorrain@yahoo.fr>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
	"H. Peter Anvin" <hpa@zytor.com>
Cc: vgoyal@in.ibm.com, linux-kernel@vger.kernel.org
Subject: Re : [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3
Date: Wed, 7 Feb 2007 14:29:48 +0000 (GMT)	[thread overview]
Message-ID: <923904.35193.qm@web26909.mail.ukl.yahoo.com> (raw)

Eric W. Biederman wote:
> H. Peter Anvin wrote:
> > That's not a valid comparison, because you're using 32-bit registers to hold
> > 16-bit pointers, and then sticking 67 prefixes on completely unnecessarily.
>
> Regardless if the size is good enough we can use it :)
>
> For romcc I had a 3x code bloat over had crafted assembler, because I
> had no memory and had to inline every single function call because I
> didn't have someplace to put a return register.  So I have the
> scenario with the most code bloat.  I win!

 It is true that I try to put all my variables in big structures in Gujin, not only
because I think it is cleaner (when variables are related in their use) but also
because it reduces the problem of 32 bits addresses by using offsets to the
structure pointer, most of the time.
 In some cases, using 32 bits address prefix is better because offsets to ESP
are possible but in 16 bits you first have to copy SP to BP to reference stack
parameters. Also you can use any register as a pointer.
 Anyway, we are currently talking of 6-7 Kbytes of real-mode section for the ELF,
including root autodetection and command line generation - there is a lot of
source code to describe all those structures but no "code bloat".
 I did try to remove by "sed" some structure easily converted, like:
  mov 26(%ebx),%eax
 by:
  mov 26(%bx),%eax
for all registers esi,edi,ebx,ebp but it saved so few bytes that I did not keep it.

Eric W. Biederman wote:
> This code is currently completely Gujin specific.  If concieved as a
> replacement for setup.S it has a chance of passing review.

  If someone ever want to transfer some code from Gujin to Linux,
 without reducing too much the functionalities, I would be more than
 happy about it - I could even try to help - but considering that I
 even do not have enough time to timely answer E-mails (considering
 my paying job) and I have a lot of other parts of Gujin to improve,
 I can not lead at all on this project.

  I am not sure this task is even possible, I do not know where
 should be the limit in between bootloader and kernel - considering
 that there is also the initrd (why people didn't switch to initramfs
 already?), and being able to debug the real-mode code (like those
 DBG*.exe Gujin files), return error code, check CRC32 is a minimum.

> LILO is a lot saner then Grub, and it still supports more filesystems...
> Just because it memorizes it all before you shut down the system for
> simplicity doesn't mean lilo is worse.

  LILO is quite good, but I cannot talk too much of other bootloader
 because I simply do not use them enough (excluding ISOLINUX).
 At least LILO do not switch too early to protected mode, like Gujin.
 The thing I do not like about it is that there isn't much checks done,
 like a CRC32, so you may load the right sectors from the wrong disk.
 Also, "ioctl (file_desc, FIBMAP, &block)" seem to be less and less
 supported, either by filesystems themselves of by lower layers like
 LVM and the like. The standalone Linux executable "showmap" in Gujin
 show problems sometimes.
 
 Etienne.


	

	
		
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

             reply	other threads:[~2007-02-07 14:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07 14:29 Etienne Lorrain [this message]
2007-02-07 17:12 ` Re : [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3 H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2007-02-11 20:49 RE : " Eric W. Biederman
2007-02-12 10:42 ` Etienne Lorrain
2007-02-12 12:29   ` Eric W. Biederman
2007-02-12 13:58     ` Etienne Lorrain
2007-02-12 14:06     ` H. Peter Anvin
2007-02-12 19:47       ` Eric W. Biederman
2007-02-08 13:10 Etienne Lorrain
2007-02-09  5:59 ` Vivek Goyal
2007-02-09 13:04   ` Etienne Lorrain
2007-02-09 19:42     ` Eric W. Biederman
2007-02-08  9:48 Etienne Lorrain
2007-02-08 11:20 ` Eric W. Biederman
2007-02-08 11:37 ` Vivek Goyal
2007-02-08 12:10   ` Eric W. Biederman
2007-02-06 17:23 Etienne Lorrain
2007-02-06 17:34 ` H. Peter Anvin
2007-02-06 18:12 ` Eric W. Biederman
2007-02-06 13:23 Etienne Lorrain
2007-02-06 13:12 Etienne Lorrain
2007-02-07  6:44 ` Vivek Goyal
2007-02-06 12:49 Etienne Lorrain

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=923904.35193.qm@web26909.mail.ukl.yahoo.com \
    --to=etienne_lorrain@yahoo.fr \
    --cc=ebiederm@xmission.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.