[S390] use facility list for cpu type safety check
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
ce58ae6f7f
commit
8c4caa4fbf
|
@ -30,6 +30,7 @@
|
||||||
#define __LC_SUBCHANNEL_NR 0x00ba
|
#define __LC_SUBCHANNEL_NR 0x00ba
|
||||||
#define __LC_IO_INT_PARM 0x00bc
|
#define __LC_IO_INT_PARM 0x00bc
|
||||||
#define __LC_IO_INT_WORD 0x00c0
|
#define __LC_IO_INT_WORD 0x00c0
|
||||||
|
#define __LC_STFL_FAC_LIST 0x00c8
|
||||||
#define __LC_MCCK_CODE 0x00e8
|
#define __LC_MCCK_CODE 0x00e8
|
||||||
|
|
||||||
#define __LC_DUMP_REIPL 0x0e00
|
#define __LC_DUMP_REIPL 0x0e00
|
||||||
|
|
|
@ -479,27 +479,46 @@ startup:basr %r13,0 # get base
|
||||||
mvc __LC_LAST_UPDATE_TIMER(8),6f-.LPG0(%r13)
|
mvc __LC_LAST_UPDATE_TIMER(8),6f-.LPG0(%r13)
|
||||||
mvc __LC_EXIT_TIMER(8),5f-.LPG0(%r13)
|
mvc __LC_EXIT_TIMER(8),5f-.LPG0(%r13)
|
||||||
#ifndef CONFIG_MARCH_G5
|
#ifndef CONFIG_MARCH_G5
|
||||||
# check processor version against MARCH_{G5,Z900,Z990,Z9_109,Z10}
|
# check capabilities against MARCH_{G5,Z900,Z990,Z9_109,Z10}
|
||||||
stidp __LC_CPUID # store cpuid
|
xc __LC_STFL_FAC_LIST(8),__LC_STFL_FAC_LIST
|
||||||
lhi %r0,(3f-2f) / 2
|
stfl __LC_STFL_FAC_LIST # store facility list
|
||||||
la %r1,2f-.LPG0(%r13)
|
tm __LC_STFL_FAC_LIST,0x01 # stfle available ?
|
||||||
0: clc __LC_CPUID+4(2),0(%r1)
|
jz 0f
|
||||||
jne 3f
|
la %r0,0
|
||||||
lpsw 1f-.LPG0(13) # machine type not good enough, crash
|
.insn s,0xb2b00000,__LC_STFL_FAC_LIST # store facility list extended
|
||||||
|
0: l %r0,__LC_STFL_FAC_LIST
|
||||||
|
n %r0,2f+8-.LPG0(%r13)
|
||||||
|
cl %r0,2f+8-.LPG0(%r13)
|
||||||
|
jne 1f
|
||||||
|
l %r0,__LC_STFL_FAC_LIST+4
|
||||||
|
n %r0,2f+12-.LPG0(%r13)
|
||||||
|
cl %r0,2f+12-.LPG0(%r13)
|
||||||
|
je 3f
|
||||||
|
1: lpsw 2f-.LPG0(13) # machine type not good enough, crash
|
||||||
.align 16
|
.align 16
|
||||||
1: .long 0x000a0000,0x00000000
|
2: .long 0x000a0000,0x8badcccc
|
||||||
2:
|
#if defined(CONFIG_64BIT)
|
||||||
#if defined(CONFIG_MARCH_Z10)
|
#if defined(CONFIG_MARCH_Z10)
|
||||||
.short 0x9672, 0x2064, 0x2066, 0x2084, 0x2086, 0x2094, 0x2096
|
.long 0xc100efe3, 0xf0680000
|
||||||
#elif defined(CONFIG_MARCH_Z9_109)
|
#elif defined(CONFIG_MARCH_Z9_109)
|
||||||
.short 0x9672, 0x2064, 0x2066, 0x2084, 0x2086
|
.long 0xc100efc3, 0x00000000
|
||||||
#elif defined(CONFIG_MARCH_Z990)
|
#elif defined(CONFIG_MARCH_Z990)
|
||||||
.short 0x9672, 0x2064, 0x2066
|
.long 0xc0002000, 0x00000000
|
||||||
#elif defined(CONFIG_MARCH_Z900)
|
#elif defined(CONFIG_MARCH_Z900)
|
||||||
.short 0x9672
|
.long 0xc0000000, 0x00000000
|
||||||
#endif
|
#endif
|
||||||
3: la %r1,2(%r1)
|
#else
|
||||||
brct %r0,0b
|
#if defined(CONFIG_MARCH_Z10)
|
||||||
|
.long 0x8100c880, 0x00000000
|
||||||
|
#elif defined(CONFIG_MARCH_Z9_109)
|
||||||
|
.long 0x8100c880, 0x00000000
|
||||||
|
#elif defined(CONFIG_MARCH_Z990)
|
||||||
|
.long 0x80002000, 0x00000000
|
||||||
|
#elif defined(CONFIG_MARCH_Z900)
|
||||||
|
.long 0x80000000, 0x00000000
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
3:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
l %r13,4f-.LPG0(%r13)
|
l %r13,4f-.LPG0(%r13)
|
||||||
|
|
Loading…
Reference in New Issue