10 Aug 2011 12:33
some mips changes for loongson2
Manuel Bouyer <bouyer <at> antioche.eu.org>
2011-08-10 10:33:59 GMT
2011-08-10 10:33:59 GMT
Hello, I've been working on getting NetBSD running on a loongson2f-based mini-PC (lemote fuulong). There's already ls2f support for gdium but it's not complete (for example, it doesn't support 64bits, nor the ISA devices found on lemote hardware). Here's a first round of patches, which do 2 things: - LS2f doens't have separate vector address for tlb_miss and xtlb_miss exeptions, the tlb_miss handler address is used for both (and the vector can be twice as large as the xtlb_miss space is free for use). mips.diff contains a patch for this, where the ls2f tlb_miss checks if the fault address is in useg or xuseg and takes appropriate action. - ls2f CPUs have a hardware bug which can make them hang on a jump register in kernel mode. A workaround can be implemented in binutils which adds 2 instructions using the at register before each j(r) ra. (right now I'm using a OpenBSD patch which does: li at,3 dmtc0 at, $22 to clear the branch prediction logic before any jump register. Our binutils have something sighly different, I've yet to look at it to see if it's useable for us - in any case that's a different topic). This workaround requires the use of at register before jump register, so I patched the assembly in arch/mips and common/ to allow at use before jump so that the assembler can install the workaroud. Any comment about these 2 patches ? -- -- Manuel Bouyer <bouyer <at> antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference(Continue reading)
RSS Feed