Hi,

As this, this code does not work. I'm sending out this pull request to get 
feedback, and understand a bit better how memory is managed by ipxe.

The freebsd64 kernel is an elf64 kernel. The entry is an absolute virtual 
address. And the kernel expects to be placed at a specific address when 
booting. For that purpose, the freebsd loader relies on MMU to map destination 
virtual address to the physical address where the kernel has been allocated by 
the loader.
This mechanism is handled in the amd64_tramp.S and permits 32bit code to load 
64bit kernel.

To perform this mapping, we need to allocate a PT4/3/2 pagetables and provide 
physical address to it. I'm unsure how to use the memory library in ipxe.

my comments are inline and feedback more than welcome :)

Thanks
You can view, comment on, or merge this pull request online at:

  https://github.com/ipxe/ipxe/pull/36

-- Commit Summary --

  * [freebsd] Initial support freebsd boot

-- File Changes --

    A src/arch/i386/image/amd64_tramp.S (140)
    A src/arch/i386/image/freebsd.c (203)
    M src/config/config.c (1)
    M src/include/elf.h (43)

-- Patch Links --

https://github.com/ipxe/ipxe/pull/36.patch
https://github.com/ipxe/ipxe/pull/36.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/36
_______________________________________________
ipxe-devel mailing list
ipxe-devel@lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to