diff mbox

[V3,1/8] powerpc/firmware: Add definitions for new firmware features.

Message ID 8e1bef10-1514-d309-a994-ca1dd4ea49b2@linux.vnet.ibm.com (mailing list archive)
State Superseded
Headers show

Commit Message

Michael Bringmann Aug. 2, 2016, 12:42 a.m. UTC
Firmware Features: Define new bit flags representing the presence of
new device tree properties "ibm,drc-info", and "ibm,dynamic-memory-v2".
These flags are used to tell the front end processor when the Linux
kernel supports the new properties, and by the front end processor to
tell the Linux kernel that the new properties are present in the devie
tree.

Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
---

Comments

Bharata B Rao Aug. 17, 2016, 7:34 a.m. UTC | #1
On Tue, Aug 2, 2016 at 6:12 AM, Michael Bringmann
<mwb@linux.vnet.ibm.com> wrote:
> Firmware Features: Define new bit flags representing the presence of
> new device tree properties "ibm,drc-info", and "ibm,dynamic-memory-v2".
> These flags are used to tell the front end processor when the Linux
> kernel supports the new properties, and by the front end processor to
> tell the Linux kernel that the new properties are present in the devie
> tree.
>
> Signed-off-by: Michael Bringmann <mwb@linux.vnet.ibm.com>
> ---
> diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
> index b062924..a9d66d5 100644
> --- a/arch/powerpc/include/asm/firmware.h
> +++ b/arch/powerpc/include/asm/firmware.h
> @@ -51,6 +51,8 @@
>  #define FW_FEATURE_BEST_ENERGY ASM_CONST(0x0000000080000000)
>  #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
>  #define FW_FEATURE_PRRN                ASM_CONST(0x0000000200000000)
> +#define FW_FEATURE_DYN_MEM_V2  ASM_CONST(0x0000000400000000)
> +#define FW_FEATURE_DRC_INFO    ASM_CONST(0x0000000800000000)
>
>  #ifndef __ASSEMBLY__
>
> @@ -66,7 +68,8 @@ enum {
>                 FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
>                 FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO |
>                 FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
> -               FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
> +               FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN |
> +               FW_FEATURE_DYN_MEM_V2 | FW_FEATURE_DRC_INFO,
>         FW_FEATURE_PSERIES_ALWAYS = 0,
>         FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL,
>         FW_FEATURE_POWERNV_ALWAYS = 0,
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index 7f436ba..b9a1534 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -155,6 +203,8 @@ struct of_drconf_cell {
>  #define OV5_PFO_HW_842         0x0E40  /* PFO Compression Accelerator */
>  #define OV5_PFO_HW_ENCR                0x0E20  /* PFO Encryption Accelerator */
>  #define OV5_SUB_PROCESSORS     0x0F01  /* 1,2,or 4 Sub-Processors supported */
> +#define OV5_DYN_MEM_V2         0x1680  /* Redef Prop Structures: dyn-mem-v2 */
> +#define OV5_DRC_INFO           0x1640  /* Redef Prop Structures: drc-info   */

Shouldn't these two features be set in ibm_architecture_vec[] so that
guest firmware knows when to generate these two new device tree
properties ?

Regards,
Bharata.
diff mbox

Patch

diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/include/asm/firmware.h
index b062924..a9d66d5 100644
--- a/arch/powerpc/include/asm/firmware.h
+++ b/arch/powerpc/include/asm/firmware.h
@@ -51,6 +51,8 @@ 
 #define FW_FEATURE_BEST_ENERGY	ASM_CONST(0x0000000080000000)
 #define FW_FEATURE_TYPE1_AFFINITY ASM_CONST(0x0000000100000000)
 #define FW_FEATURE_PRRN		ASM_CONST(0x0000000200000000)
+#define FW_FEATURE_DYN_MEM_V2	ASM_CONST(0x0000000400000000)
+#define FW_FEATURE_DRC_INFO	ASM_CONST(0x0000000800000000)
 
 #ifndef __ASSEMBLY__
 
@@ -66,7 +68,8 @@  enum {
 		FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
 		FW_FEATURE_CMO | FW_FEATURE_VPHN | FW_FEATURE_XCMO |
 		FW_FEATURE_SET_MODE | FW_FEATURE_BEST_ENERGY |
-		FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN,
+		FW_FEATURE_TYPE1_AFFINITY | FW_FEATURE_PRRN |
+		FW_FEATURE_DYN_MEM_V2 | FW_FEATURE_DRC_INFO,
 	FW_FEATURE_PSERIES_ALWAYS = 0,
 	FW_FEATURE_POWERNV_POSSIBLE = FW_FEATURE_OPAL,
 	FW_FEATURE_POWERNV_ALWAYS = 0,
diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
index 7f436ba..b9a1534 100644
--- a/arch/powerpc/include/asm/prom.h
+++ b/arch/powerpc/include/asm/prom.h
@@ -155,6 +203,8 @@  struct of_drconf_cell {
 #define OV5_PFO_HW_842		0x0E40	/* PFO Compression Accelerator */
 #define OV5_PFO_HW_ENCR		0x0E20	/* PFO Encryption Accelerator */
 #define OV5_SUB_PROCESSORS	0x0F01	/* 1,2,or 4 Sub-Processors supported */
+#define OV5_DYN_MEM_V2		0x1680	/* Redef Prop Structures: dyn-mem-v2 */
+#define OV5_DRC_INFO		0x1640	/* Redef Prop Structures: drc-info   */
 
 /* Option Vector 6: IBM PAPR hints */
 #define OV6_LINUX		0x02	/* Linux is our OS */
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 8c80588..00243ee 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -111,6 +111,8 @@  static __initdata struct vec5_fw_feature
 vec5_fw_features_table[] = {
 	{FW_FEATURE_TYPE1_AFFINITY,	OV5_TYPE1_AFFINITY},
 	{FW_FEATURE_PRRN,		OV5_PRRN},
+	{FW_FEATURE_DYN_MEM_V2,		OV5_DYN_MEM_V2},
+	{FW_FEATURE_DRC_INFO,		OV5_DRC_INFO},
 };
 
 void __init fw_vec5_feature_init(const char *vec5, unsigned long len)