Subject: Re: Problems w/ NetBSD-current & SUN 4/300
To: None <rhs@inka.de>
From: Harald Barth <haba@pdc.kth.se>
List: port-sparc
Date: 04/14/1997 18:01:52
> i tested the latest release of NetBSD on a SUN 4/300 and at boot-stage,
> the kernel reports after the boot-code:
> 
> panic: Unknown CPU type: cpu: impl 1, vers 1; mmu: impl -1, vers -1
> 
> Any clues ?

The latest relese looks closer at the hardware to decide what
architecture specific code to run. This is handled by a struct table
named cpu_conf in sys/arch/sparc/sparc/cpu.c. You may add one line for
your CPU type and recompile, and hope that your CPU works like any
other Sun4 CPU (it should, shouldn't it?)

Btw, ANY is defined as -1.

Good luck,
Harald.

struct cpu_conf {
        int     arch;
        int     cpu_impl;
        int     cpu_vers;
        int     mmu_impl;
        int     mmu_vers;
        char    *name;
        struct  module_info *minfo;
} cpu_conf[] = {
#if defined(SUN4)
        { CPU_SUN4, 0, 0, ANY, ANY, "MB86900/1A or L64801", &module_sun4 },
        { CPU_SUN4, 1, 0, ANY, ANY, "L64811", &module_sun4 },
        { CPU_SUN4, 1, 1, ANY, ANY, "WHAT MY CPU IS CALLED", &module_sun4 },     /* <- ADD THIS LINE */
#endif

#if defined(SUN4C)
        { CPU_SUN4C, 0, 0, ANY, ANY, "MB86900/1A or L64801", &module_sun4c },
        { CPU_SUN4C, 1, 0, ANY, ANY, "L64811", &module_sun4c },
        { CPU_SUN4C, 1, 1, ANY, ANY, "CY7C601", &module_sun4c },
        { CPU_SUN4C, 9, 0, ANY, ANY, "W8601/8701 or MB86903", &module_sun4c },
#endif

#if defined(SUN4M)
        { CPU_SUN4M, 0, 4, 0, 4, "MB86904", &module_swift },
        { CPU_SUN4M, 0, 5, 0, 5, "MB86907", &module_turbosparc },
        { CPU_SUN4M, 1, 1, 1, 0, "CY7C601/604", &module_cypress },
        { CPU_SUN4M, 1, 1, 1, 0xb, "CY7C601/605 I guess", &module_cypress },
        { CPU_SUN4M, 1, 1, 1, 0xc, "CY7C601/605 (v1?)", &module_cypress },
        { CPU_SUN4M, 1, 1, 1, 0xf, "CY7C601/605 (v2?)", &module_cypress },
        { CPU_SUN4M, 1, 3, 1, ANY, "CY7C611", &module_cypress },
        { CPU_SUN4M, 1, 0xf, 1, 1, "RT620/625", &module_hypersparc },
        { CPU_SUN4M, 4, 0, 0, ANY, "TMS390Z50 v0 or TMS390Z55", &module_viking }
,
        { CPU_SUN4M, 4, 1, 0, ANY, "TMS390Z50 v1", &module_viking },
        { CPU_SUN4M, 4, 1, 4, ANY, "TMS390S10", &module_ms1 },
        { CPU_SUN4M, 4, 2, 0, ANY, "TI_MS2", &module_ms2 },
        { CPU_SUN4M, 4, 3, ANY, ANY, "TI_4_3", &module_viking },
        { CPU_SUN4M, 4, 4, ANY, ANY, "TI_4_4", &module_viking },
#endif

        { ANY, ANY, ANY, ANY, ANY, "Unknown", &module_unknown }
};