<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/lib/lmb.c, branch v2026.07</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=v2026.07</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/lib/lmb.c?h=v2026.07'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2026-06-08T19:28:49Z</updated>
<entry>
<title>lmb: Rename LMB_LIMIT_DMA_BELOW_4G to LMB_LIMIT_DMA_BELOW_RAM_TOP</title>
<updated>2026-06-08T19:28:49Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-06-04T17:33:15Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3dd149ba17cd34724bc535d6de290de6e74e177f'/>
<id>urn:sha1:3dd149ba17cd34724bc535d6de290de6e74e177f</id>
<content type='text'>
Rename LMB_LIMIT_DMA_BELOW_4G to LMB_LIMIT_DMA_BELOW_RAM_TOP
to make the Kconfig option more descriptive. No functional
change.

Suggested-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: Optionally limit available memory to 4 GiB on limited systems</title>
<updated>2026-06-04T14:26:41Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-06-03T14:17:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=af4aad1f0a0beba82d2015d79b450b59bf34d2bc'/>
<id>urn:sha1:af4aad1f0a0beba82d2015d79b450b59bf34d2bc</id>
<content type='text'>
Some architectures can not DMA above 4 GiB boundary,
limit available memory to memory below 4 GiB boundary.

Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
Tested-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt; #rpi4 8GiB
</content>
</entry>
<entry>
<title>lmb: Reinstate access to memory above ram_top</title>
<updated>2026-03-13T19:20:11Z</updated>
<author>
<name>Marek Vasut</name>
<email>marek.vasut+renesas@mailbox.org</email>
</author>
<published>2026-01-27T23:48:40Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a3075db94d49f415658bf7e961e1eae90d9abc33'/>
<id>urn:sha1:a3075db94d49f415658bf7e961e1eae90d9abc33</id>
<content type='text'>
Revert commit eb052cbb896f ("lmb: add and reserve memory above ram_top")
and commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from
same bank"). These are based on incorrect premise of the first commit, that
"U-Boot does not use memory above ram_top". While U-Boot itself indeed does
not and should not use memory above ram_top, user can perfectly well use
that memory from the U-Boot shell, for example to load content in there.

Currently, attempt to use that memory to load large image using TFTP ends
with "TFTP error: trying to overwrite reserved memory...". With this change
in place, the memory can be used again.

Fixes: eb052cbb896f ("lmb: add and reserve memory above ram_top")
Fixes: 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank")
Reported-by: Yuya Hamamachi &lt;yuya.hamamachi.sx@renesas.com&gt;
Signed-off-by: Marek Vasut &lt;marek.vasut+renesas@mailbox.org&gt;
</content>
</entry>
<entry>
<title>lmb: Remove unreachable code</title>
<updated>2025-07-22T17:29:33Z</updated>
<author>
<name>Andrew Goodbody</name>
<email>andrew.goodbody@linaro.org</email>
</author>
<published>2025-07-14T16:40:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b9db211e3906c0a620ced344a2ebe5f87ccbf951'/>
<id>urn:sha1:b9db211e3906c0a620ced344a2ebe5f87ccbf951</id>
<content type='text'>
Code after a break is unreachable so remove it.

Signed-off-by: Andrew Goodbody &lt;andrew.goodbody@linaro.org&gt;
</content>
</entry>
<entry>
<title>arm: fix lmb region reservation when PRAM is defined</title>
<updated>2025-07-22T17:29:31Z</updated>
<author>
<name>Holger Brunck</name>
<email>holger.brunck@hitachienergy.com</email>
</author>
<published>2025-07-14T11:16:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=01548afc43770020cfebecc4a62cfa0d8b05517e'/>
<id>urn:sha1:01548afc43770020cfebecc4a62cfa0d8b05517e</id>
<content type='text'>
PRAM usage is not taken into account when reserving lmb for ARM
architecture, this means that predefined PRAM region is marked as
reserved by the architecture and cannot be used by other users.

