rproc_cored...stom_segment(9)
π rproc_coredump_add_custom_segment(9)
okay so bestie, welcome to the Kernel API Manual β¨ this one is a whole function, it lives in the kernel, and it's about teaching the remote processor coredump machinery where your extra memory lives. it's giving "plumbing but make it cute" π«Ά
πΈ NAME πΈ
rproc_coredump_add_custom_segment β add custom coredump segment π
like. literally. it adds a custom coredump segment. that's the whole vibe.
π SYNOPSIS π
int rproc_coredump_add_custom_segment (struct rproc *rproc , dma_addr_t
da , size_t size , void (*dumpfn)(struct rproc *rproc, struct
rproc_dump_segment *segment, void *dest, size_t offset, size_t size) ,
void *priv );
five things go in. one int comes out. slay. β¨
π¦ ARGUMENTS π¦
rprocβ handle of a remote processor π« (yes, the handle, the actual one, the whole remote processor)daβ device address π (where the segment lives on the device side, iykyk)sizeβ size of segment π (how big it is, in the usual size-y units)dumpfnβ custom dump function called for each segment during coredump π₯ signature isvoid (*dumpfn)(struct rproc *rproc, struct rproc_dump_segment *segment, void *dest, size_t offset, size_t size)β copy it exactly, no capprivβ private data π (your little bag of secrets, handed straight back to you)
π DESCRIPTION π
okay so here's the tea β β this function adds device memory to the list of segments that get included in the coredump. and it doesn't just dump it there like a random; it associates that segment with the custom dump function you passed in (dumpfn), and with your private data (priv) too. the way it hooks them all up together?? obsessed. π
so: device memory β the coredump segment list β your dumpfn β your priv. iconic behavior, honestly.
β RETURN β
0on success π (yay)- negative errno on error π (not yay, check your errno)
π SEE ALSO π
- Kernel file
./drivers/remoteproc/remoteproc_coredump.cβ go read the source bestie, it's right there π rproc_coredump_cleanup(9)rproc_coredump_add_segment(9)rproc_coredump_set_elf_info(9)rproc_coredump(9)rproc_coredump_using_sections(9)
the whole friend group fr fr π«Ά
π reminder that the return is 0 for success and negative errno for error β do not get it twisted, check it every time, periodt.
and that's the page!! π it's from ./drivers/remoteproc, dated October 2026, and the manual name is Kernel API Manual in case you forgot already β mwah, go dump some coredumps ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms