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

Peter Wemm notifications at github.com
Fri Jul 17 20:03:24 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]);

Don't worry too much about the specifics of vtop and friends, that is a btx-ism that won't apply the same way in this environment. btx runs with a non-zero segmentation offset.  You'll be looking for whatever the equivalent is here if there's even a difference between virtual and physical addresses.

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


More information about the ipxe-devel mailing list