Port-mips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: R5000SC issues and fix



On Fri, 5 Dec 2025 at 09:35, Adrian Chadd <adrian%freebsd.org@localhost> wrote:
>
> Hi!
>
> I just tested this and it booted through kernel. I'll test it with
> userland stuff today when I get
> a drive in this R5000 Indy and can install netbsd on it.
>
> ===
> diff --git a/sys/arch/mips/include/cache_r5k.h
> b/sys/arch/mips/include/cache_r5k.h
> index a59fa18fdc02..d4c22b3d79b4 100644
> --- a/sys/arch/mips/include/cache_r5k.h
> +++ b/sys/arch/mips/include/cache_r5k.h
> @@ -69,5 +69,5 @@ void  r5k_sdcache_wb_range(register_t, vsize_t);
>  #define        R5K_SC_PAGEMASK         (R5K_SC_PAGESIZE - 1)
>
>  #define        mips_r5k_round_page(x)  (((x) + (register_t)R5K_SC_PAGEMASK) \
> -                                   & (register_t)R5K_SC_PAGEMASK)
> -#define        mips_r5k_trunc_page(x)  ((x) & (register_t)R5K_SC_PAGEMASK)
> +                                   & (register_t)~R5K_SC_PAGEMASK)
> +#define        mips_r5k_trunc_page(x)  ((x) & (register_t)~R5K_SC_PAGEMASK)

Note that I'm seeing random cache related panics, so there's likely
some other regressions
somewhere.

Eg:

Cache error @ EPC 0x88069544 ErrCtl 0x3 CacheErr 0xa43fee02
[ 346.4388599] cpu0: Begin traceback...

Izumi, do you still have an R5000 Indy and/or other devices? I'm not familiar
(yet?) with the R5000 cache stuff, and I can't imagine it never worked!



-adrian


Home | Main Index | Thread Index | Old Index