extern "C" void platform_start_kernel(void) { preloaded_elf32_image *image = static_cast<preloaded_elf32_image *>( gKernelArgs.kernel_image.Pointer()); addr_t kernelEntry = image->elf_header.e_entry; addr_t stackTop = gKernelArgs.cpu_kstack[0].start + gKernelArgs.cpu_kstack[0].size; // clone the Flattened Device Tree blob into the kernel args if we've got it if (gFDT) { size_t fdtSize = fdt_totalsize(gFDT); gKernelArgs.platform_args.fdt = kernel_args_malloc(fdtSize); memcpy(gKernelArgs.platform_args.fdt, gFDT, fdtSize); } // smp_init_other_cpus(); serial_cleanup(); mmu_init_for_kernel(); // smp_boot_other_cpus(); dprintf("kernel entry at %lx\n", kernelEntry); status_t error = arch_start_kernel(&gKernelArgs, kernelEntry, stackTop); panic("kernel returned %lx!\n", error); }
extern "C" void platform_start_kernel(void) { preloaded_elf32_image *image = static_cast<preloaded_elf32_image *>( gKernelArgs.kernel_image.Pointer()); addr_t kernelEntry = image->elf_header.e_entry; addr_t stackTop = gKernelArgs.cpu_kstack[0].start + gKernelArgs.cpu_kstack[0].size; // smp_init_other_cpus(); serial_cleanup(); mmu_init_for_kernel(); // smp_boot_other_cpus(); dprintf("kernel entry at %lx\n", kernelEntry); status_t error = arch_start_kernel(&gKernelArgs, kernelEntry, stackTop); panic("kernel returned!\n"); }