Commit graph

46 commits

Author SHA1 Message Date
Linux Build Service Account
a6a13af5f4 Merge "board: qca: crashdump: add condition check for size" 2024-03-22 11:40:07 -07:00
Ram Kumar D
698f9adf4f board: qca: crashdump: add condition check for size
This patch add an conditional size boundary check to
make sure that the collected minidumps is within the
reserved memory region. If not, it throws failure
message and do reset.

Change-Id: I97c721f792350e83463f5dcff412785b8263bb4c
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2024-03-19 16:53:24 +05:30
Gurumoorthy Santhakumar
cf2f0c3a97 ipqsoc: Skip reset in crash dump path.
Skip reset in crash dump path which give access to user
to perform secure authentication.

in crash path,
	bootipq cmd only authenticate kernel/rootfs.
	booting to kernel is restircted.

Enable CONFIG_SKIP_RESET to skip reset in crashdump path.

Change-Id: I28fdd4dc6475d4d26b20a87aa039cef165db1375
Signed-off-by: Gurumoorthy Santhakumar <quic_gsanthak@quicinc.com>
2024-03-18 12:37:20 +05:30
Ram Kumar D
d7c6d8dd31 board: qca: crashdump: add support save minidumps in nvmem
This patch enable the uboot to collec the minidump
by parsing the TLVs exposed by the kernel and store it
into the nvmem (Non volatile memory) either NAND / eMMC

To enable this feature,

setenv dump_minimal 1
setenv dump_to_nvmem "<partition_name>"

Change-Id: I2f2ed2ad2e8506957288052edaf5d6290ae787b7
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2024-03-09 15:08:32 +05:30
Ram Kumar D
6187ef3200 board: qca: crashdump: update negative case print
Change-Id: Ic61c2ec7d0603795416d57f7fdca5b4069a01f7e
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2024-03-09 15:08:17 +05:30
Ram Kumar D
1631a0664a board: qca: skip dumpfile if file size is zero
Change-Id: I09d291c5346a094be9156b6b4a05a23c7d698617
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2024-02-22 15:51:07 +05:30
Ram Kumar D
f53b5a7770 board: qca: arm: add support to dump minidumps on memory
This patch enables support to do minidump on DDR.
Enable this support by setting respective reserved mem address
in the env "dump_to_mem"

setenv dump_minimal 1
setenv dump_to_mem "<addr> <size>"
addr & size param should matches with respect to the kernel
reserved memory region.

setenv dump_to_mem "0x44000000 0x500000"

Change-Id: I3f98269d42eed1e6301ed76eb9d1bcdd82046d41
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2024-01-31 16:13:00 +05:30
Gokul Sriram Palanisamy
f33264587a ipq5332: TINY NOR: disable signed boot support
Disable signed image authentication and secure dump support.

Change-Id: I3f32cf252dc857f9b03af3474018218fe6601b37
Signed-off-by: Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2023-09-12 17:56:47 +05:30
Saahil Tomar
664fabb120 ipq: crashdump: Support for prefix while storing crashdump
With this change, Add option to support
prefixing crash dump files with timestamp prefix

Change-Id: I30343e6d7dc58376264dd34a4a3cd25bb34e65c6
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2023-01-18 16:16:49 +05:30
devi priya
9184c7a019 board: qca: arm: Removal of the dumpinfo_s structure
This patch removes the support for dumpinfo_s structure to have
uniform EBICS0 bin for both sec and non-sec boots as the Read As Zero
(RAZ) flag has been enabled to protect code and data regions of TZ

The patchset applies to all the targets except IPQ5018 as the RAZ
flag enablement was not supported in IPQ5018

Change-Id: I63514284448de08926cd2c9b741f02859067044d
Signed-off-by: devi priya <quic_devipriy@quicinc.com>
2022-11-03 23:17:17 -07:00
Praveenkumar I
74a56e4feb ipq: dump_to_usb needs some delay before usb stop
Some USB devices taking more time to store the binary file if the
device has multiple partitions. Immediate usb stop can discard the
previously transfered binary. This patch adds delay to overcome the
issue

