[Skiboot] [PATCH v2 04/12] hdat: Grab vendor information from HDAT when available
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Wed Jan 4 21:27:41 AEDT 2017
On 12/20/2016 10:01 AM, Stewart Smith wrote:
> 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:
I added processor generation check so that we won't hurt P8 based system.
My understanding is starting from P9 we will have this field. Not sure about
latest P8 hdat.
>
> 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);
>
Yep. it works. will fix in next version.
-Vasant
More information about the Skiboot
mailing list