• YunQiang Su's avatar
    Use ELF_BASE_PLATFORM to pass ISA level · e585b768
    YunQiang Su authored
    Some userland application/program runtime/dynamic loaded need to
    know about the current ISA level to use the best runtime.
    While kernel doesn't provides this info.
    
    ELF_PLATFORM only provides some info about the CPU, with very few info,
    for example, the value is "mips" for both 24Kc and P6600.
    
    Currently ELF_BASE_PLATFORM is not used by MIPS (only by powerpc).
    So we cant set its value as:
      mips2, mips3, mips4, mips5,
      mips32, mips32r2, mips32r6
      mips64, mips64r2, mips64r6
    Then in userland, we can get it by:
      getauxval(AT_BASE_PLATFORM)
    
    The only problem is that it seems has different defination than ppc:
      on ppc, it is the mircoarchitecture
    while now we use it as ISA level on MIPS.
    Signed-off-by: default avatarYunQiang Su <syq@debian.org>
    Reviewed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
    Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
    e585b768
cpu-probe.c 58.2 KB