<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/lmb.h, branch v2021.07</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/include/lmb.h?h=v2021.07</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/include/lmb.h?h=v2021.07'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2021-04-22T18:09:45Z</updated>
<entry>
<title>lmb: Add 2 config to define the max number of regions</title>
<updated>2021-04-22T18:09:45Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-03-10T09:16:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d66502bc74182105c7fc77efe7bf8d04ac4e345'/>
<id>urn:sha1:6d66502bc74182105c7fc77efe7bf8d04ac4e345</id>
<content type='text'>
Add 2 configs CONFIG_LMB_MEMORY_REGIONS and CONFIG_LMB_RESERVED_REGIONS
to change independently the max number of the regions in lmb
library.

When CONFIG_LMB_USE_MAX_REGIONS=y, move the lmb property arrays to
struct lmb and manage the array size with the element 'max' of struct
lmb_region; their are still allocated in stack.

When CONFIG_LMB_USE_MAX_REGIONS=n, keep the current location in
struct lmb_region to allow compiler optimization.

Increase CONFIG_LMB_RESERVED_REGIONS is useful to avoid lmb errors in
bootm when the number of reserved regions (not adjacent) is reached:
+ 1 region for relocated U-Boot
+ 1 region for initrd
+ 1 region for relocated linux device tree
+ reserved memory regions present in Linux device tree.

The current limit of 8 regions is reached with only 5 reserved regions
in DT.

see Linux kernel commit bf23c51f1f49 ("memblock: Move memblock arrays
to static storage in memblock.c and make their size a variable")

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb: correct size of the regions array</title>
<updated>2021-04-22T18:09:45Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-03-10T09:16:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=cb1e619824f0c942ccd9b230b5f41caaf7cd91b4'/>
<id>urn:sha1:cb1e619824f0c942ccd9b230b5f41caaf7cd91b4</id>
<content type='text'>
As in lmb_region, cnt &lt; max and in the lmb library
use region[i] only with i in 0...cnt, this region array size
can be reduced by 1 element without overflow.

This patch allows to reduce the struct lmb size.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb: move MAX_LMB_REGIONS value in Kconfig</title>
<updated>2021-04-22T18:09:45Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-03-10T09:16:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4fa0150d6c9c252af6887c55cbacd6734a40e9ab'/>
<id>urn:sha1:4fa0150d6c9c252af6887c55cbacd6734a40e9ab</id>
<content type='text'>
Move MAX_LMB_REGIONS value in Kconfig, the max number of the regions
in lmb library.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb: add a max parameter in the struct lmb_region</title>
<updated>2021-04-22T18:09:45Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-03-10T09:16:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=00fd8dad4d2ed738d11f29d992dc106bbdf4d68f'/>
<id>urn:sha1:00fd8dad4d2ed738d11f29d992dc106bbdf4d68f</id>
<content type='text'>
Add a max parameter in lmb_region struct to handle test
in lmb_add_region without using the MAX_LMB_REGIONS
define.

This patch allows to modify these size independently for
memory of reserved regions in the next patches.

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb: remove lmb_region.size</title>
<updated>2021-04-22T18:09:45Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2021-03-10T09:16:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8f167da9c572845782000075e092e63a8273032d'/>
<id>urn:sha1:8f167da9c572845782000075e092e63a8273032d</id>
<content type='text'>
Remove the unused field size of struct lmb_region as it is initialized to 0
and never used after in lmb library.

See Linux kernel commit 4734b594c6ca ("memblock: Remove memblock_type.size
and add memblock.memory_size instead")

Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb/bdinfo: dump lmb info via bdinfo</title>
<updated>2020-08-05T03:30:02Z</updated>
<author>
<name>Tero Kristo</name>
<email>t-kristo@ti.com</email>
</author>
<published>2020-07-20T08:10:45Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9996cea75f5a77db5a6055342130d27a36830ef8'/>
<id>urn:sha1:9996cea75f5a77db5a6055342130d27a36830ef8</id>
<content type='text'>
Dump lmb status from the bdinfo command. This is useful for seeing the
reserved memory regions from the u-boot cmdline.

Signed-off-by: Tero Kristo &lt;t-kristo@ti.com&gt;
</content>
</entry>
<entry>
<title>treewide: convert bd_t to struct bd_info by coccinelle</title>
<updated>2020-07-17T13:30:13Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-06-26T06:13:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b75d8dc5642b71eb029e7cd38031a32029e736cc'/>
<id>urn:sha1:b75d8dc5642b71eb029e7cd38031a32029e736cc</id>
<content type='text'>
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include &lt;asm/u-boot.h&gt;

  #include &lt;asm/u-boot.h&gt;
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  &lt;smpl&gt;
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  &lt;/smpl&gt;

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
</content>
</entry>
<entry>
<title>lmb: handle more than one DRAM BANK</title>
<updated>2019-02-02T13:19:17Z</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-01-26T21:13:04Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=9cc2323feebdde500f50f7abb855045dbde765cb'/>
<id>urn:sha1:9cc2323feebdde500f50f7abb855045dbde765cb</id>
<content type='text'>
This fixes the automatic lmb initialization and reservation for boards
with more than one DRAM bank.

This fixes the CVE-2018-18439 and -18440 fixes that only allowed to load
files into the firs DRAM bank from fs and via tftp.

Found-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Tested-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
</entry>
<entry>
<title>lib: lmb: rename lmb_get_unreserved_size to lmb_get_free_size</title>
<updated>2019-01-26T13:13:57Z</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-01-21T19:29:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=65304aade8041c03859d0f7b210f2e2a4d46bec0'/>
<id>urn:sha1:65304aade8041c03859d0f7b210f2e2a4d46bec0</id>
<content type='text'>
As a follow-up, change the name of the newly introduced function
'lmb_get_unreserved_size' to 'lmb_get_free_size', which is more
appropriate.

Signed-off-by: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
[trini: Fix test/lib/lmb.c]
Signed-off-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>lmb: remove unused extern declaration</title>
<updated>2019-01-16T21:37:06Z</updated>
<author>
<name>Simon Goldschmidt</name>
<email>simon.k.r.goldschmidt@gmail.com</email>
</author>
<published>2019-01-14T21:38:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a85c213f4725fc097e28795d87136e05508ba70b'/>
<id>urn:sha1:a85c213f4725fc097e28795d87136e05508ba70b</id>
<content type='text'>
lmb.h includes an extern declaration of "struct lmb lmb;" which
is not used anywhere, so remove it.

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