Change-Id: Iccbf272ebdfc3542ac1474129e07e852e8d7bbaa
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-04-01 11:39:26 +05:30
Selvam Sathappan Periakaruppan
a89291cec3 ipq: crashdump: Support for dump_to_flash in nand-4k
Previously the MAX_NAND_PAGE_SIZE was defined as 2K
during when we will face issues when dumping to
flash in nand-4k. This patch updates the max size
to 4K to support the same in nand-4k.

Change-Id: Idcec9998f56df1db21fc03097d0454efd81bbbd3
Signed-off-by: Selvam Sathappan Periakaruppan <quic_speriaka@quicinc.com>
2022-03-15 03:09:30 -07:00
Karthick Shanmugham
59d79e1661 ipq: Handled unaligned data written in nand flash while dump collection
During dump collection, when dump_to_flash enabled, nand erases are skipped
due to unaligned written. This changes handles that and write after erasing

Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
Change-Id: Idfc6b3a0596a5ddb5c7e0b0da5c7bcb2751769b8
2020-09-24 13:10:23 +05:30
Karthick Shanmugham
434cc613fc ipq: Added nand bad block skipping to dump_to_flash feature
This change will skip the bad blocks offsets, if any while writing
into the nand flash duirng crash when dump_to_flash enabled. This
change also verifies whether the dump data is not overwritten into
the next partition.

Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
Change-Id: I0eec4c772a5f5efb3c17bfd1fd3d3d9a5ff85d1d
2020-09-11 12:49:29 +05:30
Balaji Prakash J
e0fdbf3dfb ipq: minidump: handle error cases properly
When dump_to_flash is set, and if the cur_type value is
set to QCA_WDT_LOG_DUMP_TYPE_INVALID, while loop is
executed forever. So, handled the error cases properly.

Change-Id: Ic3fdc01897b4fe9a45023074e9397af3c84f3aaa
Signed-off-by: Balaji Prakash J <bjagadee@codeaurora.org>
2020-08-02 23:16:13 -07:00
Vandhiadevan Karunamoorthy
fed441d78c ipq5018: Tiny U-boot: Remove NAND features
This changes remove nand command and Env support

Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
Change-Id: I6c59f8259306ef79499420afe4da17a2674e98be
2020-04-30 11:22:27 +05:30
Gitanjali Krishna
f403ae6e97 minidump: Add u-boot env variable to test minidump
To test minidump feature, we require a method to
collect full dump and minidump binaries on a
single run for side by side comparison.

This change enables dumping of minidump and
full dump binaries consecutively when uboot
env variable 'dump_minimal_and_full' is set.

Change-Id: I846084546d3c67398d7ef7b81e87c97bcc63c609
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2020-04-09 08:55:57 -07:00
Vandhiadevan Karunamoorthy
bbbdb8e5ab Flash: ipq5018: Add SPI-NAND flash support
Change-Id: I45d73fdd7e7315f110e4691a7dc9fe6698c51c37
Signed-off-by: Vandhiadevan Karunamoorthy <vkarunam@codeaurora.org>
2020-02-19 03:32:03 -08:00
Sham Muthayyan
6cfb727942 ipq807x: Fix the crashdump filename print
Change-Id: Icd169363a394af97df9636466231616c8deaf2b2
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2020-02-16 22:04:59 -08:00
Karthick Shanmugham
71dd01bd18 ipq: Added validations for "dump_compressed" env variable
Validations added for dump_compressed environment variable

Change-Id: Ie596103f4c8ff31a0ca25d0c23166b8bac37c75a
Signed-off-by: Karthick Shanmugham <kartshan@codeaurora.org>
2020-01-31 11:30:30 +05:30
Gitanjali Krishna
2bc2a3a8c4 Minidump:U-Boot Optimizations for Minidump Feature
This change adds support in u-boot to handle
dumping of DEBUGFS TLV information and MMU Metadata
file.

Change-Id: Iebf67b932ba90b5081e6903c5fe44ed3105df798
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2020-01-22 12:11:00 -08:00
Gitanjali Krishna
346d35a139 minidump: Change Metadata file name
Change Metadata file name for minidump
from MODULE_INFO.txt to MOD_INFO.txt to
avoid mismatch with T32 scripts

