MIPS64 modules

Oleksandr Tymoshenko gonzo at freebsd.org
Wed Jan 11 23:50:37 UTC 2012


     Modules on MIPS use the same interface as AMD64 modules:
sys/kern/link_elf_obj.c. It works for MIPS32 but there is a problem
with MIPS64. sys/kern/link_elf_obj.c calls vm_map_find that uses
KERNBASE as a map base. As I told - it works for mips32 because
KERNBASE for mips32 is located before actual virtual memory area
(KERNBASE points to directly-mapped KSEG0 segment). But for MIPS64
it's not the case - KERNBASE points to the very end of address space
and vm_map_find fails.

Using VM_MIN_KERNEL_ADDRESS fixes this problem. So the question is -
what should I do? Add #ifdef to link_elf_obj.c as in kmem_init in
vm/vm_kern.c or change KERNBASE to VM_MIN_KERNEL_ADDRESS?


More information about the freebsd-mips mailing list