All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: multiboot_mmap_entry.zero isn't zero
Date: Sun, 14 Feb 2016 10:12:34 +0300	[thread overview]
Message-ID: <56C028E2.5000502@gmail.com> (raw)
In-Reply-To: <CAKk8ispV-s2Ts7HCYLOUjucaSfNXMF0uM6n1eA18xkWYnmQ1rw@mail.gmail.com>

14.02.2016 00:20, Wink Saville пишет:
> I'm processing multiboot_tag_mmap and the multiboot_mmap_entry.zero
> isn't zero. As best as I can tell grub isn't initializing it. Here is
> the code from grub-core/loader/i386/multiboot_mbi.c:
> 
> /* Helper for grub_fill_multiboot_mmap.  */
> static int
> grub_fill_multiboot_mmap_iter (grub_uint64_t addr, grub_uint64_t size,
>        grub_memory_type_t type, void *data)
> {
>   struct multiboot_mmap_entry **mmap_entry = data;
> 
>   (*mmap_entry)->addr = addr;
>   (*mmap_entry)->len = size;
>   (*mmap_entry)->type = type;
>   (*mmap_entry)->size = sizeof (struct multiboot_mmap_entry) - sizeof
> ((*mmap_entry)->size);
>   (*mmap_entry)++;
> 
>   return 0;
> }
> 
> And similar code in grub-core/loader/multiboot_mbi2.c:
> 
> /* Helper for grub_fill_multiboot_mmap.  */
> static int
> grub_fill_multiboot_mmap_iter (grub_uint64_t addr, grub_uint64_t size,
>        grub_memory_type_t type, void *data)
> {
>   struct multiboot_mmap_entry **mmap_entry = data;
> 
>   (*mmap_entry)->addr = addr;
>   (*mmap_entry)->len = size;
>   (*mmap_entry)->type = type;
>   (*mmap_entry)++;
> 
>   return 0;
> }
> 
> And I'd expect to see:
> 
> (*mmap_entry)->zero = 0;
> 
> Is there a reason its not being zeroed?
> 

Because it does not exist?



  reply	other threads:[~2016-02-14  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13 21:20 multiboot_mmap_entry.zero isn't zero Wink Saville
2016-02-14  7:12 ` Andrei Borzenkov [this message]
2016-02-14 11:24   ` Wink Saville
2016-02-23  6:14     ` Andrei Borzenkov
2016-02-23 18:01       ` Wink Saville

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=56C028E2.5000502@gmail.com \
    --to=arvidjaar@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.