GRUB_ELF_LOAD_FLAGS_30BITS and GRUB_ELF_LOAD_FLAGS_62BITS.
* grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32),
(grub_linux_load64): Mask out 2 high bits.
+2013-04-19 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/kern/elfXX.c (grub_elfXX_load): Handle
+ GRUB_ELF_LOAD_FLAGS_30BITS and GRUB_ELF_LOAD_FLAGS_62BITS.
+ * grub-core/loader/powerpc/ieee1275/linux.c (grub_linux_load32),
+ (grub_linux_load64): Mask out 2 high bits.
+
2013-04-19 Andrey Borzenkov <arvidjaar@gmail.com>
* util/grub.d/30_os-prober.in: Add onstr to linux entries in one
continue;
load_addr = (grub_addr_t) phdr->p_paddr;
- if (load_flags & GRUB_ELF_LOAD_FLAGS_28BITS)
- load_addr &= 0xFFFFFFF;
+ switch (load_flags & GRUB_ELF_LOAD_FLAGS_BITS)
+ {
+ case GRUB_ELF_LOAD_FLAGS_ALL_BITS:
+ break;
+ case GRUB_ELF_LOAD_FLAGS_28BITS:
+ load_addr &= 0xFFFFFFF;
+ break;
+ case GRUB_ELF_LOAD_FLAGS_30BITS:
+ load_addr &= 0x3FFFFFFF;
+ break;
+ case GRUB_ELF_LOAD_FLAGS_62BITS:
+ load_addr &= 0x3FFFFFFFFFFFFFFFULL;
+ break;
+ }
load_addr += (grub_addr_t) load_offset;
if (load_addr < load_base)
linux_addr = seg_addr;
/* Now load the segments into the area we claimed. */
- return grub_elf32_load (elf, filename, (void *) (seg_addr - base_addr), GRUB_ELF_LOAD_FLAGS_NONE, 0, 0);
+ return grub_elf32_load (elf, filename, (void *) (seg_addr - base_addr), GRUB_ELF_LOAD_FLAGS_30BITS, 0, 0);
}
static grub_err_t
linux_addr = seg_addr;
/* Now load the segments into the area we claimed. */
- return grub_elf64_load (elf, filename, (void *) (grub_addr_t) (seg_addr - base_addr), GRUB_ELF_LOAD_FLAGS_NONE, 0, 0);
+ return grub_elf64_load (elf, filename, (void *) (grub_addr_t) (seg_addr - base_addr), GRUB_ELF_LOAD_FLAGS_62BITS, 0, 0);
}
static grub_err_t
{
GRUB_ELF_LOAD_FLAGS_NONE = 0,
GRUB_ELF_LOAD_FLAGS_LOAD_PT_DYNAMIC = 1,
+ GRUB_ELF_LOAD_FLAGS_BITS = 6,
+ GRUB_ELF_LOAD_FLAGS_ALL_BITS = 0,
GRUB_ELF_LOAD_FLAGS_28BITS = 2,
+ GRUB_ELF_LOAD_FLAGS_30BITS = 4,
+ GRUB_ELF_LOAD_FLAGS_62BITS = 6,
};
grub_err_t grub_elf32_load (grub_elf_t, const char *filename,
void *load_offset, enum grub_elf_load_flags flags, grub_addr_t *,