Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2014 09:36:27 -0700
From:      Rui Paulo <rpaulo@me.com>
To:        Ian Lepore <ian@FreeBSD.org>
Cc:        freebsd-arm@freebsd.org, Russell Haley <russ.haley@gmail.com>
Subject:   Re: Digi CCWMX53
Message-ID:  <44EB751E-E53F-46C8-809C-655002C57BC6@me.com>
In-Reply-To: <1411917685.66615.309.camel@revolution.hippie.lan>
References:  <CABx9NuQr%2BdEb_yj3ypEe6Sb_qPY%2BqP74n0x1K5=_K6Zoio2vkw@mail.gmail.com> <C439A1ED-8AA0-4CA5-B375-D80E8BD4C624@me.com> <CABx9NuQH36gyh1cT06fN7eJLZhrByzWpJH-RN8kb7hJi2ad9xw@mail.gmail.com> <42B4958F-21B2-4ABB-82C9-3F0B328EFED0@me.com> <1411917685.66615.309.camel@revolution.hippie.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 28, 2014, at 08:21, Ian Lepore <ian@FreeBSD.org> wrote:
> We can use bootelf on ubldr, but not on the kernel, because our kernel
> linker script doesn't fill in the physical load address properly in =
the
> elf header (it would try to load the virtual address).
>=20
> So the two options for launching the kernel directly are:
>=20
>   load kernel; go <load address + 100>
>   load kernel.bin; go <load address>
>=20
> The standard no-suffix kernel file is an elf binary with the wrong =
load
> address in the header, and the header is 0x100 bytes, so the entry =
point
> is immediately after that.  The kernel.bin file is exactly the same as
> kernel, but with the elf header stripped off, so the entry point is at
> an offset of zero.
>=20
> An interesting thing about our kernel is that it can be loaded at any
> 1MB boundary in physical memory, not just the address it was linked =
at.
> There's no way to represent that in an elf header.  This is true of =
both
> kernel and kernel.bin.

Ah, I think I made it work once when I set the KERNPHYS (or KERNVIRT?) =
to match the load address.

--
Rui Paulo






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44EB751E-E53F-46C8-809C-655002C57BC6>