1# Copyright Meta Platforms, Inc. and its affiliates. 2# SPDX-License-Identifier: Apache-2.0 3 4include: base.yaml 5 6compatible: "zephyr,coredump" 7 8description: Pseudo-device to help capturing desired data into core dumps 9 10properties: 11 memory-regions: 12 type: array 13 description: Start address and size of memory regions to be collected in a core dump 14 15 coredump-type: 16 required: true 17 type: string 18 description: | 19 Designate which type of coredump device this will be. 20 A device of type COREDUMP_TYPE_MEMCPY can directly memcpy the provided memory-regions 21 into the coredump. The memory-regions array can contain 0 or more entries, and more 22 regions can be added at runtime through the coredump_device_register_memory API. 23 A device of type COREDUMP_TYPE_CALLBACK must specify exactly one entry in the 24 memory-regions array with a size of 0 and a desired size. The coredump device will 25 statically allocate a block of memory of the desired size and provide a callback with a 26 pointer to that memory which will be invoked at the time of a dump. This allows a consumer 27 to add data into the coredump that may not be directly accessible through a memcpy and/or 28 provides an opportunity to manipulate data for inclusion in the dump. The 29 coredump_device_register_memory API is not available for a device of this type. 30 enum: 31 - "COREDUMP_TYPE_MEMCPY" 32 - "COREDUMP_TYPE_CALLBACK" 33