Lines Matching refs:fadump_conf
30 static void rtas_fadump_update_config(struct fw_dump *fadump_conf, in rtas_fadump_update_config() argument
33 fadump_conf->fadumphdr_addr = (fadump_conf->boot_mem_dest_addr + in rtas_fadump_update_config()
34 fadump_conf->boot_memory_size); in rtas_fadump_update_config()
41 static void __init rtas_fadump_get_config(struct fw_dump *fadump_conf, in rtas_fadump_get_config() argument
48 fadump_conf->boot_memory_size = 0; in rtas_fadump_get_config()
49 fadump_conf->boot_mem_regs_cnt = 0; in rtas_fadump_get_config()
59 fadump_conf->cpu_state_dest_vaddr = (u64)__va(addr); in rtas_fadump_get_config()
64 fadump_conf->reserve_dump_area_start = addr; in rtas_fadump_get_config()
74 fadump_conf->boot_mem_dest_addr = in rtas_fadump_get_config()
78 fadump_conf->boot_mem_addr[fadump_conf->boot_mem_regs_cnt] = base; in rtas_fadump_get_config()
79 fadump_conf->boot_mem_sz[fadump_conf->boot_mem_regs_cnt] = size; in rtas_fadump_get_config()
80 fadump_conf->boot_memory_size += size; in rtas_fadump_get_config()
83 fadump_conf->boot_mem_regs_cnt++; in rtas_fadump_get_config()
86 fadump_conf->param_area = be64_to_cpu(fdm->rgn[i].destination_address); in rtas_fadump_get_config()
93 fadump_conf->boot_mem_top = fadump_conf->boot_memory_size + hole_size; in rtas_fadump_get_config()
95 rtas_fadump_update_config(fadump_conf, fdm); in rtas_fadump_get_config()
98 static u64 rtas_fadump_init_mem_struct(struct fw_dump *fadump_conf) in rtas_fadump_init_mem_struct() argument
100 u64 addr = fadump_conf->reserve_dump_area_start; in rtas_fadump_init_mem_struct()
128 fdm.rgn[sec_cnt].source_len = cpu_to_be64(fadump_conf->cpu_state_data_size); in rtas_fadump_init_mem_struct()
130 addr += fadump_conf->cpu_state_data_size; in rtas_fadump_init_mem_struct()
137 fdm.rgn[sec_cnt].source_len = cpu_to_be64(fadump_conf->hpte_region_size); in rtas_fadump_init_mem_struct()
139 addr += fadump_conf->hpte_region_size; in rtas_fadump_init_mem_struct()
149 fadump_conf->boot_mem_dest_addr = addr; in rtas_fadump_init_mem_struct()
150 for (int i = 0; i < fadump_conf->boot_mem_regs_cnt; i++) { in rtas_fadump_init_mem_struct()
154 fdm.rgn[sec_cnt].source_address = cpu_to_be64(fadump_conf->boot_mem_addr[i]); in rtas_fadump_init_mem_struct()
155 fdm.rgn[sec_cnt].source_len = cpu_to_be64(fadump_conf->boot_mem_sz[i]); in rtas_fadump_init_mem_struct()
157 addr += fadump_conf->boot_mem_sz[i]; in rtas_fadump_init_mem_struct()
162 if (fadump_conf->param_area) { in rtas_fadump_init_mem_struct()
165 fdm.rgn[sec_cnt].source_address = cpu_to_be64(fadump_conf->param_area); in rtas_fadump_init_mem_struct()
167 fdm.rgn[sec_cnt].destination_address = cpu_to_be64(fadump_conf->param_area); in rtas_fadump_init_mem_struct()
172 rtas_fadump_update_config(fadump_conf, &fdm); in rtas_fadump_init_mem_struct()
182 static int rtas_fadump_register(struct fw_dump *fadump_conf) in rtas_fadump_register() argument
197 rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1, in rtas_fadump_register()
209 fadump_conf->dump_registered = 1; in rtas_fadump_register()
224 fadump_conf->dump_registered = 1; in rtas_fadump_register()
235 static int rtas_fadump_unregister(struct fw_dump *fadump_conf) in rtas_fadump_unregister() argument
242 rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1, in rtas_fadump_unregister()
256 fadump_conf->dump_registered = 0; in rtas_fadump_unregister()
260 static int rtas_fadump_invalidate(struct fw_dump *fadump_conf) in rtas_fadump_invalidate() argument
267 rc = rtas_call(fadump_conf->ibm_configure_kernel_dump, 3, 1, in rtas_fadump_invalidate()
281 fadump_conf->dump_active = 0; in rtas_fadump_invalidate()
361 static int __init rtas_fadump_build_cpu_notes(struct fw_dump *fadump_conf) in rtas_fadump_build_cpu_notes() argument
371 vaddr = (void *)fadump_conf->cpu_state_dest_vaddr; in rtas_fadump_build_cpu_notes()
394 note_buf = (u32 *)fadump_conf->cpu_notes_buf_vaddr; in rtas_fadump_build_cpu_notes()
396 if (fadump_conf->fadumphdr_addr) in rtas_fadump_build_cpu_notes()
397 fdh = __va(fadump_conf->fadumphdr_addr); in rtas_fadump_build_cpu_notes()
426 pr_debug("Updating elfcore header (%llx) with cpu notes\n", fadump_conf->elfcorehdr_addr); in rtas_fadump_build_cpu_notes()
427 fadump_update_elfcore_header((char *)fadump_conf->elfcorehdr_addr); in rtas_fadump_build_cpu_notes()
440 static int __init rtas_fadump_process(struct fw_dump *fadump_conf) in rtas_fadump_process() argument
442 if (!fdm_active || !fadump_conf->fadumphdr_addr) in rtas_fadump_process()
474 fadump_conf->param_area = 0; in rtas_fadump_process()
491 return rtas_fadump_build_cpu_notes(fadump_conf); in rtas_fadump_process()
494 static void rtas_fadump_region_show(struct fw_dump *fadump_conf, in rtas_fadump_region_show() argument
551 fadump_conf->boot_mem_top); in rtas_fadump_region_show()
588 void __init rtas_fadump_dt_scan(struct fw_dump *fadump_conf, u64 node) in rtas_fadump_dt_scan() argument
602 fadump_conf->ibm_configure_kernel_dump = be32_to_cpu(*token); in rtas_fadump_dt_scan()
603 fadump_conf->ops = &rtas_fadump_ops; in rtas_fadump_dt_scan()
604 fadump_conf->fadump_supported = 1; in rtas_fadump_dt_scan()
605 fadump_conf->param_area_supported = 1; in rtas_fadump_dt_scan()
608 fadump_conf->max_copy_size = ALIGN_DOWN(U64_MAX, PAGE_SIZE); in rtas_fadump_dt_scan()
617 fadump_conf->dump_active = 1; in rtas_fadump_dt_scan()
618 rtas_fadump_get_config(fadump_conf, (void *)__pa(fdm_active)); in rtas_fadump_dt_scan()
640 fadump_conf->cpu_state_data_size = in rtas_fadump_dt_scan()
644 fadump_conf->hpte_region_size = in rtas_fadump_dt_scan()