void machine_kexec_setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)
{
	void *control_page;

	memset(xki->page_list, 0, sizeof(xki->page_list));

	control_page = page_address(image->control_code_page);
	memcpy(control_page, relocate_kernel, PAGE_SIZE);

	xki->page_list[PA_CONTROL_PAGE] = __ma(control_page);
	xki->page_list[PA_PGD] = __ma(image->arch.pgd);

	if (image->type == KEXEC_TYPE_DEFAULT)
		xki->page_list[PA_SWAP_PAGE] = page_to_phys(image->swap_page);
}
Exemple #2
0
void machine_kexec_setup_load_arg(xen_kexec_image_t *xki, struct kimage *image)
{
	void *control_page;
	void *table_page;

	memset(xki->page_list, 0, sizeof(xki->page_list));

	control_page = page_address(image->control_code_page) + PAGE_SIZE;
	memcpy(control_page, relocate_kernel, PAGE_SIZE);

	table_page = page_address(image->control_code_page);

	xki->page_list[PA_CONTROL_PAGE] = __ma(control_page);
	xki->page_list[PA_TABLE_PAGE] = __ma(table_page);

	xki->page_list[PA_PGD] = __ma(kexec_pgd);
	xki->page_list[PA_PUD_0] = __ma(kexec_pud0);
	xki->page_list[PA_PUD_1] = __ma(kexec_pud1);
	xki->page_list[PA_PMD_0] = __ma(kexec_pmd0);
	xki->page_list[PA_PMD_1] = __ma(kexec_pmd1);
	xki->page_list[PA_PTE_0] = __ma(kexec_pte0);
	xki->page_list[PA_PTE_1] = __ma(kexec_pte1);
}