aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/ipl.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-02-05 15:18:37 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-02-05 15:18:37 -0500
commitab14de6c37fae22911ba99f4171613e6d758050b (patch)
tree7545169fe9d64a82616ae37f2b6c1a420c77f30f /arch/s390/kernel/ipl.c
parent31ee4b2f40994e8b21691f85cdd4052551a789b7 (diff)
[S390] Convert memory detection into C code.
Hopefully this will make it more maintainable and less error prone. Code makes use of search_exception_tables(). Since it calls this function before the kernel exeception table is sorted, there is an early call to sort_main_extable(). This way it's easy to use the already present infrastructure of fixup sections. Also this would allows to easily convert the rest of head[31|64].S into C code. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/ipl.c')
-rw-r--r--arch/s390/kernel/ipl.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 13eacce62011..052259530651 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -20,14 +20,13 @@
20#include <asm/cio.h> 20#include <asm/cio.h>
21#include <asm/ebcdic.h> 21#include <asm/ebcdic.h>
22#include <asm/reset.h> 22#include <asm/reset.h>
23#include <asm/sclp.h>
23 24
24#define IPL_PARM_BLOCK_VERSION 0 25#define IPL_PARM_BLOCK_VERSION 0
25#define LOADPARM_LEN 8
26 26
27extern char s390_readinfo_sccb[]; 27#define SCCB_VALID (s390_readinfo_sccb.header.response_code == 0x10)
28#define SCCB_VALID (*((__u16*)&s390_readinfo_sccb[6]) == 0x0010) 28#define SCCB_LOADPARM (&s390_readinfo_sccb.loadparm)
29#define SCCB_LOADPARM (&s390_readinfo_sccb[24]) 29#define SCCB_FLAG (s390_readinfo_sccb.flags)
30#define SCCB_FLAG (s390_readinfo_sccb[91])
31 30
32enum ipl_type { 31enum ipl_type {
33 IPL_TYPE_NONE = 1, 32 IPL_TYPE_NONE = 1,
@@ -1080,8 +1079,6 @@ static void do_reset_calls(void)
1080 reset->fn(); 1079 reset->fn();
1081} 1080}
1082 1081
1083extern void reset_mcck_handler(void);
1084extern void reset_pgm_handler(void);
1085extern __u32 dump_prefix_page; 1082extern __u32 dump_prefix_page;
1086 1083
1087void s390_reset_system(void) 1084void s390_reset_system(void)
@@ -1105,12 +1102,12 @@ void s390_reset_system(void)
1105 /* Set new machine check handler */ 1102 /* Set new machine check handler */
1106 S390_lowcore.mcck_new_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK; 1103 S390_lowcore.mcck_new_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
1107 S390_lowcore.mcck_new_psw.addr = 1104 S390_lowcore.mcck_new_psw.addr =
1108 PSW_ADDR_AMODE | (unsigned long) &reset_mcck_handler; 1105 PSW_ADDR_AMODE | (unsigned long) s390_base_mcck_handler;
1109 1106
1110 /* Set new program check handler */ 1107 /* Set new program check handler */
1111 S390_lowcore.program_new_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK; 1108 S390_lowcore.program_new_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK;
1112 S390_lowcore.program_new_psw.addr = 1109 S390_lowcore.program_new_psw.addr =
1113 PSW_ADDR_AMODE | (unsigned long) &reset_pgm_handler; 1110 PSW_ADDR_AMODE | (unsigned long) s390_base_pgm_handler;
1114 1111
1115 do_reset_calls(); 1112 do_reset_calls();
1116} 1113}