Signed-off-by: Holger Brunck &lt;holger.brunck@hitachienergy.com&gt;
</content>
</entry>
<entry>
<title>lmb: add missing fallthrough in lmb_alloc_mem()</title>
<updated>2025-07-09T16:39:37Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-07-08T12:12:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=344e1798059ba65769272be3145736685bb25a7e'/>
<id>urn:sha1:344e1798059ba65769272be3145736685bb25a7e</id>
<content type='text'>
Add fallthrough to clarify the intent.

Addresses-Coverity-ID: CID 569481: Control flow issues (MISSING_BREAK)
Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Acked-by: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: use a single function to check for allocation and reservation requests</title>
<updated>2025-06-25T15:50:37Z</updated>
<author>
<name>Sughosh Ganu</name>
<email>sughosh.ganu@linaro.org</email>
</author>
<published>2025-06-17T10:43:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7aa19c3667d1cd23417f4ec7f5cb5dab260cfbf3'/>
<id>urn:sha1:7aa19c3667d1cd23417f4ec7f5cb5dab260cfbf3</id>
<content type='text'>
The functions that handle allocation requests check if a region of
memory overlaps with a used region. This is done through
lmb_overlaps_region(). Similar checks are done for reservation
requests made to the LMB module, where the caller asks specifically
for a particular region of memory. These checks are being done through
lmb_can_reserve_region().

There are subtle differences in the checking needed for allocation
requests, as against reservation requests. In the former, it is only
needed to be checked if a region is overlapping with an existing
used region, and return as soon as an overlap is found. For
reservation request checks, because U-Boot allows for re-use of in-use
regions with a particular memory attribute, this check has to iterate
through all the regions that might overlap with the requested region,
and then check that the necessary conditions are met to allow for the
overlap.

Combine these two checks in a single function, lmb_overlap_checks() as
both lmb_overlaps_region() and lmb_can_reserve_region() are pretty
similar otherwise.

Signed-off-by: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: use a single function to free up memory</title>
<updated>2025-06-25T15:50:37Z</updated>
<author>
<name>Sughosh Ganu</name>
<email>sughosh.ganu@linaro.org</email>
</author>
<published>2025-06-17T10:43:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=745f981f7083f70856b3db307b759774957a8082'/>
<id>urn:sha1:745f981f7083f70856b3db307b759774957a8082</id>
<content type='text'>
There is no need to have two separate API's for freeing up memory. Use
a single API lmb_free() to achieve this.

Signed-off-by: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: staticise lmb_add_memory()</title>
<updated>2025-06-25T15:50:37Z</updated>
<author>
<name>Sughosh Ganu</name>
<email>sughosh.ganu@linaro.org</email>
</author>
<published>2025-06-17T10:43:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3faffba6f19834bdda12b7942e545ff4a4a6e18b'/>
<id>urn:sha1:3faffba6f19834bdda12b7942e545ff4a4a6e18b</id>
<content type='text'>
lmb_add_memory() is only called from the lmb module. Mark the function
as static.

Signed-off-by: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
<entry>
<title>lmb: replace the lmb_alloc() and lmb_alloc_base() API's</title>
<updated>2025-06-25T15:50:37Z</updated>
<author>
<name>Sughosh Ganu</name>
<email>sughosh.ganu@linaro.org</email>
</author>
<published>2025-06-17T10:43:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6e4675b8e5d8d52d871042d6ac3429d6d1daf875'/>
<id>urn:sha1:6e4675b8e5d8d52d871042d6ac3429d6d1daf875</id>
<content type='text'>
There currently are two API's for requesting memory from the LMB
module, lmb_alloc() and lmb_alloc_base(). The function which does the
actual allocation is the same. Use the earlier introduced API
lmb_alloc_mem() for both types of allocation requests.

Signed-off-by: Sughosh Ganu &lt;sughosh.ganu@linaro.org&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
</entry>
</feed>
