svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen
Roger Pau Monné
royger at FreeBSD.org
Fri Jan 16 15:15:31 UTC 2015
El 16/01/15 a les 0.03, Ian Lepore ha escrit:
> On Thu, 2015-01-15 at 16:27 +0000, Roger Pau Monné wrote:
>> Author: royger
>> Date: Thu Jan 15 16:27:20 2015
>> New Revision: 277215
>> URL: https://svnweb.freebsd.org/changeset/base/277215
>>
>> Log:
>> loader: implement multiboot support for Xen Dom0
>> [...]
>>
>> Added:
>> head/sys/boot/i386/libi386/multiboot.c (contents, props changed)
>> head/sys/boot/i386/libi386/multiboot.h (contents, props changed)
>> head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props changed)
>> Modified:
>> head/sys/amd64/include/metadata.h
>> head/sys/boot/common/bootstrap.h
>> head/sys/boot/common/load_elf.c
>> head/sys/boot/common/load_elf_obj.c
>> head/sys/boot/common/module.c
>> head/sys/boot/fdt/fdt_loader_cmd.c
>> head/sys/boot/forth/beastie.4th
>> head/sys/boot/forth/loader.4th
>> head/sys/boot/forth/support.4th
>> head/sys/boot/i386/libi386/Makefile
>> head/sys/boot/i386/libi386/bootinfo64.c
>> head/sys/boot/i386/libi386/elf64_freebsd.c
>> head/sys/boot/i386/libi386/libi386.h
>> head/sys/boot/i386/loader/conf.c
>> head/sys/i386/include/metadata.h
>> head/sys/x86/xen/pv.c
>
> Something about this change breaks ubldr on arm (it works @ r277214).
> Now on an RPi I get this:
>
> /boot/kernel/kernel data=0x4cf8a4+0x3475c syms=[0x4+0x91650+0x4+0x53354]
> panic: Address offset 0x40000000 bigger than size 0x1E000000
>
> There is a single physical extent of ram from 0-0x1e000000.
Sorry for this, the above patch solved the problem for me. I'm
currently running a tinderbox with it to make sure nothing else breaks,
but the fix is quite straightforward.
---
diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c
index 6860815..4c801e9 100644
--- a/sys/boot/common/load_elf.c
+++ b/sys/boot/common/load_elf.c
@@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const
static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
Elf_Addr p, void *val, size_t len);
static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef,
- u_int64_t p_start, u_int64_t p_end);
+ Elf_Addr p_start, Elf_Addr p_end);
static symaddr_fn __elfN(symaddr);
static char *fake_modname(const char *name);
@@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
Elf_Size size;
u_int fpcopy;
Elf_Sym sym;
- u_int64_t p_start, p_end;
+ Elf_Addr p_start, p_end;
dp = NULL;
shdr = NULL;
@@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest)
Elf_Shdr *sh_data[2];
char *shstrtab = NULL;
size_t size;
- u_int64_t p_start, p_end;
+ Elf_Addr p_start, p_end;
bzero(&ef, sizeof(struct elf_file));
ef.fd = -1;
@@ -820,7 +820,7 @@ out:
int
__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef,
- u_int64_t p_start, u_int64_t p_end)
+ Elf_Addr p_start, Elf_Addr p_end)
{
struct mod_metadata md;
#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64
More information about the svn-src-head
mailing list