.. | .. |
---|
7 | 7 | #include <asm/facility.h> |
---|
8 | 8 | #include <asm/lowcore.h> |
---|
9 | 9 | #include <asm/sclp.h> |
---|
| 10 | +#include "boot.h" |
---|
10 | 11 | |
---|
11 | 12 | /* |
---|
12 | 13 | * The code within this file will be called very early. It may _not_ |
---|
.. | .. |
---|
58 | 59 | *str = '\0'; |
---|
59 | 60 | } |
---|
60 | 61 | |
---|
61 | | -static void print_missing_facilities(void) |
---|
| 62 | +void print_missing_facilities(void) |
---|
62 | 63 | { |
---|
63 | 64 | static char als_str[80] = "Missing facilities: "; |
---|
64 | 65 | unsigned long val; |
---|
.. | .. |
---|
90 | 91 | } |
---|
91 | 92 | strcat(als_str, "\n"); |
---|
92 | 93 | sclp_early_printk(als_str); |
---|
93 | | - sclp_early_printk("See Principles of Operations for facility bits\n"); |
---|
94 | 94 | } |
---|
95 | 95 | |
---|
96 | 96 | static void facility_mismatch(void) |
---|
.. | .. |
---|
98 | 98 | sclp_early_printk("The Linux kernel requires more recent processor hardware\n"); |
---|
99 | 99 | print_machine_type(); |
---|
100 | 100 | print_missing_facilities(); |
---|
101 | | - disabled_wait(0x8badcccc); |
---|
| 101 | + sclp_early_printk("See Principles of Operations for facility bits\n"); |
---|
| 102 | + disabled_wait(); |
---|
102 | 103 | } |
---|
103 | 104 | |
---|
104 | 105 | void verify_facilities(void) |
---|
105 | 106 | { |
---|
106 | 107 | int i; |
---|
107 | 108 | |
---|
108 | | - for (i = 0; i < ARRAY_SIZE(S390_lowcore.stfle_fac_list); i++) |
---|
109 | | - S390_lowcore.stfle_fac_list[i] = 0; |
---|
110 | | - asm volatile( |
---|
111 | | - " stfl 0(0)\n" |
---|
112 | | - : "=m" (S390_lowcore.stfl_fac_list)); |
---|
113 | | - S390_lowcore.stfle_fac_list[0] = (u64)S390_lowcore.stfl_fac_list << 32; |
---|
114 | | - if (S390_lowcore.stfl_fac_list & 0x01000000) { |
---|
115 | | - register unsigned long reg0 asm("0") = ARRAY_SIZE(als) - 1; |
---|
116 | | - |
---|
117 | | - asm volatile(".insn s,0xb2b00000,0(%1)" /* stfle */ |
---|
118 | | - : "+d" (reg0) |
---|
119 | | - : "a" (&S390_lowcore.stfle_fac_list) |
---|
120 | | - : "memory", "cc"); |
---|
121 | | - } |
---|
| 109 | + __stfle(S390_lowcore.stfle_fac_list, ARRAY_SIZE(S390_lowcore.stfle_fac_list)); |
---|
122 | 110 | for (i = 0; i < ARRAY_SIZE(als); i++) { |
---|
123 | 111 | if ((S390_lowcore.stfle_fac_list[i] & als[i]) != als[i]) |
---|
124 | 112 | facility_mismatch(); |
---|