All of lore.kernel.org
 help / color / mirror / Atom feed
From: phcoder <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: multiboot on EFI
Date: Sat, 28 Mar 2009 23:33:48 +0100	[thread overview]
Message-ID: <49CEA5CC.1000301@gmail.com> (raw)
In-Reply-To: <20090328131306.GB8493@thorin>

Robert Millan wrote:
> Would it be hard to split the patch and make it more granular?  I see it
> implements base mmap / lsmmap support on efi, then ports the *BSD loaders
> and the Multiboot loader too, and the uppermem facility.
The only reason why it's not splitted is that it's totally "preview". 
When it'll be more ready I'll split it
> If everybody's fine with it, I'd like to suggest adding stuff to pkglib_MODULES
> in the same place as its corresponding variables.  I've done this already a few
> times, and I think it makes the build system a bit more maintainable.  What do
> you all think about this?

I also agree with this but I temporarily kept this in 
architecture-specific file because of some minor problems with 
multiboot2. I'll fix this too

> 
>> diff --git a/include/grub/i386/pc/memory.h b/include/grub/i386/pc/memory.h
>> index 08e92a9..e69ff77 100644
>> --- a/include/grub/i386/pc/memory.h
>> +++ b/include/grub/i386/pc/memory.h
>> @@ -92,6 +92,8 @@ struct grub_machine_mmap_entry
>>    grub_uint64_t len;
>>  #define GRUB_MACHINE_MEMORY_AVAILABLE	1
>>  #define GRUB_MACHINE_MEMORY_RESERVED	2
>> +#define GRUB_MACHINE_MEMORY_ACPI	3
>> +#define GRUB_MACHINE_MEMORY_NVS 	4
>>    grub_uint32_t type;
>>  } __attribute__((packed));
> 
> Do we need specific knowledge of these two on i386-pc ?
> 
This one is because some loaders just copy e820 map types and I don't 
want to modify what OS gets on i386-pc
>>  /* The minimum and maximum heap size for GRUB itself.  */
>>  #define MIN_HEAP_SIZE	0x100000
>> -#define MAX_HEAP_SIZE	(16 * 0x100000)
>> +#define MAX_HEAP_SIZE	(1600 * 0x100000)
> 
> Is 1600 MB what we want, or to remove the limit?
> 
I would suggest to remove the limit altogether
>> +  /* Bubble-sort the memory map */
>> +  while (done)
>> +    {
>> +      done = 0;
>> +      for (i = 0; i < count - 1; i++)
>> +	if (regions[i].start > regions[i + 1].start)
>> +	  {
>> +	    done = 1;
>> +	    t = regions[i];
>> +	    regions[i] = regions[i + 1];
>> +	    regions[i + 1] = t;
>> +	  }
>> +    }
> 
> Do we need the memory map to be sorted?  AFAIK loadees can cope with unsorted
> maps fine;  is there an exception?
> 
I prefer to sort. Even as just a precaution. Actually even sorted EFI 
map may break a lot of OS because it usually has more entries (the 
runtime code isn't guaranteed to be contiguous and if it isn't it 
results in mmap having a lot of entries) and sometimes the first N 
kilobytes are defined as unusable (it's the case with qemu-tianocore) 
which under current definition means that low_memory=0
>> +#ifdef GRUB_MACHINE_PCBIOS
>> +  grub_stop_floppy ();
>> +#endif
> 
> grub_stop_floppy() doesn't do any BIOS-specific stuff.  Wouldn't __i386__
> be more appropiate?
> 
I've already moved it to machine_fini just because my computer died I 
couldn't send the new patch

-- 

Regards
Vladimir 'phcoder' Serbinenko



  parent reply	other threads:[~2009-03-28 22:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 12:29 multiboot on EFI phcoder
2009-03-23 21:16 ` uzer cheg
2009-03-23 22:14   ` phcoder
2009-03-23 22:33     ` phcoder
2009-03-24 10:31     ` uzer cheg
2009-03-24 10:54       ` phcoder
2009-03-24 10:58         ` uzer cheg
2009-03-26 19:25           ` Vladimir Serbinenko
2009-03-28 13:13 ` Robert Millan
2009-03-28 14:31   ` Yoshinori K. Okuji
2009-04-01 12:57     ` Robert Millan
2009-04-01 13:58       ` Yoshinori K. Okuji
2009-03-28 22:33   ` phcoder [this message]
2009-04-04 16:28     ` phcoder
2009-04-04 16:51       ` phcoder

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=49CEA5CC.1000301@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /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.