[RFC PATCH 0/6] Add basic Minidump kernel driver support

Trilok Soni quic_tsoni at quicinc.com
Fri Feb 24 09:14:35 PST 2023


On 2/24/2023 2:40 AM, Mukesh Ojha wrote:
> Thanks Brian for your interest in this series.
> 
> On 2/23/2023 6:07 PM, Brian Masney wrote:
>> On Tue, Feb 21, 2023 at 04:55:07PM +0530, Mukesh Ojha wrote:
>>> Minidump is a best effort mechanism to collect useful and predefined 
>>> data
>>> for first level of debugging on end user devices running on Qualcomm 
>>> SoCs.
>>> It is built on the premise that System on Chip (SoC) or subsystem 
>>> part of
>>> SoC crashes, due to a range of hardware and software bugs. Hence, the
>>> ability to collect accurate data is only a best-effort. The data 
>>> collected
>>> could be invalid or corrupted, data collection itself could fail, and 
>>> so on.
>>>
>>> Qualcomm devices in engineering mode provides a mechanism for generating
>>> full system ramdumps for post mortem debugging. But in some cases it's
>>> however not feasible to capture the entire content of RAM. The minidump
>>> mechanism provides the means for selecting which snippets should be
>>> included in the ramdump.
>>>
>>> The core of minidump feature is part of Qualcomm's boot firmware code.
>>> It initializes shared memory (SMEM), which is a part of DDR and
>>> allocates a small section of SMEM to minidump table i.e also called
>>> global table of content (G-ToC). Each subsystem (APSS, ADSP, ...) has
>>> their own table of segments to be included in the minidump and all get
>>> their reference from G-ToC. Each segment/region has some details like
>>> name, physical address and it's size etc. and it could be anywhere
>>> scattered in the DDR.
>>>
>>> Existing upstream Qualcomm remoteproc driver[1] already supports 
>>> minidump
>>> feature for remoteproc instances like ADSP, MODEM, ... where predefined
>>> selective segments of subsystem region can be dumped as part of
>>> coredump collection which generates smaller size artifacts compared to
>>> complete coredump of subsystem on crash.
>>>
>>> [1]
>>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/remoteproc/qcom_common.c#n142
>>>
>>> In addition to managing and querying the APSS minidump description,
>>> the Linux driver maintains a ELF header in a segment. This segment
>>> gets updated with section/program header whenever a new entry gets
>>> registered.
>>
>> I'd like to test this series plus your series that sets the multiple
>> download modes.
> 
> Sure, you are welcome, but for that you need a device running with 
> Qualcomm SoC and if it has a upstream support.
> 
> Also, testing of this patch needs some minimal out of tree patches and
> i can help you with that.
> 
>> Can you include documentation about how to actually use
>> this new feature?
> 
> Will surely do, Since this is still RFC, and i am doubtful on the path 
> of it in documentation directory.

This is RFC anyways, you can start w/ the directory which you think best 
fits here. The point here is to have the documentation file rather than 
path to be fixed.

You can start w/ Documentation/features/debug and let's see what others 
have any suggestion. Please add a file in your next revision without 
worrying about the path for now.

---Trilok Soni




More information about the linux-arm-kernel mailing list