Change-Id: I4e56455ceaa7ba832b3882fc62a23a0b29244e83
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2020-01-02 15:17:42 -08:00
Pavithra Palanisamy
b1b81b7267 ipq: crashdump: Adding delay for reset after usbdump
This change adds a time delay of 1 second before resetting the
SoC after USB crashdump collection, as some devices requires
spare time to flush the contents to disk.

Change-Id: I407ca5a2eb55762edd5fdb011b8464285019b18c
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-12-30 16:41:50 +05:30
Balaji Prakash J
847e43ef9c ipq: crashdump: Used table info instead of CONFIG_TZ_END_ADDR
Using CONFIG_TZ_END_ADDR for manipulating the size of EBICS_S2
dump size, restricts us to have CONFIG_TZ_END_ADDR as the
EBICS_S2 start address. Instead of using CONFIG_TZ_END_ADDR,
used the table info for calculating the size.

This way, for ipq6018, 256M boundary(0x50000000) can be used as
EBICS_S2 dump start address.

Change-Id: I2fc69774301aad599425af1e9b106fe8bc35dbf8
Signed-off-by: Balaji Prakash J <bjagadee@codeaurora.org>
2019-12-22 21:29:10 -08:00
Pavithra Palanisamy
5e2038bc94 ipq807x: Add support for compressed crashdump collection.
This change will add support for collecting crashdump as
compressed gzip file, if specified through uboot environment
variable 'dump_compressed'

Change-Id: I0c3fb16bc07aaa0103e75a551477fce13f9e26da
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-12-23 09:26:21 +05:30
Sham Muthayyan
107d511bdc Revert "ipq807x: fat: Fix overflow issue"
This reverts commit 8791ff3dab.

Change-Id: I03af0ce35aa2df9e381b98c3842e4b88fbd35e1d
Signed-off-by: Sham Muthayyan <smuthayy@codeaurora.org>
2019-09-30 18:33:03 +05:30
Rajkumar Ayyasamy
cebcfa59e1 qca: arm: fix compiler error when SPI-NOR is disabled
Change-Id: Iec996fc670fd28d467b81afc0ebfcba07fd82b60
Signed-off-by: Rajkumar Ayyasamy <arajkuma@codeaurora.org>
2019-08-26 04:00:09 -07:00
Manoharan Vijaya Raghavan
8791ff3dab ipq807x: fat: Fix overflow issue
As per FAT spec, the number of sectors can be more than
clusters, as clusters starts from databegin.
So check cluster overflow against total clusters.

The FAT at present in u-boot lacks a lot, such as
support for long file names, subdir etc.
The mini dump was using more than 8 character name,
changed that one too.

Change-Id: Icfae6d955dd93432b3d33d7c0b9a724382d87185
Signed-off-by: Manoharan Vijaya Raghavan <mraghava@codeaurora.org>
2019-08-12 13:30:40 +05:30
Gitanjali Krishna
e186e90535 Minidump: Modify size of crashdump buffer
This change modifies size of crashdump buffer to
12K from 16K for ipq60xx and ipq807x

This change also makes dumping of crashdump TLVs more
generic and does not assume any fixed positions for
static or dynamic dump segments

Change-Id: I9723ebf55e4a6db3360b3370a2c6e15d22741e08
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2019-07-23 12:04:31 -07:00
Pavithra Palanisamy
8839a16c03 usbdump: Add check to enable usbdump only if env is set to 1
Change-Id: Ib7807de48739ea79c4aa5438035b61dcd4e7f38a
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-07-18 20:36:00 +05:30
Linux Build Service Account
04326a10bf Merge "usbdump: Add support for dump collection on high number partitions" 2019-07-09 07:29:43 -07:00
Linux Build Service Account
1a4bf51ece Merge "usbdump: Add support to scan maximum possible partitions" 2019-07-09 07:29:42 -07:00
Pavithra Palanisamy
62148b24c3 usbdump: Add support for dump collection on high number partitions
Change-Id: Idb3074afd1d033269700d4b172e9092bef5e6bcc
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-07-08 17:35:45 +05:30
Pavithra Palanisamy
06ceaec8fd usbdump: Add support to scan maximum possible partitions
This change adds support to search for valid FAT32 partition
throughout the device during crashdump collection on USB,
despite encountering any invalid-partition on the loop.

