mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-16 18:08:20 +00:00
remoteproc: zynqmp: Add coredump support
Supporting remoteproc coredump requires the platform-specific driver to register coredump segments to be dumped. Do this by calling rproc_coredump_add_segment for every carveout. Also call rproc_coredump_set_elf_info when then rproc is created. If the ELFCLASS parameter is not provided then coredump fails with an error. Other drivers seem to pass EM_NONE for the machine argument but for me this shows a warning in gdb. Pass EM_ARM because this is an ARM R5. Signed-off-by: Leonard Crestez <cdleonard@gmail.com> Link: https://lore.kernel.org/r/d4556268-8274-4089-949f-3b97d67793c7@gmail.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
331f91d86f
commit
fec2601f20
@ -486,6 +486,7 @@ static int add_mem_regions_carveout(struct rproc *rproc)
|
||||
}
|
||||
|
||||
rproc_add_carveout(rproc, rproc_mem);
|
||||
rproc_coredump_add_segment(rproc, rmem->base, rmem->size);
|
||||
|
||||
dev_dbg(&rproc->dev, "reserved mem carveout %s addr=%llx, size=0x%llx",
|
||||
it.node->name, rmem->base, rmem->size);
|
||||
@ -597,6 +598,7 @@ static int add_tcm_carveout_split_mode(struct rproc *rproc)
|
||||
}
|
||||
|
||||
rproc_add_carveout(rproc, rproc_mem);
|
||||
rproc_coredump_add_segment(rproc, da, bank_size);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -676,6 +678,7 @@ static int add_tcm_carveout_lockstep_mode(struct rproc *rproc)
|
||||
|
||||
/* If registration is success, add carveouts */
|
||||
rproc_add_carveout(rproc, rproc_mem);
|
||||
rproc_coredump_add_segment(rproc, da, bank_size);
|
||||
|
||||
dev_dbg(dev, "TCM carveout lockstep mode %s addr=0x%llx, da=0x%x, size=0x%lx",
|
||||
bank_name, bank_addr, da, bank_size);
|
||||
@ -853,6 +856,8 @@ static struct zynqmp_r5_core *zynqmp_r5_add_rproc_core(struct device *cdev)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
rproc_coredump_set_elf_info(r5_rproc, ELFCLASS32, EM_ARM);
|
||||
|
||||
r5_rproc->auto_boot = false;
|
||||
r5_core = r5_rproc->priv;
|
||||
r5_core->dev = cdev;
|
||||
|
Loading…
x
Reference in New Issue
Block a user