<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/spl/spl_ymodem.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/spl/spl_ymodem.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/common/spl/spl_ymodem.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2022-09-29T20:07:57Z</updated>
<entry>
<title>treewide: Drop image_header_t typedef</title>
<updated>2022-09-29T20:07:57Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2022-09-07T02:26:52Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f3543e69442ca393e52df253d9c5d45bc189d471'/>
<id>urn:sha1:f3543e69442ca393e52df253d9c5d45bc189d471</id>
<content type='text'>
This is not needed and we should avoid typedefs. Use the struct instead
and rename it to indicate that it really is a legacy struct.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>spl: ymodem: Fix buffer overflow during Image copy</title>
<updated>2022-02-03T17:15:33Z</updated>
<author>
<name>Vignesh Raghavendra</name>
<email>vigneshr@ti.com</email>
</author>
<published>2022-01-31T04:19:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c1335e2ca5e3947a61d93c094fbb4a9be9afc4ff'/>
<id>urn:sha1:c1335e2ca5e3947a61d93c094fbb4a9be9afc4ff</id>
<content type='text'>
ymodem_read_fit() driver will end copying up to BUF_SIZE boundary even
when requested size of copy operation is less than that.
For example, if offset = 0, size = 1440B, ymodem_read_fit() ends up
copying 2KB from offset = 0, to destination buffer addr

This causes data corruption when malloc'd buffer is passed during UART
boot since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer
for loading images")

With this, UART boot works again on K3 (AM654, J7, AM64) family of
devices.

Fixes: 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")
Signed-off-by: Vignesh Raghavendra &lt;vigneshr@ti.com&gt;
</content>
</entry>
<entry>
<title>SPL: Add struct spl_boot_device parameter into spl_parse_board_header()</title>
<updated>2022-01-20T10:35:29Z</updated>
<author>
<name>Pali Rohár</name>
<email>pali@kernel.org</email>
</author>
<published>2022-01-14T13:31:38Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2e0429bcc1a9cf2c3b4cc0e8af7199f031a3b8e9'/>
<id>urn:sha1:2e0429bcc1a9cf2c3b4cc0e8af7199f031a3b8e9</id>
<content type='text'>
Add parameter spl_boot_device to spl_parse_board_header(), which allows
the implementations to see from which device we are booting and do
boot-device-specific checks of the image header.

Signed-off-by: Pali Rohár &lt;pali@kernel.org&gt;
Signed-off-by: Marek Behún &lt;marek.behun@nic.cz&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&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>common: Drop log.h from common header</title>
<updated>2020-05-19T01:19:18Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:40:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f7ae49fc4f363a803dab3be078e93ead8e75a8e9'/>
<id>urn:sha1:f7ae49fc4f363a803dab3be078e93ead8e75a8e9</id>
<content type='text'>
Move this header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>common: Drop image.h from common header</title>
<updated>2020-05-18T21:33:33Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-10T17:40:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4d72caa5b96b71e49b63f98bd8548b194380b544'/>
<id>urn:sha1:4d72caa5b96b71e49b63f98bd8548b194380b544</id>
<content type='text'>
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>spl: ymodem: Fix loading of fit image</title>
<updated>2019-12-03T13:44:14Z</updated>
<author>
<name>Lokesh Vutla</name>
<email>lokeshvutla@ti.com</email>
</author>
<published>2019-11-14T13:03:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=095764e369ec7e313f6cb45f633b203b4ec622cc'/>
<id>urn:sha1:095764e369ec7e313f6cb45f633b203b4ec622cc</id>
<content type='text'>
spl ymodem driver always assumes that 1 BUF_SIZE is read in one stream.
This might not be true when image is not padded to BUF_SIZE and the last
sector that gets loaded will be &lt; BUF_SIZE. Drop this assumption and use
the actual size that is loaded.

Signed-off-by: Lokesh Vutla &lt;lokeshvutla@ti.com&gt;
</content>
</entry>
<entry>
<title>spl: ymodem: Make SPL Y-Modem loader framework accessible</title>
<updated>2019-10-11T14:07:33Z</updated>
<author>
<name>Andreas Dannenberg</name>
<email>dannenberg@ti.com</email>
</author>
<published>2019-08-15T20:55:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e413033d3553402b313a4e2b1839c2d19e7cdcd3'/>
<id>urn:sha1:e413033d3553402b313a4e2b1839c2d19e7cdcd3</id>
<content type='text'>
Expose SPL's Y-Modem core loader function via the common SPL header
file so it can be re-used for purposes other than loading U-Boot itself.

Signed-off-by: Andreas Dannenberg &lt;dannenberg@ti.com&gt;
</content>
</entry>
<entry>
<title>spl: ymodem: Fix FIT loading termination handling</title>
<updated>2019-10-11T14:07:33Z</updated>
<author>
<name>Andreas Dannenberg</name>
<email>dannenberg@ti.com</email>
</author>
<published>2019-08-15T20:55:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9d6ee3e23591f4eb733153aa7776f53d9fef57f1'/>
<id>urn:sha1:9d6ee3e23591f4eb733153aa7776f53d9fef57f1</id>
<content type='text'>
During FIT reading through ymodem_read_fit() the function
xyzModem_stream_read() is being used which returns zero once the end
of a stream has been reached. This could lead to an premature exit from
ymodem_read_fit() with certain-sized FIT images reporting that zero
bytes overall were read. Such a premature exit would then result in an
-EIO failure being triggered within the spl_load_simple_fit() caller
function and ultimately lead to a boot failure.

Fix this logic by simply aborting the stream read loops and continuing
with the regular code flow which ultimately would lead to returning
the number of bytes to be read ('size') as expected by the callers of
ymodem_read_fit().

Fixes: fa715193c083 ("spl: Add an option to load a FIT containing U-Boot from UART")
Signed-off-by: Andreas Dannenberg &lt;dannenberg@ti.com&gt;
</content>
</entry>
<entry>
<title>common: Move gzip functions into a new gzip header</title>
<updated>2019-08-11T20:43:41Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-08-01T15:46:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0c670fc1481d2296f1f5837ea5c15cfbdaed710c'/>
<id>urn:sha1:0c670fc1481d2296f1f5837ea5c15cfbdaed710c</id>
<content type='text'>
As part of the effort to remove things from common.h, create a new header
for the gzip functions. Move the function declarations to it and add
missing documentation.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
</content>
</entry>
</feed>
