loongson-community / discussions

Cross-community issue tracker & discussions / 跨社区工单追踪 & 讨论场所
7 stars 0 forks source link

英雄帖: Support for SMBIOS Type 44 LoongArch supplement tables #28

Open xen0n opened 7 months ago

xen0n commented 7 months ago

Right now there are SMBIOS Type 44 tables on LoongArch systems, that cannot be decoded with current versions of dmidecode and other known tools:

$ sudo dmidecode -t 44
# dmidecode 3.5
Getting SMBIOS data from sysfs.
SMBIOS 3.2.0 present.

Handle 0x0015, DMI type 44, 48 bytes
Unknown Type
    Header and Data:
        2C 30 15 00 01 00 28 0A 00 01 28 00 4C 6F 6F 6E
        67 73 6F 6E 00 00 00 00 00 00 00 00 33 41 36 30
        30 30 2D 48 56 00 00 00 00 00 00 00 C7 CC 7C 7E
    Strings:
        ptal....X

(repeated 7 more times with increasing handle indexes)

This is actually well-defined in the LoongArch SMBIOS supplement spec (rendered), and worth supporting.

Places to look at:

It could be helpful if anyone communicate here first before stepping up and writing code.

jiegec commented 7 months ago

✋ I will work on dmidecode. WIP version: https://github.com/jiegec/dmidecode.

I found a issue decoding ISA extensions support field: the actual SMBIOS info seems wrong.

Raw info from 3C5000:

Handle 0x0012, DMI type 44, 48 bytes
Unknown Type
        Header and Data:
                2C 30 12 00 01 00 28 0A 00 01 28 00 4C 6F 6F 6E
                67 73 6F 6E 00 00 00 00 00 00 00 00 33 43 35 30
                30 30 00 00 00 00 00 00 00 00 00 00 C7 CF 7C 00
        Strings:
                ptal....X

Fields:

Update: 0x007CCFC7 equals to CPUCFG[1], but does not equal to EUEN according to the spec.

Currently decoded info:

Handle 0x0012, DMI type 44, 48 bytes
Processor Additional Information
        Referenced Handle: 0x0001
        Processor Type: 64-bit LoongArch (LoongArch64)
        Machine Vendor ID: Loongson
        CPU ID: 3C5000
        ISA Extensions Support:
                Floating Point Instructions
                128-bit Vector Instructions
                256-bit Vector Instructions

RFC: how to name these ISA extensions?