<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/cbfs.h, branch v2020.10</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>cbfs: Don't require the CBFS size with cbfs_init_mem()</title>
<updated>2020-05-27T06:40:09+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-24T23:38:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0621b5e1eeb6bcf08b220136f09d433d880f65a5'/>
<id>0621b5e1eeb6bcf08b220136f09d433d880f65a5</id>
<content type='text'>
The size is not actually used since it is present in the header. Drop this
parameter. Also tidy up error handling while we are here.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The size is not actually used since it is present in the header. Drop this
parameter. Also tidy up error handling while we are here.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: Allow reading a file from a CBFS given its base addr</title>
<updated>2020-05-27T06:40:09+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-24T23:38:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=03d4c298fa801139b37108fab83cb312209d6092'/>
<id>03d4c298fa801139b37108fab83cb312209d6092</id>
<content type='text'>
Currently we support reading a file from CBFS given the address of the end
of the ROM. Sometimes we only know the start of the CBFS. Add a function
to find a file given that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we support reading a file from CBFS given the address of the end
of the ROM. Sometimes we only know the start of the CBFS. Add a function
to find a file given that.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: Change file_cbfs_find_uncached() to return an error</title>
<updated>2020-05-27T06:40:09+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-24T23:38:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=924e346a66ea57f48d6f8467c30d411442229946'/>
<id>924e346a66ea57f48d6f8467c30d411442229946</id>
<content type='text'>
This function currently returns a node pointer so there is no way to know
the error code. Also it uses data in BSS which seems unnecessary since the
caller might prefer to use a local variable.

Update the function and split its body out into a separate function so we
can use it later.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function currently returns a node pointer so there is no way to know
the error code. Also it uses data in BSS which seems unnecessary since the
caller might prefer to use a local variable.

Update the function and split its body out into a separate function so we
can use it later.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: Return the error code from file_cbfs_init()</title>
<updated>2020-05-27T06:40:09+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-24T23:38:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0e7b6312e7c6780381612fe09a73c77f77e63c2d'/>
<id>0e7b6312e7c6780381612fe09a73c77f77e63c2d</id>
<content type='text'>
We may as well return the error code and use it directly in the command
code. CBFS still uses its own error enum which we may be able to remove,
but leave it for now.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We may as well return the error code and use it directly in the command
code. CBFS still uses its own error enum which we may be able to remove,
but leave it for now.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: Use ulong consistently</title>
<updated>2020-05-27T06:40:09+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-05-24T23:38:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=45637dbfce9e5afb07d4c560f8ee24cff3cc1ab8'/>
<id>45637dbfce9e5afb07d4c560f8ee24cff3cc1ab8</id>
<content type='text'>
U-Boot uses ulong for addresses but there are a few places in this driver
that don't use it. Convert this driver over to follow this convention
fully.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
U-Boot uses ulong for addresses but there are a few places in this driver
that don't use it. Convert this driver over to follow this convention
fully.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: drop file_cbfs_result declaration</title>
<updated>2020-05-27T06:40:09+00:00</updated>
<author>
<name>Christian Gmeiner</name>
<email>christian.gmeiner@gmail.com</email>
</author>
<published>2020-05-19T09:01:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=30cf2ba7c6794c7b486c34aba2b25af66609bc42'/>
<id>30cf2ba7c6794c7b486c34aba2b25af66609bc42</id>
<content type='text'>
It is not definded anywhere.

Signed-off-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.gpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is not definded anywhere.

Signed-off-by: Christian Gmeiner &lt;christian.gmeiner@gmail.com&gt;
Reviewed-by: Heinrich Schuchardt &lt;xypron.gpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86: cbfs: Drop unwanted declaration</title>
<updated>2020-04-30T09:16:12+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2020-04-05T23:22:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=43a1230adfbf44fd2a8b77aa73528a1d3e604de6'/>
<id>43a1230adfbf44fd2a8b77aa73528a1d3e604de6</id>
<content type='text'>
The intention here is add a forward declaration, not actually declare a
variable. Fix it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The intention here is add a forward declaration, not actually declare a
variable. Fix it.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: do not pack struct cbfs_cachenode</title>
<updated>2019-11-02T10:00:51+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-10-06T22:37:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=895ae8726dea182c8512fc6154bd0f9a6a06657b'/>
<id>895ae8726dea182c8512fc6154bd0f9a6a06657b</id>
<content type='text'>
With the __packed attribute sandbox_defconfig cannot be compiled with GCC
9.2.1:

fs/cbfs/cbfs.c: In function ‘file_cbfs_fill_cache’:
fs/cbfs/cbfs.c:164:16: error: taking address of packed member of
‘struct cbfs_cachenode’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  164 |   cache_tail = &amp;new_node-&gt;next;
      |                ^~~~~~~~~~~~~~~

struct cbfs_cachenode is only an internal structure. So let's rearrange the
fields such that the structure is naturally packed and remove the __packed
attribute.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the __packed attribute sandbox_defconfig cannot be compiled with GCC
9.2.1:

fs/cbfs/cbfs.c: In function ‘file_cbfs_fill_cache’:
fs/cbfs/cbfs.c:164:16: error: taking address of packed member of
‘struct cbfs_cachenode’ may result in an unaligned pointer value
[-Werror=address-of-packed-member]
  164 |   cache_tail = &amp;new_node-&gt;next;
      |                ^~~~~~~~~~~~~~~

struct cbfs_cachenode is only an internal structure. So let's rearrange the
fields such that the structure is naturally packed and remove the __packed
attribute.

Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: Add functions to support multiple CBFSs</title>
<updated>2019-08-18T13:54:10+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-08-15T01:56:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=630b2f39ddabd43a27a98f0356b948df18e97d88'/>
<id>630b2f39ddabd43a27a98f0356b948df18e97d88</id>
<content type='text'>
Sometimes an image has multiple CBFS. The current CBFS API is limited to
handling only one at time. Also it keeps track of the CBFS internally in
BSS, which does not work before relocation, for example.

Add a few new functions to overcome these limitations.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes an image has multiple CBFS. The current CBFS API is limited to
handling only one at time. Also it keeps track of the CBFS internally in
BSS, which does not work before relocation, for example.

Add a few new functions to overcome these limitations.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cbfs: Move result variable into the struct</title>
<updated>2019-08-18T13:54:10+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2019-08-15T01:56:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c7f16934749b054ce1f0b75bd664d22af8b7c588'/>
<id>c7f16934749b054ce1f0b75bd664d22af8b7c588</id>
<content type='text'>
Move the result variable into the struct also, so that it can be used when
BSS is not available. Add a function to read it.

Note that all functions sill use the BSS version of the data.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the result variable into the struct also, so that it can be used when
BSS is not available. Add a function to read it.

Note that all functions sill use the BSS version of the data.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Tested-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
