<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/xyzModem.c, branch v2023.07.01</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/common/xyzModem.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/common/xyzModem.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2022-09-18T08:26:33Z</updated>
<entry>
<title>cyclic: Use schedule() instead of WATCHDOG_RESET()</title>
<updated>2022-09-18T08:26:33Z</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2022-09-02T12:10:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=29caf9305b6fafe8f6d6b18fa1f825dff8686e61'/>
<id>urn:sha1:29caf9305b6fafe8f6d6b18fa1f825dff8686e61</id>
<content type='text'>
Globally replace all occurances of WATCHDOG_RESET() with schedule(),
which handles the HW_WATCHDOG functionality and the cyclic
infrastructure.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Tested-by: Tom Rini &lt;trini@konsulko.com&gt; [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
</content>
</entry>
<entry>
<title>xyz-modem: Allow to configure initial timeout for loadx and loady</title>
<updated>2022-09-15T13:55:30Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-08-27T14:37:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1b3e68203cab4dfdd90d0934ec08762be723f3b1'/>
<id>urn:sha1:1b3e68203cab4dfdd90d0934ec08762be723f3b1</id>
<content type='text'>
Now when loadx and loady commands could be aborted / cancelled by CTRL+C,
allow to configure timeout for initial x/y-modem packet via env variable
$loadxy_timeout and by default use value from new compile-time config
option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means
infinite timeout. Default value is 90s which is the value used before this
change for loadx command.

Other load commands loadb and loads already waits infinitely. Same behavior
for loadx and loady commands can be achieved by setting $loadxy_timeout or
CONFIG_CMD_LOADXY_TIMEOUT to 0.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>xyz-modem: Allow to cancel transfer also by CTRL+C</title>
<updated>2021-09-03T18:32:41Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=dffeb400985d3244ce13ca95ad7c18a78ffd207f'/>
<id>urn:sha1:dffeb400985d3244ce13ca95ad7c18a78ffd207f</id>
<content type='text'>
Currently it is possible to cancel loadx and loady commands by pressing
CTRL+X (CAN character) at least 3 times quickly.

All other U-Boot commands, including loadb and loads can be cancelled by
CTRL+C. So allow it also in xyz-modem code used by loadx and loady
commands. Implement it by handling CTRL+C (ETX character) in the same way
as CTRL+X (CAN character).

Due to how x/y-modem protocol works, it is required to press
CTRL+C or CTRL+X at least 3 times quickly.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>xyz-modem: Put xyzModem_stream_close debug diagnostic message into ZM_DEBUG()</title>
<updated>2021-09-03T18:32:40Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f05d69bd0a264d622efef9649187946cfbccb930'/>
<id>urn:sha1:f05d69bd0a264d622efef9649187946cfbccb930</id>
<content type='text'>
This is how all other debug / diagnostic messages are handled.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
</content>
</entry>
<entry>
<title>xyz-modem: Fix x-modem "xyzModem_eof error" at the end of file</title>
<updated>2021-09-03T18:32:40Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=15c27a5a223717041d4acba8a07db846df674073'/>
<id>urn:sha1:15c27a5a223717041d4acba8a07db846df674073</id>
<content type='text'>
In x-modem protocol EOF is not an error state at the end of file.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>xyz-modem: Fix crash after cancelling transfer</title>
<updated>2021-09-03T18:32:40Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1e7478461bb4e8842f1ca8e5ffb5a441041b0753'/>
<id>urn:sha1:1e7478461bb4e8842f1ca8e5ffb5a441041b0753</id>
<content type='text'>
Variable xyz.len is set to -1 on error. At the end xyzModem_stream_read()
function calls memcpy() with length from variable xyz.len. If this variable
is set to -1 then value passed to memcpy is casted to unsigned value, which
means to copy whole address space. Which then cause U-Boot crash. E.g. on
arm64 it cause CPU crash: "Synchronous Abort" handler, esr 0x96000006

Fix this issue by checking that value stored in xyz.len is valid prior
trying to use it.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Acked-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>common: rename getc() to getchar()</title>
<updated>2020-10-22T13:54:53Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-10-07T16:11:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c670aeee3df9186902dba07b76bd2de0776df390'/>
<id>urn:sha1:c670aeee3df9186902dba07b76bd2de0776df390</id>
<content type='text'>
The sandbox is built with the SDL2 library with invokes the X11 library
which in turn calls getc(). But getc() in glibc is defined as

    int getc(FILE *)

This does not match our definition.

    int getc(void)

The sandbox crashes when called with parameter -l.

Rename our library symbol getc() to getchar().

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>spl: Allow tiny printf() to be controlled in SPL and TPL</title>
<updated>2019-10-08T05:57:45Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-09-25T14:56:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=27084c03d36a7f0e4d7c1679761e81567f1d5442'/>
<id>urn:sha1:27084c03d36a7f0e4d7c1679761e81567f1d5442</id>
<content type='text'>
At present there is only one control for this and it is used for both SPL
and TPL. But SPL might have a lot more space than TPL so the extra cost of
a full printf() might be acceptable.

Split the option into two, providing separate SPL and TPL controls. The
TPL setting defaults to the same as SPL.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>xyz-modem: Fix timeout loop waiting with WATCHDOG</title>
<updated>2019-01-15T20:28:51Z</updated>
<author>
<name>Lokesh Vutla</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2019-01-08T13:58:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a4773c5559867f8fc6b0c1a7eb8ab36cfd53756f'/>
<id>urn:sha1:a4773c5559867f8fc6b0c1a7eb8ab36cfd53756f</id>
<content type='text'>
Commit 2c77c0d6524eb ("xyz-modem: Change getc timeout loop waiting")
fixes the loop delay when using a hw watchdog, assuming that watchdog
kicking is taken care of by getc(). But the xyzmodem driver tries to
do a getc only after confirming that a character is available like below:
	while (!tstc()) {
		till timeout;
	}
	if (tstc())
		*c = getc();

and getc() does a watchdog reset only if it fails to see a character.
In this case, getc() always sees a character and never does a
watchdog reset. So to make sure that watchdog doesn't get reset
while loading the file, do a watchdog reset just before starting the
image loading.

Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
Signed-off-by: Vignesh R &lt;vigneshr@ti.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>lib: merge CRC16-CCITT into u-boot/crc.h</title>
<updated>2018-12-09T01:18:32Z</updated>
<author>
<name>Philipp Tomsich</name>
<email>philipp.tomsich@theobroma-systems.com</email>
</author>
<published>2018-11-25T18:22:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a740ee913ec8ba04cc53100440f94841648324e2'/>
<id>urn:sha1:a740ee913ec8ba04cc53100440f94841648324e2</id>
<content type='text'>
This merges the CRC16-CCITT headers into u-boot/crc.h to prepare for
rolling CRC16 into the hash infrastructure.  Given that CRC8, CRC32
and CRC32-C already have their prototypes in a single header file, it
seems a good idea to also include CRC16-CCITT in the same.

Signed-off-by: Philipp Tomsich &lt;philipp.tomsich@theobroma-systems.com&gt;
</content>
</entry>
</feed>
