<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/tiny-printf.c, branch v2016.09</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>tiny-printf: Adjust to avoid using data section</title>
<updated>2016-08-08T17:32:59+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-08-05T03:58:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=45313e83b842ab31464e2593ab2e39aa0287fbf7'/>
<id>45313e83b842ab31464e2593ab2e39aa0287fbf7</id>
<content type='text'>
We can pass all the variables down to the functions that need them, and
then everything is on the stack. This is safer than using the data section.

At least on firefly-rk3288, the code size is the same and the data size is
12 bytes smaller:

before:
  18865	   2636	     40	  21541	   5425	b/firefly-rk3288/spl/u-boot-spl
after:
  18865	   2624	     40	  21529	   5419	b/firefly-rk3288/spl/u-boot-spl

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can pass all the variables down to the functions that need them, and
then everything is on the stack. This is safer than using the data section.

At least on firefly-rk3288, the code size is the same and the data size is
12 bytes smaller:

before:
  18865	   2636	     40	  21541	   5425	b/firefly-rk3288/spl/u-boot-spl
after:
  18865	   2624	     40	  21529	   5419	b/firefly-rk3288/spl/u-boot-spl

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Support assert()</title>
<updated>2016-07-15T02:40:24+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-07-04T17:58:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e24091398d50961ece2fcb2924d7c37d329abc09'/>
<id>e24091398d50961ece2fcb2924d7c37d329abc09</id>
<content type='text'>
At present assert() is not supported with tiny-printf, so when DEBUG is
enabled a build error is generated for each assert().

Add an __assert_fail() function to correct this. It prints a message and
then hangs.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present assert() is not supported with tiny-printf, so when DEBUG is
enabled a build error is generated for each assert().

Add an __assert_fail() function to correct this. It prints a message and
then hangs.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SPL: tiny-printf: avoid any BSS usage</title>
<updated>2016-07-08T16:50:34+00:00</updated>
<author>
<name>Andre Przywara</name>
<email>andre.przywara@arm.com</email>
</author>
<published>2016-07-08T14:18:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=59d07ee08e858bf2c121d0cdc6c8ddd3b26ee5b1'/>
<id>59d07ee08e858bf2c121d0cdc6c8ddd3b26ee5b1</id>
<content type='text'>
As printf calls may be executed quite early, we should avoid using any
BSS stored variables, since some boards put BSS in DRAM, which may not
have been initialised yet.
Explicitly mark those "static global" variables as belonging to the
.data section, to keep tiny-printf clear of any BSS usage.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As printf calls may be executed quite early, we should avoid using any
BSS stored variables, since some boards put BSS in DRAM, which may not
have been initialised yet.
Explicitly mark those "static global" variables as belonging to the
.data section, to keep tiny-printf clear of any BSS usage.

Signed-off-by: Andre Przywara &lt;andre.przywara@arm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tinyprintf: Add vprintf implementation</title>
<updated>2016-06-20T20:43:58+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-06-10T19:03:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=da70b4d14116d2b3d63840cd2ea01d0badf39e41'/>
<id>da70b4d14116d2b3d63840cd2ea01d0badf39e41</id>
<content type='text'>
vprintf is used by panic() which is used in various SPL paths on some
boards.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Ian Campbell &lt;ijc@hellion.org.uk&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vprintf is used by panic() which is used in various SPL paths on some
boards.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Ian Campbell &lt;ijc@hellion.org.uk&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Correct the snprintf() implementation</title>
<updated>2016-06-09T17:52:53+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-06-09T02:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3191d8408053674c1b9bb79a82e3973add48830c'/>
<id>3191d8408053674c1b9bb79a82e3973add48830c</id>
<content type='text'>
This current code passes the variable arguments list to sprintf(). This is
not correct. Fix it by calling _vprintf() directly.

This makes firefly-rk3288 boot again.

Fixes: abeb272 ("tiny-printf: Support snprintf()")
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This current code passes the variable arguments list to sprintf(). This is
not correct. Fix it by calling _vprintf() directly.

This makes firefly-rk3288 boot again.

Fixes: abeb272 ("tiny-printf: Support snprintf()")
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Acked-by: Marek Vasut &lt;marex@denx.de&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Support sprintf()</title>
<updated>2016-06-03T01:21:42+00:00</updated>
<author>
<name>Marek Vasut</name>
<email>marex@denx.de</email>
</author>
<published>2016-05-31T21:12:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=abeb272d22217481c214495818c3ceabad57b9c0'/>
<id>abeb272d22217481c214495818c3ceabad57b9c0</id>
<content type='text'>
Add a simple version of this function for SPL. It does not check the buffer
size as this would add to the code size.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: lesne@alse-fr.com
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Sylvain Lesne &lt;lesne@alse-fr.com&gt;
Tested-by: Sylvain Lesne &lt;lesne@alse-fr.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a simple version of this function for SPL. It does not check the buffer
size as this would add to the code size.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Stefan Roese &lt;sr@denx.de&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: lesne@alse-fr.com
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
Reviewed-by: Sylvain Lesne &lt;lesne@alse-fr.com&gt;
Tested-by: Sylvain Lesne &lt;lesne@alse-fr.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Support snprintf()</title>
<updated>2016-05-27T02:48:44+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-05-14T20:02:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5c411d88be8df5f6a8a1ea0c961f7c35ba82c064'/>
<id>5c411d88be8df5f6a8a1ea0c961f7c35ba82c064</id>
<content type='text'>
Add a simple version of this function for SPL. It does not check the buffer
size as this would add to the code size.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a simple version of this function for SPL. It does not check the buffer
size as this would add to the code size.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Tidy up a few nits</title>
<updated>2016-05-27T02:48:44+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-05-14T20:02:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1fb67608b309bd7f49842fbdfb1dc2b18a250965'/>
<id>1fb67608b309bd7f49842fbdfb1dc2b18a250965</id>
<content type='text'>
- Rename 'w' to 'width' to make it more obvious what it is used for
- Use bool and int types instead of char to avoid register-masking on
32-bit machines

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Rename 'w' to 'width' to make it more obvious what it is used for
- Use bool and int types instead of char to avoid register-masking on
32-bit machines

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Always print zeroes</title>
<updated>2016-01-21T02:06:22+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2016-01-05T16:30:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=74b1320ae535b9dfe6fb7a86e05a8787e503f59c'/>
<id>74b1320ae535b9dfe6fb7a86e05a8787e503f59c</id>
<content type='text'>
At present this does not print zero values in numeric format (hex and
decimal). Add a special case for this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At present this does not print zero values in numeric format (hex and
decimal). Add a special case for this.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tiny-printf: Avoid printing NULL strings</title>
<updated>2016-01-21T02:06:22+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-12-29T12:22:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8e31681c5a5a2fd6bbdf751bcc900a4481e2fa29'/>
<id>8e31681c5a5a2fd6bbdf751bcc900a4481e2fa29</id>
<content type='text'>
Add a check for NULL strings to avoid printing junk to the console.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a check for NULL strings to avoid printing junk to the console.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
