<feed xmlns='http://www.w3.org/2005/Atom'>
<title>starfive-tech/u-boot.git/common/xyzModem.c, branch master</title>
<subtitle>StarFive Tech U-Boot for VisionFive (JH7110) boards (mirror)</subtitle>
<id>https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/starfive-tech/u-boot.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/'/>
<updated>2021-09-03T18:32:41+00:00</updated>
<entry>
<title>xyz-modem: Allow to cancel transfer also by CTRL+C</title>
<updated>2021-09-03T18:32:41+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:40+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:40+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:40+00:00</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2021-08-03T14:28:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:53+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2020-10-07T16:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:45+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-09-25T14:56:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:51+00:00</updated>
<author>
<name>Lokesh Vutla</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2019-01-08T13:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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:32+00:00</updated>
<author>
<name>Philipp Tomsich</name>
<email>philipp.tomsich@theobroma-systems.com</email>
</author>
<published>2018-11-25T18:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/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>
<entry>
<title>xyz-modem: va_start() must be matched by va_end()</title>
<updated>2018-05-11T00:38:34+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2018-05-07T19:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=23c648982b88725f9e2bab4294a7ca8ea368e3bc'/>
<id>urn:sha1:23c648982b88725f9e2bab4294a7ca8ea368e3bc</id>
<content type='text'>
Every va_start() call must be matched by a va_end() call.

scripts/checkpatch.pl required reformatting the complete function
zm_dprintf().

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
</content>
</entry>
<entry>
<title>Fix Ymodem build when DEBUG and CONFIG_USE_TINY_PRINTF are selected</title>
<updated>2018-05-11T00:38:33+00:00</updated>
<author>
<name>Alex Kiernan</name>
<email>alex.kiernan@gmail.com</email>
</author>
<published>2018-05-03T11:45:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/starfive-tech/u-boot.git/commit/?id=8140816eea9faef804a333e8416249fc57d0bedc'/>
<id>urn:sha1:8140816eea9faef804a333e8416249fc57d0bedc</id>
<content type='text'>
Attempting to build with both DEBUG and CONFIG_USE_TINY_PRINTF along
with CONFIG_SPL_YMODEM_SUPPORT fails at link time:

  common/built-in.o: In function `zm_dprintf':
  common/xyzModem.c:190: undefined reference to `vsprintf'

Disable Ymodem debug if we don't have full vsprintf support.

Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Reviewed-by: Joe Hershberger &lt;joe.hershberger@ni.com&gt;
</content>
</entry>
</feed>
