[ipxe-devel] [ipxe] [wip][freebsd] Initial support freebsd boot (#36)

Arthur Gautier notifications at github.com
Thu Jun 25 14:26:09 UTC 2015


> +
> +	// Copy image
> +	for_each_image ( module_image ) {
> +		if (image == module_image) continue;
> +		memcpy_user(phys_to_user(buffer), 0, module_image->data, 0, module_image->len);
> +		buffer += ALIGN_PAGE(module_image->len);
> +	}
> +
> +	kern_end = buffer;
> +
> +	entry_lo = ehdr.e_entry & 0xffffffff;
> +	entry_hi = (ehdr.e_entry >> 32) & 0xffffffff;
> +
> +	for (i = 0; i < 512; i++) {
> +		/* Each slot of the level 4 pages points to the same level 3 page */
> +		PT4[i] = (p4_entry_t)VTOP((void *)&PT3[0]);

For this one, I need to get back the physical address of PT3, see https://svnweb.freebsd.org/base/head/sys/boot/i386/libi386/elf64_freebsd.c?view=markup#l98.

vtop is defined https://svnweb.freebsd.org/base/head/sys/boot/i386/btx/lib/btxv86.h?view=markup#l57 and __base https://svnweb.freebsd.org/base/head/sys/boot/i386/btx/lib/btxcsu.S?view=markup#l39

It looks like virtual_to_phys does not behave the same.

---
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/36/files#r33260084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20150625/10bfce16/attachment.htm>


More information about the ipxe-devel mailing list