VIP firehose extension + cosmetic adjustments/fixes#110
Merged
konradybcio merged 6 commits intolinux-msm:masterfrom Jun 24, 2025
Merged
VIP firehose extension + cosmetic adjustments/fixes#110konradybcio merged 6 commits intolinux-msm:masterfrom
konradybcio merged 6 commits intolinux-msm:masterfrom
Conversation
cd42563 to
40c30ea
Compare
Contributor
Author
|
Fixed all issues reported by checkpatch |
40c30ea to
49504ac
Compare
Contributor
Author
|
@lumag @andersson @konradybcio could you please take a look? |
lumag
requested changes
Jun 18, 2025
49504ac to
ad023ca
Compare
Contributor
Author
|
@lumag I've addressed both comments |
ad023ca to
02b9b04
Compare
In some cases (for instance, in VIP mode), the Firehose programmer can report an additional error code before stalling and can provide valuable information about the type of error that occurred. For example, when digest verification fails, Firehose programmer provides additional log messages before stalling: <data> <log value="ERROR: Hash of data doesn't match the expected hash 179" /> </data> <data> <log value="INFO: Expected hash (32)" /></data> <data> <log value="INFO: 30 E1 49 55 EB F1 35 22 66 ..." /></data> <data> <log value="INFO: Calculated hash (32)" /></data> <data> <log value="INFO: AE BA 2E DE 99 FA 44 30 E4 ... " /></data> ... </xml> Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
02b9b04 to
50ee41b
Compare
There is a regression in the current implementation of simulation mode, which leads to sending two configure packets: FIREHOSE WRITE: <?xml version="1.0"?> <data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="1048576" verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data> FIREHOSE WRITE: <?xml version="1.0"?> <data><configure MemoryName="ufs" MaxPayloadSizeToTargetInBytes="0" verbose="0" ZLPAwareHost="1" SkipStorageInit="0"/></data> In simulated mode "remote" target can't propose different size, so we just don't re-send configure packet. Move the check for simulation mode to prevent sending additional configure packets with the attribute MaxPayloadSizeToTargetInBytes=0. Also change DIGEST_TABLE.bin sha256 hash to a05e1124edbe34dc504a327544fb66572591353dc3fa25e6e7eafbe4803e63e0, as amount of packets supposed to be sent to the target changed. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
This extends the Firehose protocol implementation to support the VIP extension. It implements a state machine that counts the number of packets sent, then injects the VIP table as the next RAW packet when the Firehose programmer runs out of provided digests and needs a new table of digests to validate the next packets. For example: Packet 0: DigestsTableToSign.bin.mbn (53 digest + 1 digest of next table) Packet 1: <configure> Packet 2: <program> Packet 3: ... ... Packet 54: ChainedTableOfDigests0.bin (255 digests + digest of next table) Packet 55: <program> ... Packet 309: ChainedTableOfDigests1.bin To enable VIP extension provide a path where previously generated VIP tables are stored using "--vip-table-path" param: $ qdl --vip-table-path "<vip-table-path>" prog_firehose_ddr.elf \ rawprogram*.xml patch*.xml Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Drop enum definition for chunk size parameter. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Fix list of provided command-line options to getopt_long() for parsing. Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
Prettify usage details and introduce explicit -h param: Usage: qdl [options] <prog.mbn> [<program> <patch> ...] -d, --debug Print detailed debug info -v, --version Print the current version and exit -n, --dry-run Dry run execution, no device reading or flashing -f, --allow-missing Allow skipping of missing files during flashing -s, --storage=T Set target storage type T: <emmc|nand|ufs> -l, --finalize-provisioning Provision the target storage -i, --include=T Set an optional folder T to search for files -S, --serial=T Select target by serial number T (e.g. <0AA94EFD>) -u, --out-chunk-size=T Override chunk size for transaction with T -t, --create-digests=T Generate table of digests in the T folder -D, --vip-table-path=T Use digest tables in the T folder for VIP -h, --help Print this usage info Example: qdl prog_firehose_ddr.elf rawprogram*.xml patch*.xml Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
50ee41b to
733a44a
Compare
Contributor
Author
|
@lumag @konradybcio any additional comments/suggestions? thank you |
quic-kdybcio
approved these changes
Jun 23, 2025
lumag
approved these changes
Jun 23, 2025
Contributor
lumag
left a comment
There was a problem hiding this comment.
Nit: in future please try to describe why you are performing a change, not what is the patch doing (which is frequently obvious).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the Firehose protocol implementation to support the VIP
extension. It implements a state machine that counts the number of
packets sent, then injects the VIP table as the next RAW packet when
the Firehose programmer runs out of provided digests and needs a new table
of digests to validate the next packets.
Improves parameters handling and prettifies usage print