aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/head.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:19 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:12 -0500
commite37f50e1811d68170e4d58a087cf634b2bf1cef9 (patch)
tree49296845bd5e651ca7ec70f1dedca6db8deedb66 /arch/s390/kernel/head.S
parentb3b59d3339c907b1dec3ce19f62b2a7f120d142d (diff)
[S390] Add processor type march=z10 and a processor type safety check.
This patch adds the code generation option for IBM System z10 and adds a check in head[31,64].S to prevents the execution of a kernel compiled for a new processor type on an old machine. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/head.S')
-rw-r--r--arch/s390/kernel/head.S49
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index 83477c7dc743..ec7e35f6055b 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -461,6 +461,55 @@ start:
461 .byte 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7 461 .byte 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7
462 .byte 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff 462 .byte 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff
463 463
464#
465# startup-code at 0x10000, running in absolute addressing mode
466# this is called either by the ipl loader or directly by PSW restart
467# or linload or SALIPL
468#
469 .org 0x10000
470startup:basr %r13,0 # get base
471.LPG0:
472
473#ifndef CONFIG_MARCH_G5
474 # check processor version against MARCH_{G5,Z900,Z990,Z9_109,Z10}
475 stidp __LC_CPUID # store cpuid
476 lhi %r0,(3f-2f) / 2
477 la %r1,2f-.LPG0(%r13)
4780: clc __LC_CPUID+4(2),0(%r1)
479 jne 3f
480 lpsw 1f-.LPG0(13) # machine type not good enough, crash
481 .align 16
4821: .long 0x000a0000,0x00000000
4832:
484#if defined(CONFIG_MARCH_Z10)
485 .short 0x9672, 0x2064, 0x2066, 0x2084, 0x2086, 0x2094, 0x2096
486#elif defined(CONFIG_MARCH_Z9_109)
487 .short 0x9672, 0x2064, 0x2066, 0x2084, 0x2086
488#elif defined(CONFIG_MARCH_Z990)
489 .short 0x9672, 0x2064, 0x2066
490#elif defined(CONFIG_MARCH_Z900)
491 .short 0x9672
492#endif
4933: la %r1,2(%r1)
494 brct %r0,0b
495#endif
496
497 l %r13,0f-.LPG0(%r13)
498 b 0(%r13)
4990: .long startup_continue
500
501#
502# params at 10400 (setup.h)
503#
504 .org PARMAREA
505 .long 0,0 # IPL_DEVICE
506 .long 0,0 # INITRD_START
507 .long 0,0 # INITRD_SIZE
508
509 .org COMMAND_LINE
510 .byte "root=/dev/ram0 ro"
511 .byte 0
512
464#ifdef CONFIG_64BIT 513#ifdef CONFIG_64BIT
465#include "head64.S" 514#include "head64.S"
466#else 515#else