Lines Matching +full:hart +full:- +full:1
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2019 FORTH-ICS/CARV
22 * machine_kexec_prepare - Initialize kexec
33 struct kimage_arch *internal = &image->arch; in machine_kexec_prepare()
40 for (i = 0; i < image->nr_segments; i++) { in machine_kexec_prepare()
41 if (image->segment[i].memsz <= sizeof(fdt)) in machine_kexec_prepare()
44 if (image->file_mode) in machine_kexec_prepare()
45 memcpy(&fdt, image->segment[i].buf, sizeof(fdt)); in machine_kexec_prepare()
46 else if (copy_from_user(&fdt, image->segment[i].buf, sizeof(fdt))) in machine_kexec_prepare()
52 internal->fdt_addr = (unsigned long) image->segment[i].mem; in machine_kexec_prepare()
56 if (!internal->fdt_addr) { in machine_kexec_prepare()
58 return -EINVAL; in machine_kexec_prepare()
62 if (image->type != KEXEC_TYPE_CRASH) { in machine_kexec_prepare()
63 control_code_buffer = page_address(image->control_code_page); in machine_kexec_prepare()
64 control_code_buffer_sz = page_size(image->control_code_page); in machine_kexec_prepare()
68 return -EINVAL; in machine_kexec_prepare()
75 set_memory_x((unsigned long) control_code_buffer, 1); in machine_kexec_prepare()
83 * machine_kexec_cleanup - Cleanup any leftovers from
86 * This function is called by kimage_free to handle any arch-specific
98 * machine_shutdown - Prepare for a kexec reboot
107 * No more interrupts on this hart in machine_shutdown()
118 * machine_crash_shutdown - Prepare to kexec after a kernel crash
121 * and its goal is to shutdown non-crashing cpus and save registers.
128 /* shutdown non-crashing cpus */ in machine_crash_shutdown()
138 * machine_kexec - Jump to the loaded kimage
142 * or by crash_kernel which is called by the kernel's arch-specific
144 * the kexec process where the pre-loaded kimage is ready to be
146 * suspended and this hart will be the new boot hart.
151 struct kimage_arch *internal = &image->arch; in machine_kexec()
152 unsigned long jump_addr = (unsigned long) image->start; in machine_kexec()
153 unsigned long first_ind_entry = (unsigned long) &image->head; in machine_kexec()
156 unsigned long fdt_addr = internal->fdt_addr; in machine_kexec()
157 void *control_code_buffer = page_address(image->control_code_page); in machine_kexec()
165 if (image->type != KEXEC_TYPE_CRASH) in machine_kexec()
170 pr_notice("Will call new kernel at %08lx from hart id %lx\n", in machine_kexec()
174 /* Make sure the relocation code is visible to the hart */ in machine_kexec()