Date: Wed, 11 Jan 2012 15:21:09 -0800 From: Oleksandr Tymoshenko <gonzo@freebsd.org> To: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Cc: Alan Cox <alc@rice.edu> Subject: MIPS64 modules Message-ID: <4F0E1965.6060808@freebsd.org>
next in thread | raw e-mail | index | archive | help
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?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F0E1965.6060808>