}
/* use "rXpY" string as stepping */
-static int arm_decode_rXpY(struct lscpu_cputype *ct)
+static int arm_rXpY_decode(struct lscpu_cputype *ct)
{
int impl, revision, variant;
char *end = NULL;
str = dmi_string(&h, data[PROC_MFR_OFFSET]);
if (str) {
xstrncpy(buf, str, 127);
- ct->vendor = xstrdup(buf);
+ ct->bios_vendor = xstrdup(buf);
}
str = dmi_string(&h, data[PROC_VERSION_OFFSET]);
if (str) {
xstrncpy(buf, str, 127);
- ct->modelname = xstrdup(buf);
+ ct->bios_modelname = xstrdup(buf);
}
return 0;
static void arm_decode(struct lscpu_cxt *cxt, struct lscpu_cputype *ct)
{
- int rc = -1;
-
- /* use SMBIOS Type 4 data if available, else fall back to manual
- * decoding using the tables above
- */
+ /* use SMBIOS Type 4 data if available */
if (!cxt->noalive && access(_PATH_SYS_DMI_TYPE4, R_OK) == 0)
- rc = arm_smbios_decode(ct);
- if (rc)
- arm_ids_decode(ct);
+ arm_smbios_decode(ct);
- arm_decode_rXpY(ct);
+ arm_ids_decode(ct);
+ arm_rXpY_decode(ct);
}
void lscpu_decode_arm(struct lscpu_cxt *cxt)
struct libscols_table *tb,
struct libscols_line *sec)
{
- if (ct->modelname) {
- struct libscols_line *tmp = add_summary_s(tb, sec, _("Model name:"), ct->modelname);
- if (!sec)
- sec= tmp;
- }
-
+ if (ct->modelname)
+ sec = add_summary_s(tb, sec, _("Model name:"), ct->modelname);
+ if (ct->bios_modelname)
+ add_summary_s(tb, sec, _("BIOS Model name:"), ct->bios_modelname);
if (ct->machinetype)
add_summary_s(tb, sec, _("Machine type:"), ct->machinetype);
if (ct->family)
_("Off-line CPU(s) list:"), set);
cpuset_free(set);
}
+ sec = NULL;
/* Section: cpu type description */
if (ct->vendor)
sec = add_summary_s(tb, NULL, _("Vendor ID:"), ct->vendor);
+ if (ct->bios_vendor)
+ add_summary_s(tb, sec, _("BIOS Vendor ID:"), ct->bios_vendor);
- for (i = 0; i < cxt->ncputypes; i++) {
- print_summary_cputype(cxt, cxt->cputypes[i],
- tb, cxt->ncputypes == 1 ? sec : NULL);
-
- }
+ for (i = 0; i < cxt->ncputypes; i++)
+ print_summary_cputype(cxt, cxt->cputypes[i], tb, sec);
sec = NULL;
/* Section: vitualiazation */
char *vendor;
int vendor_id; /* created by lscpu_decode_arm() */
+ char *bios_vendor; /* aarch64 */
char *machinetype; /* s390 */
char *family;
char *model;
char *modelname;
+ char *bios_modelname; /* aarch64 */
char *revision; /* alternative for model (ppc) */
char *stepping;
char *bogomips;