<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/vsprintf.c, branch v2018.01</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>vsprintf.c: add GUID printing</title>
<updated>2017-09-12T21:58:00+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T10:47:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=22ada0c8e6d50281af72176eecdfc356c794639c'/>
<id>22ada0c8e6d50281af72176eecdfc356c794639c</id>
<content type='text'>
This works (roughly) the same way as linux's, but we currently always
print lower-case (ie. we just keep %pUB and %pUL for compat with linux),
mostly just because that is what uuid_bin_to_str() supports.

  %pUb:   01020304-0506-0708-090a-0b0c0d0e0f10
  %pUl:   04030201-0605-0807-090a-0b0c0d0e0f10

It will be used by a later efi_loader paths for efi variables and for
device-path-to-text protocol, and also quite useful for debug prints
of protocol GUIDs.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This works (roughly) the same way as linux's, but we currently always
print lower-case (ie. we just keep %pUB and %pUL for compat with linux),
mostly just because that is what uuid_bin_to_str() supports.

  %pUb:   01020304-0506-0708-090a-0b0c0d0e0f10
  %pUl:   04030201-0605-0807-090a-0b0c0d0e0f10

It will be used by a later efi_loader paths for efi variables and for
device-path-to-text protocol, and also quite useful for debug prints
of protocol GUIDs.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf.c: add UTF-16 string (%ls) support</title>
<updated>2017-09-12T21:57:59+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2017-09-09T10:47:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=274325c50951dd16ad2a6f45e79dc062ad47011b'/>
<id>274325c50951dd16ad2a6f45e79dc062ad47011b</id>
<content type='text'>
This is convenient for efi_loader which deals a lot with UTF-16.  Only
enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when
CC_SHORT_WCHAR is not enabled.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is convenient for efi_loader which deals a lot with UTF-16.  Only
enabled with CC_SHORT_WCHAR, leaving room to add a UTF-32 version when
CC_SHORT_WCHAR is not enabled.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf.c: Always enable CONFIG_SYS_VSNPRINTF</title>
<updated>2016-01-19T13:31:16+00:00</updated>
<author>
<name>Tom Rini</name>
<email>trini@konsulko.com</email>
</author>
<published>2016-01-14T18:02:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=947c626dc5bfbc232cc0f41d16fa213a885ad234'/>
<id>947c626dc5bfbc232cc0f41d16fa213a885ad234</id>
<content type='text'>
Enabling this function always removes some class of string saftey issues.
The size change here in general is about 400 bytes and this seems a reasonable
trade-off.

Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Cc: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Adrian Alonso &lt;aalonso@freescale.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enabling this function always removes some class of string saftey issues.
The size change here in general is about 400 bytes and this seems a reasonable
trade-off.

Cc: Peng Fan &lt;peng.fan@nxp.com&gt;
Cc: Peter Robinson &lt;pbrobinson@gmail.com&gt;
Cc: Fabio Estevam &lt;fabio.estevam@freescale.com&gt;
Cc: Adrian Alonso &lt;aalonso@freescale.com&gt;
Cc: Stefano Babic &lt;sbabic@denx.de&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: split out strtoxxxx functions out of vsprintf.c</title>
<updated>2015-12-14T00:07:30+00:00</updated>
<author>
<name>Sjoerd Simons</name>
<email>sjoerd.simons@collabora.co.uk</email>
</author>
<published>2015-12-04T22:27:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e4c5383e4d46ef196d022b481cab364bd3b9c877'/>
<id>e4c5383e4d46ef196d022b481cab364bd3b9c877</id>
<content type='text'>
To allow the various string to number conversion functions to be used
when using tiny-printf,split them out into their own file which gets
build regardless of what printf implementation is used.

Signed-off-by: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To allow the various string to number conversion functions to be used
when using tiny-printf,split them out into their own file which gets
build regardless of what printf implementation is used.

Signed-off-by: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Split panic functions out of vsprintf.c</title>
<updated>2015-12-14T00:07:30+00:00</updated>
<author>
<name>Sjoerd Simons</name>
<email>sjoerd.simons@collabora.co.uk</email>
</author>
<published>2015-12-04T22:27:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=2b22a99c65c437891ab88703dff25e256f78c21f'/>
<id>2b22a99c65c437891ab88703dff25e256f78c21f</id>
<content type='text'>
To allow panic and panic_str to still be used when using tiny-printf,
split them out into their own file which gets build regardless of what
printf implementation is used.

Signed-off-by: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To allow panic and panic_str to still be used when using tiny-printf,
split them out into their own file which gets build regardless of what
printf implementation is used.

Signed-off-by: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/tiny-printf.c: Add tiny printf function for space limited environments</title>
<updated>2015-11-23T15:56:07+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2015-11-23T06:00:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7d9cde1031040a4931d6e12da7d9767b7e1d85d4'/>
<id>7d9cde1031040a4931d6e12da7d9767b7e1d85d4</id>
<content type='text'>
This patch adds a small printf() version that supports all basic formats.
Its intented to be used in U-Boot SPL versions on platforms with very
limited internal RAM sizes.

