Skip to contentSkip to conversation

powerpc/rtas_flash: New return code to indicate FW entitlement expiry

PATCH In review Vasant Hegde 3 participants 6 messages Apr 19, 2013 – Apr 23, 2013 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/rtas_flash: New return code to indicate FW entitlement expiry

Add new return code to rtas_flash to indicate firmware entitlement expiry. This will be used by the update_flash script to return appropriate message to the user.

---
 arch/powerpc/kernel/rtas_flash.c |    1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/rtas_flash.c +1 -0
index a7020d2..0a12c16 100644
@@ -64,6 +64,7 @@
 #define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
 #define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
 #define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
+#define VALIDATE_OUT_OF_WRNTY  7     /* Validate Return Status */
 
 /* ibm,manage-flash-image operation tokens */
 #define RTAS_REJECT_TMP_IMG   0
#1 lore raw
Quoted 3 lines · Vasant Hegde

Add new return code to rtas_flash to indicate firmware entitlement expiry. This will be used by the update_flash script to return appropriate message to the user.

What's the point of that patch ? It adds a definition to a private .c file not exposed to user space and doesn't do anything with it ...

Ben.

Quoted 18 lines
---
 arch/powerpc/kernel/rtas_flash.c |    1 +
 1 file changed, 1 insertion(+)
arch/powerpc/kernel/rtas_flash.c +1 -0
index a7020d2..0a12c16 100644
@@ -64,6 +64,7 @@
 #define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
 #define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
 #define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
+#define VALIDATE_OUT_OF_WRNTY  7     /* Validate Return Status */
 
 /* ibm,manage-flash-image operation tokens */
 #define RTAS_REJECT_TMP_IMG   0
#2 lore raw
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · Vasant Hegde

Add new return code to rtas_flash to indicate firmware entitlement expiry. This will be used by the update_flash script to return appropriate message to the user.

What's the point of that patch ? It adds a definition to a private .c file not exposed to user space and doesn't do anything with it ...

Ben,

The userspace update_flash script invokes the rtas_flash module. With upcoming System p servers, the firmware will have the entitlement dates encoded in it and RTAS will return an error if the entitlement has expired. All we need from this module is for it to return that new error which will then be communicated to the user by the update_flash.

Ananth

#3 lore raw
Quoted 9 lines · Ananth N Mavinakayanahalli
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · Vasant Hegde

Add new return code to rtas_flash to indicate firmware entitlement expiry. This will be used by the update_flash script to return appropriate message to the user.

What's the point of that patch ? It adds a definition to a private .c file not exposed to user space and doesn't do anything with it ...

Quoted 7 lines

Ben,

The userspace update_flash script invokes the rtas_flash module. With upcoming System p servers, the firmware will have the entitlement dates encoded in it and RTAS will return an error if the entitlement has expired. All we need from this module is for it to return that new error which will then be communicated to the user by the update_flash.

That doesn't answer my question :-)

What is the point of adding a #define to a piece of code without any user of that definition and in a file that isn't exposed to user space ?

IE. What is the point of the patch ?

Cheers,
Ben.

#4 lore raw
Quoted 18 lines · Benjamin Herrenschmidt
Quoted 9 lines · Ananth N Mavinakayanahalli
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 3 lines · Vasant Hegde

Add new return code to rtas_flash to indicate firmware entitlement expiry. This will be used by the update_flash script to return appropriate message to the user.

What's the point of that patch ? It adds a definition to a private .c file not exposed to user space and doesn't do anything with it ...

Quoted 7 lines

Ben,

The userspace update_flash script invokes the rtas_flash module. With upcoming System p servers, the firmware will have the entitlement dates encoded in it and RTAS will return an error if the entitlement has expired. All we need from this module is for it to return that new error which will then be communicated to the user by the update_flash.

Quoted 6 lines

That doesn't answer my question :-)

What is the point of adding a #define to a piece of code without any user of that definition and in a file that isn't exposed to user space ?

IE. What is the point of the patch ?

Strictly, we don't need this (kernel) update...

But to keep the code in sync with PAPR, this was added. Agree that the other return codes also don't say much about what they are for. Will redo the patch with that info for better code readability.

#5 lore raw
In reply to Benjamin Herrenschmidt
Quoted 8 lines · Benjamin Herrenschmidt
Quoted 3 lines · Vasant Hegde

Add new return code to rtas_flash to indicate firmware entitlement expiry. This will be used by the update_flash script to return appropriate message to the user.

What's the point of that patch ? It adds a definition to a private .c file not exposed to user space and doesn't do anything with it ...

This is to keep our code in sync with PAPR. And when we get this return
code from "ibm,validate-flash-image" RTAS call, user space tools (update_flash) reads output buffer via /proc interface to display appropriate message to user.

-Vasant

Quoted 22 lines

Ben.

Quoted 18 lines
---
  arch/powerpc/kernel/rtas_flash.c |    1 +
  1 file changed, 1 insertion(+)
arch/powerpc/kernel/rtas_flash.c +1 -0
index a7020d2..0a12c16 100644
@@ -64,6 +64,7 @@
  #define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
  #define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
  #define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
+#define VALIDATE_OUT_OF_WRNTY  7     /* Validate Return Status */
 
  /* ibm,manage-flash-image operation tokens */
  #define RTAS_REJECT_TMP_IMG   0