Subject: Re: Fixing Multiboot
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Quentin Garnier <cube@cubidou.net>
List: tech-kern
Date: 10/24/2006 16:33:37
--U3s59FfKcByyGl+j
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Oct 23, 2006 at 09:46:39PM +0200, Julio M. Merino Vidal wrote:
> A while ago someone fixed the i386 kernel linker script to generate
> the proper physical addresses for the segments in the binary image.
> This change allowed the use of unpatched GRUB to boot NetBSD kernels
> using the Multiboot option. Unfortunately the fix was incomplete
> because ksyms do not work with unpatched GRUB (which means "broken"
> ddb and no lkms). That's basically because of some nasty tricks used
> in our Multiboot code.
>=20
> The attached patch fixes this issue by dealing with the ksyms in the
> Multiboot case in a cleaner way. (Yes, martin@, I finally implemented
> your suggestions! Or at least I think so.) What it does is correctly
> copy the symbol table after the kernel (without having to reserve
> space beforehand, which is what unpatched GRUB did not do) and gets
> rid of the need to generate a fake minimal ELF image to get ksyms_init
> working. The result is a simpler implementation.
>=20
> The patch still needs some cleanup and testing in the non-Multiboot
> case which I'll do tomorrow or so. But in the meantime I'd like to
> hear comments about the proposed solution.
The kern_ksyms.c part looks fine to me.
--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.
--U3s59FfKcByyGl+j
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)
iQEVAwUBRT4kQdgoQloHrPnoAQJMNwgAqEJ2CPLWaVLRQuEoVBsfhQU487vClhLf
iJkp8ZdpXBfXdfEt96xxeCoM7gsgCKBNYRm+ZdB105BUOQuf80Ofyu84b9JzoqLH
0+bY3RjEV3Bav9NWSsAiiSP2JA4zwmUcW48RniwPLERasq7B56tK7OlybTYUucLD
V9P6YE/QnKSfLMzQE7l6kX7EQRHcVrB2X2qA/bP6E2YWpEF+0tKC3ufDB/mIAXEo
NZiLy1+CcI6BaTJenUgHKVnt6Xy8bX+LaMaJSqgZhuF4ab9puUQXfp/QrxBq6pxd
tTGCXdsGRSJkAvaFAaHZVJ/OkIBplPQmy9fDb8BtqrCypGoi5mCAYg==
=DVND
-----END PGP SIGNATURE-----
--U3s59FfKcByyGl+j--