To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
will result in the SPL using this tiny function and the main U-Boot
still using the full-blown printf() function.

This code was copied from:
http://www.sparetimelabs.com/printfrevisited
With mostly only coding style related changes so that its checkpatch
clean.

The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
(Marvell AXP) SPL:

Without this patch:
  58963   18536    1928   79427   13643 ./spl/u-boot-spl

With this patch:
  56542   18536    1956   77034   12cea ./spl/u-boot-spl

Note:
To make it possible to compile tiny-printf.c instead of vsprintf.c when
CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
moved from common/console.c into vsprintf.c in this patch.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Albert Aribaud &lt;albert.u.boot@aribaud.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a small printf() version that supports all basic formats.
Its intented to be used in U-Boot SPL versions on platforms with very
limited internal RAM sizes.

To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
will result in the SPL using this tiny function and the main U-Boot
still using the full-blown printf() function.

This code was copied from:
http://www.sparetimelabs.com/printfrevisited
With mostly only coding style related changes so that its checkpatch
clean.

The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
(Marvell AXP) SPL:

Without this patch:
  58963   18536    1928   79427   13643 ./spl/u-boot-spl

With this patch:
  56542   18536    1956   77034   12cea ./spl/u-boot-spl

Note:
To make it possible to compile tiny-printf.c instead of vsprintf.c when
CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
moved from common/console.c into vsprintf.c in this patch.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Albert Aribaud &lt;albert.u.boot@aribaud.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: Add function to extract a number from the end of a string</title>
<updated>2015-07-21T23:39:28+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-06-23T21:39:08+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c4af6732c4021ffe8b3d0c82bdcf1eebb263bfc3'/>
<id>c4af6732c4021ffe8b3d0c82bdcf1eebb263bfc3</id>
<content type='text'>
Split out the code in fdtdec which finds a number at the end of a string. It
can be useful in other situations.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split out the code in fdtdec which finds a number at the end of a string. It
can be useful in other situations.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd, nand: Move common functions from cmd_nand.c to common place</title>
<updated>2015-06-29T19:10:11+00:00</updated>
<author>
<name>Heiko Schocher</name>
<email>hs@denx.de</email>
</author>
<published>2015-04-27T05:42:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=09c3280754f8f68a4d7fc0ee397a92b38c4f59e4'/>
<id>09c3280754f8f68a4d7fc0ee397a92b38c4f59e4</id>
<content type='text'>
Move common functions from cmd_nand.c (for calculating offset
and size from cmdline paramter) to common place, so they could
used from other commands which use mtd partitions.

For onenand the arg_off_size() is left in common/cmd_onenand.c.
It should use now the common arg_off() function, but as I could
not test onenand I let it there ...

Signed-off-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Scott Wood &lt;scottwood@freescale.com&gt;
Reviewed-by: Jagannadh Teki &lt;jteki@openedev.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move common functions from cmd_nand.c (for calculating offset
and size from cmdline paramter) to common place, so they could
used from other commands which use mtd partitions.

For onenand the arg_off_size() is left in common/cmd_onenand.c.
It should use now the common arg_off() function, but as I could
not test onenand I let it there ...

Signed-off-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Scott Wood &lt;scottwood@freescale.com&gt;
Reviewed-by: Jagannadh Teki &lt;jteki@openedev.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: Add a panic_str() function to reduce code size</title>
<updated>2015-04-23T15:05:52+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2015-02-28T05:06:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=66312374dca86e77fc9b08f774546e62b6cd1aa7'/>
<id>66312374dca86e77fc9b08f774546e62b6cd1aa7</id>
<content type='text'>
The printf() in panic() adds about 1.5KB of code size to SPL when compiled
with Thumb-2. Provide a smaller version that does not support printf()-style
arguments and use it in two commonly compiled places.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The printf() in panic() adds about 1.5KB of code size to SPL when compiled
with Thumb-2. Provide a smaller version that does not support printf()-style
arguments and use it in two commonly compiled places.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsprintf: Add modifier for phys_addr_t</title>
<updated>2014-11-23T11:49:01+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2014-11-13T01:26:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1eebd14b79024f34925b79cb264242fac1bdc1b9'/>
<id>1eebd14b79024f34925b79cb264242fac1bdc1b9</id>
<content type='text'>
Provide a new modifier to vsprintf() to print phys_addr_t variables to
avoid having to cast or #ifdef when printing them out. The %pa modifier
is used for this purpose, so phys_addr_t variables need to be passed by
reference, like so:

	phys_addr_t start = 0;

	printf("start: %pa\n", &amp;start);

Depending on the size of phys_addr_t this will print out the address
with 8 or 16 hexadecimal digits following a 0x prefix.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a new modifier to vsprintf() to print phys_addr_t variables to
avoid having to cast or #ifdef when printing them out. The %pa modifier
is used for this purpose, so phys_addr_t variables need to be passed by
reference, like so:

	phys_addr_t start = 0;

	printf("start: %pa\n", &amp;start);

Depending on the size of phys_addr_t this will print out the address
with 8 or 16 hexadecimal digits following a 0x prefix.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Tested-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
