Skip to contentSkip to conversation

s390/setup: set control program code via diag 318

PATCH Collin Walling 1 participant 1 message Sep 19, 2018 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 40 lines · Cornelia Huck
Quoted 2 lines · On Fri, 31 Aug 2018 12:51:17 -0400 Collin Walling <[email protected]> wrote:

The s390x diagnose 318 instruction sets the control program name code (CPNC) and control program version code (CPVC) to provide usefu information regarding

s/usefu/useful/

Quoted 32 lines

the OS during debugging. The CPNC is explicitly set to 4 to indicate a Linux/KVM environment.

The CPVC is a 7-byte value containing:

- 3-byte Linux version code
- 3-byte distribution identifier set in the config file
- 1-byte null

The distro ID is set by the Kconfig option "Distribution Identifier" under the "Processors Type and Features" section.

---
 arch/s390/Kconfig              |  8 ++++++++
 arch/s390/include/asm/diag.h   | 12 ++++++++++++
 arch/s390/include/asm/sclp.h   |  1 +
 arch/s390/kernel/diag.c        |  1 +
 arch/s390/kernel/setup.c       | 23 +++++++++++++++++++++++
 drivers/s390/char/sclp_early.c |  6 +++++-
 6 files changed, 50 insertions(+), 1 deletion(-)
arch/s390/Kconfig +0 -0
index 9a9c7a6..ca7fbd0fc 100644
@@ -595,6 +595,14 @@ config EXPOLINE_FULL
 
 endchoice
 
Quoted 10 lines

arch/s390/Kconfig config EXPOLINE_FULL · line 604

Quoted 7 lines
arch/s390/Kconfig +7 -0
+config DISTRO_ID
+	string "Distribution Identifier"
+	help
+	  This option sets a unique distribution identifier for this kernel build
+	  that will assist with internal problem diagnosis for IBM Z.
+
+	  Only the first three characters of this string will be utilized.

Might be a good place to point to a registry for known values.

Agreed. Next version I will include this file as a template, and I'll have the description for this option point to it.

Quoted 3 lines

And perhaps "If you don't know what to set here, leave this value empty."?

Good idea.

Quoted 5 lines

arch/s390/Kconfig config EXPOLINE_FULL · line 608

Quoted 4 lines
arch/s390/Kconfig +1 -0
+
 endmenu
 
 menu "Memory setup"

Thanks

Signature · 2 lines
Respectfully,
- Collin Walling