static int __init kexec_module_init(void)
{
-// sys_call_table=(void **)find_sys_call_table();
-// if(sys_call_table==NULL) {
-// printk(KERN_ERR "Cannot find the system call address\n");
-// return -1; // do not load
-// }
+ sys_call_table=(void **)find_sys_call_table();
+ if(sys_call_table==NULL) {
+ printk(KERN_ERR "Cannot find the system call address\n");
+ return -1; // do not load
+ }
+
+ printk(KERN_INFO "kexec: Found sys_call_table at: %p\n", sys_call_table);
- sys_call_table=(void **)0xc003d004;
+ //sys_call_table=(void **)0xc003d004;
+ sys_call_table=(void **)0xc00350c4;
+ printk(KERN_INFO "kexec: Force sys_call_table at: %p\n", sys_call_table);
/* Set kexec_load() syscall. */
sys_call_table[__NR_kexec_load]=kexec_load;