[Skiboot] [PATCH v2 04/12] hdat: Grab vendor information from HDAT when available
Stewart Smith
stewart at linux.vnet.ibm.com
Tue Dec 20 15:31:33 AEDT 2016
Vasant Hegde <hegdevasant at linux.vnet.ibm.com> writes:
> + /*
> + * XXX: Spec says vendor information is availale from hdat
> + * version >= 0x5f. But we are getting '00' on version
> + * 0x5f. Hence check for processor generation.
> + */
Can we get clarity on what actually happens on 0x5f and above and
clarity in the spec? Venkatesh?
> + if (proc_gen >= proc_gen_p9)
> + dt_add_property_string(dt_root, "vendor", p->sys_vendor);
> + else
> + dt_add_property_string(dt_root, "vendor", "IBM");
I'd prefer clarity in the spec of when we can expect it to be correct
and do things based on it... otherwise, could we go something like:
const char* vendor = NULL;
if (version >= 0x5f)
vendor = p->sys_vendor;
if (!vendor || vendor[0]=='\0') // Workaround a bug where we have null vendor
vendor = "IBM";
dt_add_property_string(dt_root, "vendor", vendor);
??
--
Stewart Smith
OPAL Architect, IBM.
More information about the Skiboot
mailing list