- May 03, 2019
-
-
John Stultz authored
On a number of machines, qdl could cause crashes on the host system it ran on, due to swiotlb exaustion. This seems to be due to 1M buffers being used during the writes. In order to avoid this, rework qdl_write to break up the writes into out_maxpktsize chunks. With this patch, I no longer see host crashes when running qdl Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Amit Pundir <amit.pundir@linaro.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dragonboard-aosp@lists.96boards.org Tested-by:
Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by:
John Stultz <john.stultz@linaro.org> [bjorn: Dropped change of max_payload_size] Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Apr 30, 2019
-
-
Bjorn Andersson authored
The downstream tool has a 3 second delay to allow the firehose payload to boot. Adding the same makes db820c successfully enter firehose mode. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Feb 27, 2019
-
-
Bjorn Andersson authored
Upon booting the firehose payload some platforms will issue log messages others won't. Rather than waiting for 10 seconds on the ones that doesn't wait only for a second. Hopefully this is long enough, but the firmware synchronization and handling of incoming log messages should be reviewed further. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
We don't send any NOP requests, so remove this function for now. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
It's perfectly normal to "poll" for incoming messages, so silence the warning printout in the usb accessor functions. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
On db410c the target sends log entries after the response and refuse to serve any subsequent requests until these are consumed, so continue reading log entries until we get a timeout. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Nicolas Dechesne authored
We should return in case we haven't reached the end of the Sahara init, which is when we set done to true. If done is not set to true before returning from sahara_run() , it means something went wrong. Signed-off-by:
Nicolas Dechesne <nicolas.dechesne@linaro.org>
-
Bjorn Andersson authored
A full build will contain both xbl_a and xbl_b, so matching on the prefix of "xbl" will find two entries which we consider invalid. Explicitly search for "xbl_a" instead. Fixes: 5ea1e20c ("program: Match xbl in a/b scenarios") Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Jan 08, 2019
-
-
Bjorn Andersson authored
Add support back for waiting for an EDL device to appear. This is useful when paired with some automation scripts that introduces "arbitrary" delays in the process of entering EDL mode. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
The USB claim return code was printed to the console for debug purposes, remove this. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
The nop was added to mitigate the fact that there's a rather long delay in the response when sending out the first command. Increasing the write timeout removes this problem and it's possible to just send the configure as the first command without issues. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
On devices implementing a/b updates the xbl partiiton will be named xbl_a and xbl_b, extend the match for finding the bootable partition to support this. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
It was assumed that we should send all the data following a "program" request to the device, before sending a ZLP. But on SDM845 it's seen that not sending a ZLP after each chunk sometimes causes the communication to stall. Given that the "program" request already carries the information about how much data will be transferred there should be no issues with sending additional ZLPs, so do this. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
On some newer platforms the device ignore the configure request to disable ZLP, causing the Firehose program request to stall, when the device is waiting for a ZLP to end a transfer. Mitigate this by circumventing the qcserial driver and drive the USB traffic directly using USBFS. The tool will attempt to detach qcserial from the device, in case it's already attached, so no changes are needed in the kernel or system configuration. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Nov 08, 2018
-
-
Laxman authored
Added qdl support for emmc storage on platforms with UFS support. Use option --s emmc or ufs as a argument to qdl command, if not specified any option the default storage would be ufs Tested-by:
Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by:
Laxman <itsmelaxman91@gmail.com> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Nov 05, 2018
-
-
Daniel Kutik authored
Moved the two functions to util.c to remove duplicate code. The previous error handling in some of the implemenations was incomplete as it caused qdl to crash. While the variable errors was incremented we still tried to return the regular result. Now returning 0/NULL in case of error. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Daniel Kutik authored
The attributes size_in_KB, sparse and start_byte_hex are not used and seem to be optional. Some program xml files do not always contain them which then causes qdl to crash. Simply removing the unused attributes fixes this problem. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Jun 12, 2018
-
-
Niklas Cassel authored
The sahara protocol specification defines the image field for a read64 request as 8 bytes. Use the correct type to represent this. This will not change the behavior when building for 64-bit, where the compiler already aligned the offset field correctly, in order to satisfy natural alignment requirements. However, when building for 32-bit, this change results in a qdl that can flash a device successfully. Signed-off-by:
Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Niklas Cassel authored
Since it is by no means certain that the current tty is ttyUSB1, do not assume it to be so. Unfortunately we do not know the current tty in main(). It would be possible to refactor the code so that we could print the current tty, but since the only consumer of that information would be this error message, that refactoring seems unjustified. Signed-off-by:
Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Niklas Cassel authored
This assignment is superfluous, since the same assignment is performed in the for loop's initializer. Signed-off-by:
Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- May 29, 2018
-
-
Niklas Cassel authored
printf uses PRIx64 modifier to print uint64_t. This modifier has to be used outside of double-quotes. Fixes build warnings on 32-bit systems, e.g. ARMv7. Signed-off-by:
Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Niklas Cassel authored
printf uses z modifier to print size_t. Also change d modifier to u, since size_t is unsigned. (ssize_t is the signed version.) Fixes build warning on 32-bit systems, e.g. ARMv7. Signed-off-by:
Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Apr 19, 2018
-
-
Nicolas Dechesne authored
Let the programmer search for files beyond the current folder. When --include is used , the programmmer will first look for files in the specified folder, and it will then fallback to looking at the current folder. Signed-off-by:
Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Apr 06, 2018
-
-
Nicolas Dechesne authored
-
- Feb 28, 2018
-
-
Tanya Finkel authored
Fix the return value verification and add printf status message Signed-off-by:
Tanya Finkel <tfinkel@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Feb 22, 2018
-
-
Bjorn Andersson authored
In the case that we find a "data" tag, but not a "program" or "ufs" child node type might have been left unitialized. Fix this by initializing type. Also fix up the styling of the multiline blocks. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Kirill Kapranov authored
Add UFS provisioning functionality using Firehose. Signed-off-by:
Kirill Kapranov <kkapra@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Feb 05, 2018
-
-
Kirill Kapranov authored
Add a mention of command line parameter '--debug' in 'usage' printout Signed-off-by:
Kirill Kapranov <kkapra@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Feb 02, 2018
-
-
Nicolas Dechesne authored
we preserve the same args as before, however it should now be simpler to add new options. Signed-off-by:
Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Kirill Kapranov authored
Each xmlNewDoc should have a matching xmlFreeDoc call in order to avoid memory leaks. Signed-off-by:
Kirill Kapranov <kkapra@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Dec 01, 2017
-
-
Nicolas Dechesne authored
Some program entries has num_partition_sectors=0 but still specifies a file, don't truncate the size of the file in this case. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Nov 30, 2017
-
-
Bjorn Andersson authored
Follow the behavior of the other flash tools and skip partitions with no filename, instead of filling them with zeros. This reduces the flash time considerably for some set of xml files. Also clean up firehose_program() as we no longer need to support calling this function with an invalid fd. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Nov 29, 2017
-
-
Bjorn Andersson authored
When the host propose a larger payload size than the device accepts the device will respond with a NACK, containing the maximum payload size. Similarily the ACK will contain the supported max if the host requests a lower value than the device supports. In both cases we pick the largest possible value and send a second configure message to select this payload size. Reported-by:
Kirill Kapranov <c_kkapra@qti.qualcomm.com> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
The max payload size is negotiated through the configure and configure response messages. Update the max payload size based on the configuration response value, if present. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
During program it's recommended to reduce the num_sectors to only cover the sectors containing data to be written and not write zero-block in the rest. This reduce the time spent sending unnecessary blocks of zeros. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
Reduce the number of write operations by batching up sectors in a max_payload_size sized buffer and write them in one chunk. Using the qcserial driver will still chop up the USB traffic in 4kB chunks, so no measurable perfomance improvement is seen. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
The MaxPayloadSizeToTargetInBytes parameter of the configure command is supposed to set the maximum size of the transfer unit. This size is however limited by the use of the in-kernel qcserial driver and the use of sector-sized writes. Yet increasing it, drastically bumps the transfer speed, so leave it high. NB. The max payload size supported by the device is part of the configure response, if the device supports a value less than the requested size - which we just ignore today. Suggested-by:
Kirill Kapranov <c_kkapra@qti.qualcomm.com> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
To aid fixing performance problems, calculate and print out the program rate. Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
- Nov 07, 2017
-
-
Bjorn Andersson authored
This bootable device is not always partition number 1. Search the program entries for an entry that has the label xbl or sbl1 and use the partition number to mark the boot partition bootable. Reported-by:
Kirill Kapranov <kkapra@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-
Bjorn Andersson authored
The DONE message contains a return code denoting if the firmware is done (1) requesting files from the host, or if there are more requests to come (0). Unfortunately on some platforms the ROM code sends 0 regardless, so we just have to assume that we're done. This assumes that there is only ever one image to transfer. Reported-by:
Kirill Kapranov <kkapra@codeaurora.org> Signed-off-by:
Bjorn Andersson <bjorn.andersson@linaro.org>
-