MIPS64 modules

Juli Mallett jmallett at FreeBSD.org
Thu Jan 12 00:24:34 UTC 2012


On Wed, Jan 11, 2012 at 15:21, Oleksandr Tymoshenko <gonzo at freebsd.org> wrote:
>    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.

It seems like the problem here must be because on 32-bit MIPS the
direct-mapped region is less than kernel virtual mapped address space,
and either some macro we provide or the VM code makes a wrong
assumption about that relationship, since in 64-bit addressing, the
direct-mapped region is much, much higher, and so we're not looking up
something in the direct map when we ought to be?  Or some other
conditional is wrong?  Is that right?


More information about the freebsd-mips mailing list