grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiboot_mmap_entry.zero isn't zero


From: Andrei Borzenkov
Subject: Re: multiboot_mmap_entry.zero isn't zero
Date: Sun, 14 Feb 2016 10:12:34 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]