Home Community Getting Started Getting hardware details

This topic contains 0 replies, has 1 voice, and was last updated by  Karthikeyan Karthikeyan 1 week ago.

  • Author
  • #757

    I work on software that needs to know the processor and cache details. On x86 systems it uses the CPUID instruction to know about the processor family/model (Skylake, Icelake etc) and cache details (total size, line size, associativity etc). I am trying to do the same on ARM systems. I am using RedHat Linux. I noticed that the dmidecode command has an entry called ID.

    # dmidecode -t processor | grep -A2 Family:
    Family: ARMv8
    Manufacturer: Ampere(TM)
    ID: 00 00 00 00 02 00 3F 50

    dmidecode reads the SMBIOS files, The SMBIOS spec says that the value of ID is taken from the MIDR_EL1 register of ARM. So, can the value of ID be used to distinguish between different ARM processors e.g eMAG1 and eMAg2?

    dmidecode also gives cache details (with “-t cache”) but only total size and associativity. Cache line size is not given. Is there an instruction or register that can be used to get all the details?

    The ARMv8 spec mentions a register called CTR_EL0. It has the following field

    DminLine, bits [19:16]
    Log2 of the number of words in the smallest cache line of all the data caches and unified caches that
    are controlled by the PE.

    This seems to only give the smallest possible line size. I am interested in the actual line size (and other details) of the caches.

You must be logged in to reply to this topic.