linux-mips-fnet
[Top] [All Lists]

Re: TLB Management , C library

To: linux-mips@fnet.fr
Subject: Re: TLB Management , C library
From: Systemkennung Linux <linux@mailhost.uni-koblenz.de>
Date: Wed, 5 Jun 1996 14:03:20 +0200 (MET DST)
Cc: dfrick@dial.eunet.ch
In-reply-to: <199606050508.HAA00212@miston.any.net> from "Didier Frick" at Jun 5, 96 07:08:12 am
Hi,

> 1) I have begun to work on the  R3000 adaptation. I'm having lots
> of trouble with virtual memory mapping, because the format of the
> MMU register is different than for the R4000 and I dont understand 
> very well  the way page tables are mapped in kernel state.
> My current state is that the boot process hangs in buffer_init, which
> is the first routine to use VM in kernel mode.
> 
> If I trace the execution, I see that buffer_init causes a tlbs exception,
> when it first writes into vmalloced memory.
> This exception then causes a tlbl, because the page table isn't in the TLB.
> The tlbl handler faults in its turn for the same reason and the system hangs.
> I'd greatly appreciate some information about the way TLBMAP, TLB_ROOT and
> the like are working, and about how kernel page tables are implemented.
> (I couldn't find any routing setting up a kernel page table, like on other
> architectures).

The double tlbl exception is part of the concept.  Handling the tlb faults
this way takes out complexity from the first handler (which has 14
instructions for R4x00 and only 12 for R4600).

> We have had a lot of trouble trying to compile the linux c library from
> the fnet server, even after the patches. We were using the 
> mips-linuxelf-gcc , also from fnet. The makefiles keep calling the
>  wrong tools, some files seem to be missing, etc... 
> Do you have any hints on how to fix the situation ?

Which libc have you been using for your compilation attempts?

> - The method used to discriminate between MIPS ISA levels using
>   the preprocessor is buggy. if you write:
> 
> #if __MIPS_ISA_LEVEL == __MIPS_ISA_LEVEL2
> 
>       a
> 
> #else
>       b
> 
> #endif
> 
>   The test will always succeed if __MIPS__ISA_LEVEL2 is not defined to
> some value. We've had to modify the gcc specs file to define arbitrary
> numeric values for the mips isa symbols.

Ooops, I'll fix this one.  The ELF compiler defines these symbols
correctly.  I just forgot to add some compatibility defines for the
a.out compiler to the Makefiles.  I didn't notice this because as it
seems the action taken is ok for the R4x00.

> - There was a bug in the 1.3.98 ld.script: the _end symbol is before
>   the .sbss data, which will cause variables to be overwritten at 
>   initialization.

The .sbss section should be empty so this is no real problem.  This
script is used anyway only used when converting an ELF kernel into an a.out
kernel for bootstrap purposes.  Given some other problems with binutils
that I'm just debugging this option doesn't work anyway.

> - The R3000 cli/sti functions need nops to prevent coprocessor
>   hazards.

I (and Paul Antoine who did most of the R3000 bits that exist) know about
this problem.  The problem is that the R3000 documentation (Kane) doesn't
specify how many nops are exactly required; we intended to inquire how
many are required before we add five (== pipeline lenght) as brute force
solution.

   Ralf

<Prev in Thread] Current Thread [Next in Thread>