diff mbox

[v2,03/12] hdat: Add new fields to IPL params structure

Message ID 1477751795-20128-4-git-send-email-hegdevasant@linux.vnet.ibm.com
State Changes Requested
Headers show

Commit Message

Vasant Hegde Oct. 29, 2016, 2:36 p.m. UTC
Add new fields to sys params structure and update sys family for p9.

In P9 the compatible string is supplied by hostboot through the HDAT.
This patch add support for using these strings to set the compatible
property in the device tree rather than using the machine ID number
scheme traditionally used in the HDAT.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
[Folded Oliver's changes to original patch - Vasant]
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 hdata/spira.c | 63 +++++++++++++++++++++++++++++++++++++----------------------
 hdata/spira.h | 17 +++++++++++++++-
 2 files changed, 56 insertions(+), 24 deletions(-)

Comments

Oliver O'Halloran Nov. 2, 2016, 3:48 a.m. UTC | #1
On Sun, Oct 30, 2016 at 1:36 AM, Vasant Hegde
<hegdevasant@linux.vnet.ibm.com> wrote:
> Add new fields to sys params structure and update sys family for p9.
>
> In P9 the compatible string is supplied by hostboot through the HDAT.
> This patch add support for using these strings to set the compatible
> property in the device tree rather than using the machine ID number
> scheme traditionally used in the HDAT.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> [Folded Oliver's changes to original patch - Vasant]
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  hdata/spira.c | 63 +++++++++++++++++++++++++++++++++++++----------------------
>  hdata/spira.h | 17 +++++++++++++++-
>  2 files changed, 56 insertions(+), 24 deletions(-)
>
> diff --git a/hdata/spira.c b/hdata/spira.c
> index 59ffc1d..fa08824 100644
> --- a/hdata/spira.c
> +++ b/hdata/spira.c
> @@ -752,8 +752,6 @@ static void add_nx(void)
>  static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>  {
>         const struct iplparams_sysparams *p;
> -       u32 sys_type;
> -       const char *sys_family;
>         const struct HDIF_common_hdr *hdif = iplp;
>         u16 version = be16_to_cpu(hdif->version);
>
> @@ -772,29 +770,48 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>
>         dt_add_property_nstr(node, "ibm,sys-model", p->sys_model, 4);
>
> -       /* Compatible is 2 entries: ibm,powernv and ibm,<platform>
> +       /*
> +        * Compatible has up to three entries:
> +        *      "ibm,powernv", the system family and system type.
> +        *
> +        * On P9 and above the family and type strings come from the HDAT
> +        * directly. On P8 we find it from the system ID numbers.
>          */
> -       sys_type = be32_to_cpu(p->system_type);
> -       switch(sys_type >> 28) {
> -       case 0:
> -               sys_family = "ibm,squadrons";
> -               break;
> -       case 1:
> -               sys_family = "ibm,eclipz";
> -               break;
> -       case 2:
> -               sys_family = "ibm,apollo";
> -               break;
> -       case 3:
> -               sys_family = "ibm,firenze";
> -               break;
> -       default:
> -               sys_family = NULL;
> -               prerror("IPLPARAMS: Unknown system family\n");
> -               break;
> +       if (proc_gen >= proc_gen_p9) {
> +               /*
> +                * FIXME: We haven't defined P9 system model. Hence append
> +                *        "ibm,firenze" so that we can boot the system. Remove
> +                *        this once we define P9 system model.
> +                */
> +               dt_add_property_strings(dt_root, "compatible",
> +                                       "ibm,powernv", "ibm,firenze",
> +                                       p->sys_family_str, p->sys_type_str);

Is there any reason you're keying this off the processor generation
rather than the HDIF structure version? Currently hostboot doesn't
populate the type strings (and leaves the struct version on 0x51 as a
result), but it will set the sys_type field correctly. We should
always use the sys_type test in the else case if the strings aren't
populated. Hardcoding "ibm,firenze" in the else case will cause us
less issues once the strings are populated too.

> +       } else {
> +               u32 sys_type = be32_to_cpu(p->system_type);
> +               const char *sys_family;
> +
> +               switch(sys_type >> 28) {
> +               case 0:
> +                       sys_family = "ibm,squadrons";
> +                       break;
> +               case 1:
> +                       sys_family = "ibm,eclipz";
> +                       break;
> +               case 2:
> +                       sys_family = "ibm,apollo";
> +                       break;
> +               case 3:
> +                       sys_family = "ibm,firenze";
> +                       break;
> +               default:
> +                       sys_family = NULL;
> +                       prerror("IPLPARAMS: Unknown system family\n");
> +                       break;
> +               }
> +
> +               dt_add_property_strings(dt_root, "compatible", "ibm,powernv",
> +                                       sys_family);
>         }
> -       dt_add_property_strings(dt_root, "compatible", "ibm,powernv",
> -                               sys_family);
>
>         /* Grab nest frequency when available */
>         if (version >= 0x005b) {
> diff --git a/hdata/spira.h b/hdata/spira.h
> index b4facb5..dee9902 100644
> --- a/hdata/spira.h
> +++ b/hdata/spira.h
> @@ -325,6 +325,17 @@ struct iplparams_sysparams {
>         uint8_t         hw_page_table_size;     /* >= 0x59 */
>         __be16          hv_disp_wheel;          /* >= 0x58 */
>         __be32          nest_freq_mhz;          /* >= 0x5b */
> +       uint8_t         split_core_mode;        /* >= 0x5c */
> +       uint8_t         reserved[3];
> +       uint8_t         sys_vendor[64];         /* >= 0x5f */
> +       /* >= 0x60 */
> +       __be16          sys_sec_setting;
> +       __be16          tpm_config_bit;
> +       __be16          tpm_drawer;
> +       __be16          reserved2;
> +       uint8_t         hw_key_hash[64];
> +       uint8_t         sys_family_str[64];     /* vendor,name */
> +       uint8_t         sys_type_str[64];       /* vendor,type */
>  } __packed;
>
>  /* Idata index 1: IPL parameters */
> @@ -353,7 +364,11 @@ struct iplparams_iplparams {
>         uint8_t         huge_page_size;
>  #define IPLPARAMS_HUGE_PG_SIZE_16G     0
>         uint8_t         num_vlan_switches;
> -       __be64          reserved2;
> +       __be32          reserved2;
> +       __be32          enlarge_io;     /* >= 0x5a */
> +       uint8_t         core_config;
> +#define IPLPARAMS_CORE_NORMAL  0x01
> +#define IPLPARAMS_CORE_FUSE    0x01
>  };
>
>  /* Idata index 4: Platform Dump Descriptor */
> --
> 2.5.5
>
Vasant Hegde Nov. 3, 2016, 5:49 a.m. UTC | #2
On 11/02/2016 09:18 AM, Oliver O'Halloran wrote:
> On Sun, Oct 30, 2016 at 1:36 AM, Vasant Hegde
> <hegdevasant@linux.vnet.ibm.com> wrote:
>> Add new fields to sys params structure and update sys family for p9.
>>
>> In P9 the compatible string is supplied by hostboot through the HDAT.
>> This patch add support for using these strings to set the compatible
>> property in the device tree rather than using the machine ID number
>> scheme traditionally used in the HDAT.
>>
>> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>> [Folded Oliver's changes to original patch - Vasant]
>> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>> ---
>>   hdata/spira.c | 63 +++++++++++++++++++++++++++++++++++++----------------------
>>   hdata/spira.h | 17 +++++++++++++++-
>>   2 files changed, 56 insertions(+), 24 deletions(-)
>>
>> diff --git a/hdata/spira.c b/hdata/spira.c
>> index 59ffc1d..fa08824 100644
>> --- a/hdata/spira.c
>> +++ b/hdata/spira.c
>> @@ -752,8 +752,6 @@ static void add_nx(void)
>>   static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>>   {
>>          const struct iplparams_sysparams *p;
>> -       u32 sys_type;
>> -       const char *sys_family;
>>          const struct HDIF_common_hdr *hdif = iplp;
>>          u16 version = be16_to_cpu(hdif->version);
>>
>> @@ -772,29 +770,48 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>>
>>          dt_add_property_nstr(node, "ibm,sys-model", p->sys_model, 4);
>>
>> -       /* Compatible is 2 entries: ibm,powernv and ibm,<platform>
>> +       /*
>> +        * Compatible has up to three entries:
>> +        *      "ibm,powernv", the system family and system type.
>> +        *
>> +        * On P9 and above the family and type strings come from the HDAT
>> +        * directly. On P8 we find it from the system ID numbers.
>>           */
>> -       sys_type = be32_to_cpu(p->system_type);
>> -       switch(sys_type >> 28) {
>> -       case 0:
>> -               sys_family = "ibm,squadrons";
>> -               break;
>> -       case 1:
>> -               sys_family = "ibm,eclipz";
>> -               break;
>> -       case 2:
>> -               sys_family = "ibm,apollo";
>> -               break;
>> -       case 3:
>> -               sys_family = "ibm,firenze";
>> -               break;
>> -       default:
>> -               sys_family = NULL;
>> -               prerror("IPLPARAMS: Unknown system family\n");
>> -               break;
>> +       if (proc_gen >= proc_gen_p9) {
>> +               /*
>> +                * FIXME: We haven't defined P9 system model. Hence append
>> +                *        "ibm,firenze" so that we can boot the system. Remove
>> +                *        this once we define P9 system model.
>> +                */
>> +               dt_add_property_strings(dt_root, "compatible",
>> +                                       "ibm,powernv", "ibm,firenze",
>> +                                       p->sys_family_str, p->sys_type_str);
>
> Is there any reason you're keying this off the processor generation
> rather than the HDIF structure version?

Spec says these fields are implemented from HDAT v0x60.. But many cases its not 
implemented on that version.. My understanding in all HDAT on P9 onwards will 
have this field enabled. Anyway we don't care this field on P8.

Hence instead of relying on HDAT version I used processor generation.


 > Currently hostboot doesn't
> populate the type strings (and leaves the struct version on 0x51 as a
> result), but it will set the sys_type field correctly. We should
> always use the sys_type test in the else case if the strings aren't

But they are suppose to implement this field at least on P9 !

> populated. Hardcoding "ibm,firenze" in the else case will cause us
> less issues once the strings are populated too.

We don't enter else part in newer hdat anyway.

-Vasant
Oliver O'Halloran Nov. 7, 2016, 5:45 a.m. UTC | #3
On Thu, Nov 3, 2016 at 4:49 PM, Vasant Hegde
<hegdevasant@linux.vnet.ibm.com> wrote:
> On 11/02/2016 09:18 AM, Oliver O'Halloran wrote:
>>
>> Is there any reason you're keying this off the processor generation
>> rather than the HDIF structure version?
>
> Spec says these fields are implemented from HDAT v0x60.. But many cases its
> not implemented on that version.. My understanding in all HDAT on P9 onwards
> will have this field enabled. Anyway we don't care this field on P8.

What version of the spec are you reading? 10.3g specs says the HDIF
version for that struct is 0x70 in 910, not 0x60. The only fields that
depends on 0x60 are the TPM fields.

>
> Hence instead of relying on HDAT version I used processor generation.
>
>> Currently hostboot doesn't
>>
>> populate the type strings (and leaves the struct version on 0x51 as a
>> result), but it will set the sys_type field correctly. We should
>> always use the sys_type test in the else case if the strings aren't
>
>
> But they are suppose to implement this field at least on P9 !

There are two distinct HDAT generators that we need to support, one
from the FSP and one from hostboot. This patch works with the FSP
build since they populate the strings (without incrementing the
version number, but that's there bug to fix). However, it doesn't work
with the standalone hostboot since they don't populate the strings
yet. We can't rely on all P9 platforms having the same behaviour,
especially at this stage of development.
Stewart Smith Dec. 20, 2016, 4:26 a.m. UTC | #4
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:

> Add new fields to sys params structure and update sys family for p9.
>
> In P9 the compatible string is supplied by hostboot through the HDAT.
> This patch add support for using these strings to set the compatible
> property in the device tree rather than using the machine ID number
> scheme traditionally used in the HDAT.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> [Folded Oliver's changes to original patch - Vasant]
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  hdata/spira.c | 63 +++++++++++++++++++++++++++++++++++++----------------------
>  hdata/spira.h | 17 +++++++++++++++-
>  2 files changed, 56 insertions(+), 24 deletions(-)
>
> diff --git a/hdata/spira.c b/hdata/spira.c
> index 59ffc1d..fa08824 100644
> --- a/hdata/spira.c
> +++ b/hdata/spira.c
> @@ -752,8 +752,6 @@ static void add_nx(void)
>  static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>  {
>  	const struct iplparams_sysparams *p;
> -	u32 sys_type;
> -	const char *sys_family;
>  	const struct HDIF_common_hdr *hdif = iplp;
>  	u16 version = be16_to_cpu(hdif->version);
>
> @@ -772,29 +770,48 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>
>  	dt_add_property_nstr(node, "ibm,sys-model", p->sys_model, 4);
>
> -	/* Compatible is 2 entries: ibm,powernv and ibm,<platform>
> +	/*
> +	 * Compatible has up to three entries:
> +	 *	"ibm,powernv", the system family and system type.
> +	 *
> +	 * On P9 and above the family and type strings come from the HDAT
> +	 * directly. On P8 we find it from the system ID numbers.
>  	 */
> -	sys_type = be32_to_cpu(p->system_type);
> -	switch(sys_type >> 28) {
> -	case 0:
> -		sys_family = "ibm,squadrons";
> -		break;
> -	case 1:
> -		sys_family = "ibm,eclipz";
> -		break;
> -	case 2:
> -		sys_family = "ibm,apollo";
> -		break;
> -	case 3:
> -		sys_family = "ibm,firenze";
> -		break;
> -	default:
> -		sys_family = NULL;
> -		prerror("IPLPARAMS: Unknown system family\n");
> -		break;
> +	if (proc_gen >= proc_gen_p9) {
> +		/*
> +		 * FIXME: We haven't defined P9 system model. Hence append
> +		 *        "ibm,firenze" so that we can boot the system. Remove
> +		 *        this once we define P9 system model.
> +		 */
> +		dt_add_property_strings(dt_root, "compatible",
> +					"ibm,powernv", "ibm,firenze",
> +					p->sys_family_str,
> p->sys_type_str);

Is this for elsewhere in skiboot so we can boot?

Perhaps it's time to add a p9 platform?

> +	} else {
> +		u32 sys_type = be32_to_cpu(p->system_type);
> +		const char *sys_family;
> +
> +		switch(sys_type >> 28) {
> +		case 0:
> +			sys_family = "ibm,squadrons";
> +			break;
> +		case 1:
> +			sys_family = "ibm,eclipz";
> +			break;
> +		case 2:
> +			sys_family = "ibm,apollo";
> +			break;
> +		case 3:
> +			sys_family = "ibm,firenze";
> +			break;
> +		default:
> +			sys_family = NULL;
> +			prerror("IPLPARAMS: Unknown system family\n");
> +			break;
> +		}
> +
> +		dt_add_property_strings(dt_root, "compatible", "ibm,powernv",
> +					sys_family);
>  	}
> -	dt_add_property_strings(dt_root, "compatible", "ibm,powernv",
> -				sys_family);
>
>  	/* Grab nest frequency when available */
>  	if (version >= 0x005b) {
> diff --git a/hdata/spira.h b/hdata/spira.h
> index b4facb5..dee9902 100644
> --- a/hdata/spira.h
> +++ b/hdata/spira.h
> @@ -325,6 +325,17 @@ struct iplparams_sysparams {
>  	uint8_t		hw_page_table_size;	/* >= 0x59 */
>  	__be16		hv_disp_wheel;		/* >= 0x58 */
>  	__be32		nest_freq_mhz;		/* >= 0x5b */
> +	uint8_t		split_core_mode;	/* >= 0x5c */
> +	uint8_t		reserved[3];
> +	uint8_t		sys_vendor[64];		/* >= 0x5f */
> +	/* >= 0x60 */
> +	__be16		sys_sec_setting;
> +	__be16		tpm_config_bit;
> +	__be16		tpm_drawer;
> +	__be16		reserved2;
> +	uint8_t		hw_key_hash[64];
> +	uint8_t		sys_family_str[64];	/* vendor,name */
> +	uint8_t		sys_type_str[64];	/* vendor,type */
>  } __packed;
>
>  /* Idata index 1: IPL parameters */
> @@ -353,7 +364,11 @@ struct iplparams_iplparams {
>  	uint8_t		huge_page_size;
>  #define IPLPARAMS_HUGE_PG_SIZE_16G	0
>  	uint8_t		num_vlan_switches;
> -	__be64		reserved2;
> +	__be32		reserved2;
> +	__be32		enlarge_io;	/* >= 0x5a */
> +	uint8_t		core_config;
> +#define IPLPARAMS_CORE_NORMAL	0x01
> +#define IPLPARAMS_CORE_FUSE	0x01

v10.3g says normal is 0x00
Vasant Hegde Jan. 4, 2017, 10:12 a.m. UTC | #5
On 11/07/2016 11:15 AM, Oliver O'Halloran wrote:
> On Thu, Nov 3, 2016 at 4:49 PM, Vasant Hegde
> <hegdevasant@linux.vnet.ibm.com> wrote:
>> On 11/02/2016 09:18 AM, Oliver O'Halloran wrote:
>>>
>>> Is there any reason you're keying this off the processor generation
>>> rather than the HDIF structure version?
>>
>> Spec says these fields are implemented from HDAT v0x60.. But many cases its
>> not implemented on that version.. My understanding in all HDAT on P9 onwards
>> will have this field enabled. Anyway we don't care this field on P8.
>
> What version of the spec are you reading? 10.3g specs says the HDIF
> version for that struct is 0x70 in 910, not 0x60. The only fields that
> depends on 0x60 are the TPM fields.

I was referring to individual fields inside the structure.  We can check for 
HDIF version number as well (as we expect all these fields to be populated from 
0x70).

>
>>
>> Hence instead of relying on HDAT version I used processor generation.
>>
>>> Currently hostboot doesn't
>>>
>>> populate the type strings (and leaves the struct version on 0x51 as a
>>> result), but it will set the sys_type field correctly. We should
>>> always use the sys_type test in the else case if the strings aren't
>>
>>
>> But they are suppose to implement this field at least on P9 !
>
> There are two distinct HDAT generators that we need to support, one
> from the FSP and one from hostboot. This patch works with the FSP
> build since they populate the strings (without incrementing the
> version number, but that's there bug to fix). However, it doesn't work
> with the standalone hostboot since they don't populate the strings
> yet. We can't rely on all P9 platforms having the same behaviour,
> especially at this stage of development.

But if we stick to processor generation it will work fine right?

-Vasant
Vasant Hegde Jan. 4, 2017, 10:15 a.m. UTC | #6
On 12/20/2016 09:56 AM, Stewart Smith wrote:
> Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
>
>> Add new fields to sys params structure and update sys family for p9.
>>
>> In P9 the compatible string is supplied by hostboot through the HDAT.
>> This patch add support for using these strings to set the compatible
>> property in the device tree rather than using the machine ID number
>> scheme traditionally used in the HDAT.
>>
>> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>> [Folded Oliver's changes to original patch - Vasant]
>> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
>> ---
>>   hdata/spira.c | 63 +++++++++++++++++++++++++++++++++++++----------------------
>>   hdata/spira.h | 17 +++++++++++++++-
>>   2 files changed, 56 insertions(+), 24 deletions(-)
>>
>> diff --git a/hdata/spira.c b/hdata/spira.c
>> index 59ffc1d..fa08824 100644
>> --- a/hdata/spira.c
>> +++ b/hdata/spira.c
>> @@ -752,8 +752,6 @@ static void add_nx(void)
>>   static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>>   {
>>   	const struct iplparams_sysparams *p;
>> -	u32 sys_type;
>> -	const char *sys_family;
>>   	const struct HDIF_common_hdr *hdif = iplp;
>>   	u16 version = be16_to_cpu(hdif->version);
>>
>> @@ -772,29 +770,48 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
>>
>>   	dt_add_property_nstr(node, "ibm,sys-model", p->sys_model, 4);
>>
>> -	/* Compatible is 2 entries: ibm,powernv and ibm,<platform>
>> +	/*
>> +	 * Compatible has up to three entries:
>> +	 *	"ibm,powernv", the system family and system type.
>> +	 *
>> +	 * On P9 and above the family and type strings come from the HDAT
>> +	 * directly. On P8 we find it from the system ID numbers.
>>   	 */
>> -	sys_type = be32_to_cpu(p->system_type);
>> -	switch(sys_type >> 28) {
>> -	case 0:
>> -		sys_family = "ibm,squadrons";
>> -		break;
>> -	case 1:
>> -		sys_family = "ibm,eclipz";
>> -		break;
>> -	case 2:
>> -		sys_family = "ibm,apollo";
>> -		break;
>> -	case 3:
>> -		sys_family = "ibm,firenze";
>> -		break;
>> -	default:
>> -		sys_family = NULL;
>> -		prerror("IPLPARAMS: Unknown system family\n");
>> -		break;
>> +	if (proc_gen >= proc_gen_p9) {
>> +		/*
>> +		 * FIXME: We haven't defined P9 system model. Hence append
>> +		 *        "ibm,firenze" so that we can boot the system. Remove
>> +		 *        this once we define P9 system model.
>> +		 */
>> +		dt_add_property_strings(dt_root, "compatible",
>> +					"ibm,powernv", "ibm,firenze",
>> +					p->sys_family_str,
>> p->sys_type_str);
>
> Is this for elsewhere in skiboot so we can boot?

I kept it here so that once we define p9 platform we can remove this fix.

>
> Perhaps it's time to add a p9 platform?

If you prefer then we can just copy firenze code and create base p9 platform. 
Then we can redefine based on platform (like ZZ, whitherspoon etc). Let me know.


>
>> +	} else {

.../...

>>   /* Idata index 1: IPL parameters */
>> @@ -353,7 +364,11 @@ struct iplparams_iplparams {
>>   	uint8_t		huge_page_size;
>>   #define IPLPARAMS_HUGE_PG_SIZE_16G	0
>>   	uint8_t		num_vlan_switches;
>> -	__be64		reserved2;
>> +	__be32		reserved2;
>> +	__be32		enlarge_io;	/* >= 0x5a */
>> +	uint8_t		core_config;
>> +#define IPLPARAMS_CORE_NORMAL	0x01
>> +#define IPLPARAMS_CORE_FUSE	0x01
>
> v10.3g says normal is 0x00

Yep. Typo :-( Will fix. Thanks!

-Vasant
Stewart Smith Jan. 5, 2017, 11:59 p.m. UTC | #7
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
>> Perhaps it's time to add a p9 platform?
>
> If you prefer then we can just copy firenze code and create base p9 platform. 
> Then we can redefine based on platform (like ZZ, whitherspoon
> etc). Let me know.

Yeah, let's create a zz and witherspoon platform - they should mostly
just call what firenze and any bmc platform will (at least for now).
diff mbox

Patch

diff --git a/hdata/spira.c b/hdata/spira.c
index 59ffc1d..fa08824 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -752,8 +752,6 @@  static void add_nx(void)
 static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
 {
 	const struct iplparams_sysparams *p;
-	u32 sys_type;
-	const char *sys_family;
 	const struct HDIF_common_hdr *hdif = iplp;
 	u16 version = be16_to_cpu(hdif->version);
 
@@ -772,29 +770,48 @@  static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
 
 	dt_add_property_nstr(node, "ibm,sys-model", p->sys_model, 4);
 
-	/* Compatible is 2 entries: ibm,powernv and ibm,<platform>
+	/*
+	 * Compatible has up to three entries:
+	 *	"ibm,powernv", the system family and system type.
+	 *
+	 * On P9 and above the family and type strings come from the HDAT
+	 * directly. On P8 we find it from the system ID numbers.
 	 */
-	sys_type = be32_to_cpu(p->system_type);
-	switch(sys_type >> 28) {
-	case 0:
-		sys_family = "ibm,squadrons";
-		break;
-	case 1:
-		sys_family = "ibm,eclipz";
-		break;
-	case 2:
-		sys_family = "ibm,apollo";
-		break;
-	case 3:
-		sys_family = "ibm,firenze";
-		break;
-	default:
-		sys_family = NULL;
-		prerror("IPLPARAMS: Unknown system family\n");
-		break;
+	if (proc_gen >= proc_gen_p9) {
+		/*
+		 * FIXME: We haven't defined P9 system model. Hence append
+		 *        "ibm,firenze" so that we can boot the system. Remove
+		 *        this once we define P9 system model.
+		 */
+		dt_add_property_strings(dt_root, "compatible",
+					"ibm,powernv", "ibm,firenze",
+					p->sys_family_str, p->sys_type_str);
+	} else {
+		u32 sys_type = be32_to_cpu(p->system_type);
+		const char *sys_family;
+
+		switch(sys_type >> 28) {
+		case 0:
+			sys_family = "ibm,squadrons";
+			break;
+		case 1:
+			sys_family = "ibm,eclipz";
+			break;
+		case 2:
+			sys_family = "ibm,apollo";
+			break;
+		case 3:
+			sys_family = "ibm,firenze";
+			break;
+		default:
+			sys_family = NULL;
+			prerror("IPLPARAMS: Unknown system family\n");
+			break;
+		}
+
+		dt_add_property_strings(dt_root, "compatible", "ibm,powernv",
+					sys_family);
 	}
-	dt_add_property_strings(dt_root, "compatible", "ibm,powernv",
-				sys_family);
 
 	/* Grab nest frequency when available */
 	if (version >= 0x005b) {
diff --git a/hdata/spira.h b/hdata/spira.h
index b4facb5..dee9902 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -325,6 +325,17 @@  struct iplparams_sysparams {
 	uint8_t		hw_page_table_size;	/* >= 0x59 */
 	__be16		hv_disp_wheel;		/* >= 0x58 */
 	__be32		nest_freq_mhz;		/* >= 0x5b */
+	uint8_t		split_core_mode;	/* >= 0x5c */
+	uint8_t		reserved[3];
+	uint8_t		sys_vendor[64];		/* >= 0x5f */
+	/* >= 0x60 */
+	__be16		sys_sec_setting;
+	__be16		tpm_config_bit;
+	__be16		tpm_drawer;
+	__be16		reserved2;
+	uint8_t		hw_key_hash[64];
+	uint8_t		sys_family_str[64];	/* vendor,name */
+	uint8_t		sys_type_str[64];	/* vendor,type */
 } __packed;
 
 /* Idata index 1: IPL parameters */
@@ -353,7 +364,11 @@  struct iplparams_iplparams {
 	uint8_t		huge_page_size;
 #define IPLPARAMS_HUGE_PG_SIZE_16G	0
 	uint8_t		num_vlan_switches;
-	__be64		reserved2;
+	__be32		reserved2;
+	__be32		enlarge_io;	/* >= 0x5a */
+	uint8_t		core_config;
+#define IPLPARAMS_CORE_NORMAL	0x01
+#define IPLPARAMS_CORE_FUSE	0x01
 };
 
 /* Idata index 4: Platform Dump Descriptor */