Change-Id: Ic6bda03a2448c38f0e93d32214340c2ee896f385
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-07-08 12:18:24 +05:30
Antony Arun T
374d35d431 ipq6018: crashdump: fixing tz end address and EBICS0 size
Change-Id: Ib898c2e1f391208f21bd88175bc68cae7aa57a4b
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2019-07-04 22:12:56 -07:00
Gitanjali Krishna
78dd26aecb u-boot-2016: Handle invalidated crashdump TLVs
This change adds support to ignore invalidated
TLVs in crashdump buffer

Change-Id: Ic8513fb4155755f421f94683fe739ba73d55aa21
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2019-07-02 14:08:58 -07:00
Sandhya
0b984e927c Fix compiler warnings: Indentation
Change-Id: I9786e6350b77b810ec676bfb770f14a559b67514
Signed-off-by: Sandhya <sandhyks@codeaurora.org>
2019-06-26 10:24:59 +05:30
Gitanjali Krishna
9af31feb8b u-boot-2016: Fix compiler warnings
Change-Id: I1bf55699f4767de381c3875a0a3d84177a87282e
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2019-06-10 14:50:33 -07:00
Pavithra Palanisamy
b7239058e9 ipq: Enable crashdump collection in usb device
This change enables support to collect crashdump files
in connected usb storage device on requirement.

Change-Id: If191bcae5329dd2c9e84035069e4d9b0e73b546b
Signed-off-by: Pavithra Palanisamy <pavip@codeaurora.org>
2019-05-30 20:17:55 +05:30
Venkat Raju Sana
0f149a240a MINIDUMP:Fix for TLV buffer overflow
Change TLV message buffer offsets to match with kernel
that has been adjusted to use last 16K of memory
allocated for crashdump buffer. This was done to
accomodate greater number of dump segemnts.

Change-Id: Idb8c1bab6a0900152a9d413382b2b3c87a19170e
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
2019-05-23 12:11:36 -07:00
Linux Build Service Account
4736fa0228 Merge "u-boot-2016: Add module metadata for minidump" 2019-05-07 22:13:06 -07:00
Gitanjali Krishna
a48a05172a u-boot-2016: Add module metadata for minidump
This change adds an additional dump binary
containing Meta Data information for minimal
crashdump collection feature

Change-Id: I8427f3d41cf454ea7adf6b1565be58f3cc950e61
Signed-off-by: Gitanjali Krishna <gitanjal@codeaurora.org>
2019-05-02 16:30:29 -07:00
Antony Arun T
11329094c2 ipq6018: Enable PMIC reset during abnormal reset
Change-Id: I353f13f8b7ca286ad7c1bcd2d5c162e5592b2a86
Signed-off-by: Antony Arun T <antothom@codeaurora.org>
2019-04-30 02:17:42 -07:00
Venkat Raju Sana
2e7684f3f9 ip1807x:Initial commit for Minidump
Change-Id: If08d31ebb009d6b37ee55861644ab1f11a46ac98
Signed-off-by: Venkat Raju Sana <vrsana@codeaurora.org>
2019-03-29 12:47:06 -07:00
Nikhil Prakash V
1df0c30ce9 ipq: Force crashdump collection
Force the crashdump collection based on environment variable. If the
environment varibale force_crashdump is set then we will proceed directly
with the crashdump collection, else we will wait for user input
for 10s before going for crashdump collection.

Change-Id: Ida500bd060dcdd46736e9ea950a0009353abcbf1
Signed-off-by: Nikhil Prakash V <nprakash@codeaurora.org>
2018-10-16 18:11:12 +05:30
Gokul Sriram Palanisamy
c0b0448441 crashdump: Moved dump functions for code sanity
Change-Id: Ib8d2f093881948764e18c1e3e5d64a1e1281a305
Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org>
2018-08-20 06:21:32 -07:00