Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2015 09:17:27 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        Adrian Chadd <adrian.chadd@gmail.com>, Rui Paulo <rpaulo@me.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r287934 - head/sys/boot/efi/loader
Message-ID:  <50033006-9412-4D45-B41A-90F185DC6392@xcllnt.net>
In-Reply-To: <7425989.fyHR6C7Hof@ralph.baldwin.cx>
References:  <13e1fdb2-6e22-4371-95e4-a556c357fa8d@me.com> <CAJ-Vmok6%2B2vcekUZLU0uRSGqQtgNqmBQBu82sOiSMR_BPy0U2w@mail.gmail.com> <7425989.fyHR6C7Hof@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_344BDBAC-42F4-4BBD-948D-8C8B1EB58DD5
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

>=20
> The other approach I suggested earlier is to make the kernel =
relocatable
> (and allow the module metadata to be anywhere and live in a chain =
instead
> of an array) so that we can just load things wherever and leave them =
there
> without having to relocate.

For ia64 I linked the kernel against a virtual address. The loader
could simply allocate EFI memory as needed, and not worry about
its location. It would map that into what I called the =E2=80=9Cpre-boot
virtual address space=E2=80=9D. When booting the kernel, the loader only
had to pass the physical address and size of the page table (the
virtual address was fixed).

With a variable size the loader would start off with a single 4KB
page table and it would grow it as needed to some arbitrary max.
The page size for the pre-boot virtual address space was 64KB (to
match the maximum alignment of segments that the toolchain allowed).

With more than 700MB of pre-boot virtual address space, one could
preload and entire installation CD if willing to wait for it being
loaded. No need to set memory aside and hope things fit...

As a nice plus: linking against a virtual address allows copying
the kernel text across the memory domains and always have it run
locally to CPUs in NUMA configurations.

--
Marcel Moolenaar
marcel@xcllnt.net


--Apple-Mail=_344BDBAC-42F4-4BBD-948D-8C8B1EB58DD5
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJWBCIYAAoJEIda8t8f0tjjBP8QAOMCUeQzNDWytF93u8Nsvtaf
1duB1I1LetYjb8uPotmO0hfiiZHqMrKZ5+D+Wp/61gJJdRTHsG2Wsexs0pJlBRm0
IvEpW+mhugPwLT9gUPhTc6PbkpYmNRuv+WrEIMq4stEH+WoSS8JVzbXl1DKXOpn1
eAC/DEwV6l4y25b7Fx4otcvTgw0cdnFu0NaeDmhoexs8URBqjrfvGvB7wT4YOjf8
9dPwsHyU+buWNdg37gCCaEu57q/zuhiQ+wbilqAm5X6DSa2yYyr3JacY09A6cUX1
emLuPBV3P+Xzc9k7xAiKjQ+AoK5a1/hN4eNUa5tt5q5U5sQS1IfNBIwryH/vZbp+
b9ECZUpCGwKHwTcXgZnBrGV8OaDvfr/l99v/cWCxJAUQwrHUf4Xk2X/PIcYGHOrZ
0N2bl+SaTtPXSACZS5DyFZCpphKhSmsSPyNtNwOnTjZqB+YCclriHpCHBtRVAzMR
YFg1C9+y+WMJ/kGGpAfjN/i7tZQAvzt0YJnvYhf3e35we3fyuHYXyRST1QCCwQWh
0v+Fo8ctppaHl/KriIm2XYM1klZPWmmyEc5ehrJyJzsvZIBbUlKhbX5LmnhFMTkF
lOlTWMiyAALiW33fxGQDNIW46+Iu6A5HDqdg0Kbw7mAkmZPvYDENC+ODhqhVwFok
rKAdQbdOSvNR3S49TU5X
=/5C/
-----END PGP SIGNATURE-----

--Apple-Mail=_344BDBAC-42F4-4BBD-948D-8C8B1EB58DD5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50033006-9412-4D45-B41A-90F185DC6392>