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

Re: /proc/hardware



> But this is only one model. Falcon, FRAK/PAK modified models and the
> 040 and 060 clones are still missing. (I cannot help with that.)

Christian, you should be able to look up all the strings you need in
the kernel sources. For each machine type, there should be
arch/m68k/MACH/config.c that contains a function MACH_get_model().

E.g., for Atari this is:

static void atari_get_model(char *model)
{
    strcpy(model, "Atari ");
    switch (atari_mch_cookie >> 16) {
        case ATARI_MCH_ST:
            if (ATARIHW_PRESENT(MSTE_CLK))
                strcat (model, "Mega ST");
            else
                strcat (model, "ST");
            break;
        case ATARI_MCH_STE:
            if (MACH_IS_MSTE)
                strcat (model, "Mega STE");
            else
                strcat (model, "STE");
            break;
        case ATARI_MCH_TT:
            if (MACH_IS_MEDUSA)
                /* Medusa has TT _MCH cookie */
                strcat (model, "Medusa");
            else if (MACH_IS_HADES)
                strcat(model, "Hades");
            else
                strcat (model, "TT");
            break;
        case ATARI_MCH_FALCON:
            strcat (model, "Falcon");
            if (MACH_IS_AB40)
                strcat (model, " (with Afterburner040)");
            break;
        default:
            sprintf (model + strlen (model), "(unknown mach cookie 0x%lx)",
                     atari_mch_cookie);
            break;
    }
}

So all possible extensions to "Atari" are:

  "ST", "Mega ST", "STE", "Mega STE", "Medusa", "Hades", "TT",
  "Falcon", "Falcon (with Afterburner040)", "(unknown mach cookie 0xxxxxxxxx)"
 
Same should be possible for other machines. MACH_get_model() is called
by the generic m68k function that constructs the contents of
/proc/machinfo.

Roman



Reply to: