On Wed, Aug 05, 2009 at 12:20:35PM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Tue, Aug 4, 2009 at 10:56 PM, Robert Millan<r...@aybabtu.com> wrote: > > On Mon, Aug 03, 2009 at 02:10:18PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > >> +#define GRUB_MULTIBOOT_STACK_SIZE 4096 > >> [...] > >> +#define stack_addr(x) ((void *) ((x) + code_size + > >> cmdline_length + boot_loader_name_length + sizeof (struct > >> grub_multiboot_info) + mmap_length + GRUB_MULTIBOOT_STACK_SIZE)) > > > > What's this stack used for? > Only to set %esp to something that can be used by OS for small things > before they setup their own stack. By multiboot specification OS is > required to setup its stack itself but I suppose many OSes may have > done a mistake of having few push'es before real stack setup
Did you find code that has this problem? Note it's much simpler for them to solve it on their side by allocating a stack in their BSS. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel