<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/lmb.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/lib/lmb.c?h=v2023.07.01</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/lmb.c?h=v2023.07.01'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2023-04-06T19:08:46Z</updated>
<entry>
<title>lmb: add max number of region in lmb_dump_region() output</title>
<updated>2023-04-06T19:08:46Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2023-03-22T18:12:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9eb37a1e764b43d2cd2a4a5e6f07d247c569ab7'/>
<id>urn:sha1:c9eb37a1e764b43d2cd2a4a5e6f07d247c569ab7</id>
<content type='text'>
Add the max number of region in lmb dump; this patch allows to
check the limit for usage of the LMB regions, memory or reserved.

Result on STM32MP157C-DK2:

STM32MP&gt; bdinfo
.....
lmb_dump_all:
 memory.cnt = 0x1 / max = 0x2
 memory[0]	[0xc0000000-0xdfffffff], 0x20000000 bytes flags: 0
 reserved.cnt = 0x6 / max = 0x10
 reserved[0]	[0x10000000-0x10045fff], 0x00046000 bytes flags: 4
 reserved[1]	[0x30000000-0x3003ffff], 0x00040000 bytes flags: 4
 reserved[2]	[0x38000000-0x3800ffff], 0x00010000 bytes flags: 4
 reserved[3]	[0xd4000000-0xd7ffffff], 0x04000000 bytes flags: 4
 reserved[4]	[0xdcae5000-0xdfffffff], 0x0351b000 bytes flags: 0
 reserved[5]	[0xddafb5b8-0xdfffffff], 0x02504a48 bytes flags: 0
....

Reported-by: Mark Millard &lt;marklmi@yahoo.com&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
</entry>
<entry>
<title>lmb: Fix LMB_MEMORY_REGIONS flag usage</title>
<updated>2023-04-06T19:08:46Z</updated>
<author>
<name>Patrick Delaunay</name>
<email>patrick.delaunay@foss.st.com</email>
</author>
<published>2023-03-22T18:12:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=94c8da21216ac077842c413a4339e71285bcf94d'/>
<id>urn:sha1:94c8da21216ac077842c413a4339e71285bcf94d</id>
<content type='text'>
Remove test on CONFIG_LMB_MEMORY_REGIONS introduced by commit
7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb").

This code in lmb_init() is strange, because if CONFIG_LMB_USE_MAX_REGIONS
and CONFIG_LMB_MEMORY_REGIONS are not defined, the implicit #else is empty
and the required initialization is not done:
lmb-&gt;memory.max = ?
lmb-&gt;reserved.max = ?

But this setting is not possible:
- CONFIG_LMB_USE_MAX_REGIONS not defined
- CONFIG_LMB_MEMORY_REGIONS not defined
because CONFIG_LMB_MEMORY_REGIONS and CONFIG_LMB_RESERVED_REGIONS are
defined as soon as the CONFIG_LMB_USE_MAX_REGIONS is not defined.

This patch removes this impossible case #elif and I add some
explanation in lmb.h to explain why in the struct lmb {} the lmb
property is defined if CONFIG_LMB_MEMORY_REGIONS is NOT defined.

This patch also removes CONFIG_LMB_XXX dependency on CONFIG_LMB as these
defines are used in API file lmb.h and not only in library file.

Fixes: 5e2548c1d6e03 ("lmb: Fix LMB_MEMORY_REGIONS flag usage")
Reported-by: Mark Millard &lt;marklmi@yahoo.com&gt;
Signed-off-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
</content>
</entry>
<entry>
<title>lmb: Treat a region which is a subset as equal</title>
<updated>2023-02-12T16:54:18Z</updated>
<author>
<name>Sjoerd Simons</name>
<email>sjoerd@collabora.com</email>
</author>
<published>2023-02-12T15:07:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0d91c88230fe8bd9f8d39ca2ab69cd6282e9f949'/>
<id>urn:sha1:0d91c88230fe8bd9f8d39ca2ab69cd6282e9f949</id>
<content type='text'>
In various cases logical memory blocks are coalesced; As a result doing
a strict check whether memory blocks are the same doesn't necessarily
work as a previous addition of a given block might have been merged into
a bigger block.

Fix this by considering a block is already registered if it's a pure
subset of one of the existing blocks.

Signed-off-by: Sjoerd Simons &lt;sjoerd@collabora.com&gt;
</content>
</entry>
<entry>
<title>lmb: Set correct lmb flags for EFI memory map entries</title>
<updated>2023-02-06T17:07:18Z</updated>
<author>
<name>Sjoerd Simons</name>
<email>sjoerd@collabora.com</email>
</author>
<published>2023-01-19T08:38:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c5279ea1c300d52a5cb4b47881f21cf08caec790'/>
<id>urn:sha1:c5279ea1c300d52a5cb4b47881f21cf08caec790</id>
<content type='text'>
When adding reserved memory areas from the EFI memory map set the NOMAP
flag when applicable. When this isn't done adding "no-map" flagged entries
from the fdt after receiving the same from the EFI memory map fails due
to non-matching flags.

Signed-off-by: Sjoerd Simons &lt;sjoerd@collabora.com&gt;
</content>
</entry>
<entry>
<title>lmb: consider EFI memory map</title>
<updated>2023-01-06T21:27:30Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2023-01-04T00:36:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=06d514d77c3700ec6166457f58d37652791038d0'/>
<id>urn:sha1:06d514d77c3700ec6166457f58d37652791038d0</id>
<content type='text'>
Add reservations for all EFI memory areas that are not
EFI_CONVENTIONAL_MEMORY.

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
</content>
</entry>
<entry>
<title>lmb: Fix LMB_MEMORY_REGIONS flag usage</title>
<updated>2022-08-10T17:38:30Z</updated>
<author>
<name>Patrice Chotard</name>
<email>patrice.chotard@foss.st.com</email>
</author>
<published>2022-08-02T08:21:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=5e2548c1d6e0331edbf94edcfc95d55b5e9a6cab'/>
<id>urn:sha1:5e2548c1d6e0331edbf94edcfc95d55b5e9a6cab</id>
<content type='text'>
This patch is fixing a broken boot observed on stm32mp157c-dk2 board.

IS_ENABLED macro should be used to check if a compilation flag is set
to "y" or "m".
LMB_MEMORY_REGIONS is set to a numerical value, IS_ENABLED macro is not
suitable in this case.

Fixes: 7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb")
Signed-off-by: Patrice Chotard &lt;patrice.chotard@foss.st.com&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>lmb: Fix lmb property's defination under struct lmb</title>
<updated>2022-07-26T06:23:54Z</updated>
<author>
<name>Ashok Reddy Soma</name>
<email>ashok.reddy.soma@xilinx.com</email>
</author>
<published>2022-07-07T08:45:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7c1860fce4e369bdcabc1f574feb6b9af19999a3'/>
<id>urn:sha1:7c1860fce4e369bdcabc1f574feb6b9af19999a3</id>
<content type='text'>
Under struct lmb {} the lmb property's should be defined only if
CONFIG_LMB_MEMORY_REGIONS is defined.

Signed-off-by: Ashok Reddy Soma &lt;ashok.reddy.soma@xilinx.com&gt;
Signed-off-by: Michal Simek &lt;michal.simek@xilinx.com&gt;

Signed-off-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/c24a2b1d6f5db4eb65393f6a77fae129b30b6233.1657183534.git.michal.simek@amd.com
</content>
</entry>
<entry>
<title>lmb: Reserve U-Boot separately if relocation is disabled</title>
<updated>2021-11-18T23:20:19Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@gmail.com</email>
</author>
<published>2021-11-13T17:34:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=bd994c007ae232ade284c9c22c9150077961fe19'/>
<id>urn:sha1:bd994c007ae232ade284c9c22c9150077961fe19</id>
<content type='text'>
In case U-Boot starts with GD_FLG_SKIP_RELOC, the U-Boot code is
not relocated, however the stack and heap is at the end of DRAM
after relocation. Reserve a LMB area for the non-relocated U-Boot
code so it won't be overwritten.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@gmail.com&gt;
Cc: Simon Glass &lt;sjg@chromium.org&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
<entry>
<title>image: Drop IMAGE_ENABLE_OF_LIBFDT</title>
<updated>2021-10-08T19:53:26Z</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2021-09-26T01:43:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=0c303f9a6628de9664b4f9140464a6f9d8224c36'/>
<id>urn:sha1:0c303f9a6628de9664b4f9140464a6f9d8224c36</id>
<content type='text'>
Add a host Kconfig for OF_LIBFDT. With this we can use
CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the
unnecessary indirection.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
</content>
</entry>
<entry>
<title>lmb: Add generic arch_lmb_reserve_generic()</title>
<updated>2021-09-23T18:15:32Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut@gmail.com</email>
</author>
<published>2021-09-10T20:47:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1274698d13ce1dfd00275b821b512e17cdc88d98'/>
<id>urn:sha1:1274698d13ce1dfd00275b821b512e17cdc88d98</id>
<content type='text'>
The arc/arm/m68k/microblaze/mips/ppc arch_lmb_reserve() implementations
are all mostly the same, except for a couple of details. Implement a
generic arch_lmb_reserve_generic() function which can be parametrized
enough to cater for those differences between architectures. This can
also be parametrized enough so it can handle cases where U-Boot is not
relocated to the end of DRAM e.g. because there is some other reserved
memory past U-Boot (e.g. unmovable firmware for coprocessor), it is not
relocated at all, and other such use cases.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@gmail.com&gt;
Cc: Alexey Brodkin &lt;alexey.brodkin@synopsys.com&gt;
Cc: Angelo Dureghello &lt;angelo@sysam.it&gt;
Cc: Daniel Schwierzeck &lt;daniel.schwierzeck@gmail.com&gt;
Cc: Eugeniy Paltsev &lt;Eugeniy.Paltsev@synopsys.com&gt;
Cc: Hai Pham &lt;hai.pham.ud@renesas.com&gt;
Cc: Michal Simek &lt;monstr@monstr.eu&gt;
Cc: Simon Goldschmidt &lt;simon.k.r.goldschmidt@gmail.com&gt;
Cc: Tom Rini &lt;trini@konsulko.com&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Reviewed-by: Tom Rini &lt;trini@konsulko.com&gt;
</content>
</entry>
</feed>
