The EFI_CONVENTIONAL_MEMORY type is now being managed through the LMB
module. Add a separate function, lmb_add_memory() to add the RAM
memory to the LMB memory map. The efi_add_known_memory() function is
now used for adding any other memory type to the EFI memory map.
Signed-off-by: Sughosh Ganu
The EFI memory allocations are now being done through the LMB module,
and hence the memory map is maintained by the LMB module. Use the
lmb_add_memory() API function to add the usable RAM memory to the
LMB's memory map.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
arch/ar
.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
arch/arm/mach-k3/common.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
index eaa7d36176..a5c0170cd2 100644
--- a/arch/arm/mach-k3/common.c
+++ b/arch/arm/mach-k3
: Sughosh Ganu
---
Changes since V1:
* Handle the addition of memory to the LMB memory map.
* Pass the overlap_only_ram parameter to the efi_add_memory_map_pg()
based on the type of operation.
lib/efi_loader/Kconfig | 1 +
lib/efi_loader/efi_memory.c | 34 ++
2
s can then be used by the other module to keep track of
available and used memory.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Notify addition of memory to the LMB memory map.
* Add a function lmb_notify() to check if notification has to be sent.
lib/
Add a function to check if a given address falls within the RAM
address used by U-Boot. This will be used to notify other modules if
the address gets allocated, so as to not get re-allocated by some
other module.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Have a common weak function for
Add a Kconfig symbol to enable getting updates on any memory map
changes that might be done by the LMB module. This notification
mechanism can then be used to have a synchronous view of allocated and
free memory.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Change the description to
Add an event which would be used for notifying changes in the
LMB modules' memory map. This is to be used for having a
synchronous view of the memory that is currently in use, and that is
available for allocations.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Remove the event fo
Use the LMB API's for allocating and freeing up memory. With this, the
LMB module becomes the common backend for managing non U-Boot image
memory that might be requested by other modules.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
lib/efi_loader/Kconfig | 1 +
Add a flag LMB_NONOTIFY that can be passed to the LMB API's for
reserving memory. This will then result in no notification being sent
from the LMB module for the changes to the LMB's memory map.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
include/lmb.h | 1 +
1 file
functions with flags for allocating and
freeing up memory. The caller can then use these API's for specifying
the type of memory that is required. For now, these functions will be
used by the EFI memory module.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
include/lmb.h
The LMB code has been changed to make the memory reservations
persistent and global. Make corresponding change the the
lmb_test_dump_all() function to print the global LMB available and
used memory.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Corresponding changes needed to work with
With the LMB tests moved under a separate class of unit tests, invoke
these from a separate script which would allow for a system reset once
the tests have been run. This enables clearing up the LMB memory map
after having run the tests.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New
et on completion of these tests.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
include/test/suites.h| 1 +
test/Kconfig | 9 ++
test/Makefile| 1 +
test/cmd_ut.c| 7 +
test/lib/Makefile| 1 -
test/{lib/
would be invoked through a separate test, and
thus would not interfere with the running of the rest of the tests.
Signed-off-by: Sughosh Ganu
---
Changes since V1: None
test/lib/lmb.c | 41 -
1 file changed, 20 insertions(+), 21 deletions(-)
diff --git a
initialise and cleanup the lists. These
functions will be invoked from every test to start the memory map from
a clean slate.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Make changes to the lmb_init() function for working with alist based
lmb lists.
* Add a lmb_uninit() function to clear out
read the file to that address.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Free up the memory allocated once done with it.
test/boot/cedit.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/boot/cedit.c b/test/boot/cedit.c
index fd19da0a0c..923ddd1481 100644
The LMB memory is typically not needed very early in the platform's
boot. Do not add memory to the LMB map before relocation. Reservation
of common areas and adding of memory is done after relocation.
Signed-off-by: Sughosh Ganu
---
Changes since V1: None
board/xilinx/common/board.c
memory range has other side effects. On the
other hand, the sandbox iommu test expects to see this particular
value of the DVA. Use the DVA address directly, instead of mapping it
in the LMB memory map, and then have it allocated.
Signed-off-by: Sughosh Ganu
---
Changes since V1: None
drivers/iommu
Enable the LMB module in the SPL stage. This will allow the LMB code
to be exercised and tested in the SPL stage.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
configs/sandbox_spl_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/sandbox_spl_defconfig b
of using the current value of stack pointer for starting
the reserved region, have a fixed value, considering the stack size
config value.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
arch/arc/lib/cache.c| 14 --
arch/arm/lib/stack.c| 14
Use the BIT macro for assigning values to the LMB flags instead of
assigning random values to them.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch based on review comment from Heinrich
include/lmb.h | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/include
the board init.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Initialise the lmb structures as part of board init.
* Initialise the lmb structure durint SPL init when enabled.
common/board_r.c | 4
common/spl/spl.c | 4
include/lmb.h| 11 +++
lib/lmb.c| 20
With the move to make the LMB allocations persistent and the common
memory regions being reserved during board init, there is no need for
an explicit reservation of a memory range. Remove the
lmb_init_and_reserve_range() function.
Signed-off-by: Sughosh Ganu
Reviewed-by: Ilias Apalodimas
n the board's DTB.
Mark these regions of memory with the LMB_NOOVERWRITE flag to indicate
that these regions cannot be re-requested or overwritten.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Mark the reserved regions as LMB_NOOVERWRITE.
* Call the lmb_reserve_common() function in U-B
With the changes to make the LMB reservations persistent, the common
memory regions are being added during board init. Remove the
now superfluous lmb_init_and_reserve() function.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Removed the replacement of lmb_init_and_reserve() with
Introduce a function lmb_add_memory() to add available memory to the
LMB memory map. Call this function during board init once the LMB data
structures have been initialised.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Add memory only till ram_top to the LMB memory map, instead of all
With the introduction of separate config symbols for the SPL phase of
U-Boot, the condition checks need to be tweaked so that platforms that
enable the LMB module in SPL are also able to call the LMB API's. Use
the appropriate condition checks to achieve this.
Signed-off-by: Sughosh
heap in SPL.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
lib/Kconfig | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/Kconfig b/lib/Kconfig
index 072ed0ecfa..7eea517b3b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -1103,7 +1103,17 @@ config
The LMB memory map is now persistent and global, and the
CONFIG_LMB_USE_MAX_REGIONS config symbol has now been removed. Remove
the corresponding lmb test case.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
test/lib/lmb.c | 67 --
1
the earlier implementation of static arrays.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
configs/a3y17lte_defconfig | 1 -
configs/a5y17lte_defconfig | 1 -
configs/a7y17lte_defconfig | 1 -
configs/apple_m1_defconfig | 1 -
configs
e for the available(free) memory,
and one for the used memory. Once full, the list can then be extended
at runtime.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Use alloced list structure for the available and reserved memory
lists instead of static arrays.
* Corresponding changes in the
this attribute would indicate that the region cannot be
resized.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Do the check for the region flags in lmb_resize_regions() and
lmb_merge_overlap_regions() to decide on merging the overlapping
regions.
include/lmb.h | 1 +
lib/lmb.c
the region occupied by
the FDT blob is to be marked as reserved by the LMB module.
Signed-off-by: Sughosh Ganu
---
Changes since V1:
* Use true/false identifiers for bool instead of 1/0
* Fix the argument passed to the function in arch/mips/lib/bootm.c
arch/mips/lib/bootm.c | 2 +-
boot
With the move of the LMB structure to a persistent state, there is no
need to declare the variable locally, and pass it as part of the LMB
API's. Remove all local variable instances and change the API's
correspondingly.
Signed-off-by: Sughosh Ganu
---
Changes since V1: None
ar
The LMB module will be changed to have persistent and global memory
maps of available and used memory. With this change, there won't be
any need to explicitly initialise the LMB memory maps. Remove the call
to the lmb_init() function.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New
The __lmb_alloc_base() function is only called from within the lmb
module. Moreover, the lmb_alloc() and lmb_alloc_base() API's are good
enough for the allocation API calls. Make the __lmb_alloc_base()
function static.
Signed-off-by: Sughosh Ganu
Reviewed-by: Ilias Apalodimas
---
Changes
The lmb_is_reserved() API is not used. There is another API,
lmb_is_reserved_flags() which can be used to check if a particular
memory region is reserved. Remove the unused API.
Signed-off-by: Sughosh Ganu
Reviewed-by: Ilias Apalodimas
---
Changes since V1: None
include/lmb.h | 11
The alist_expand_by() function is a global function. Add a declaration
for the function in the header.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
include/alist.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/alist.h b/include/alist.h
index bab146c35d
Add a couple of helper functions to detect an empty and full alist.
Signed-off-by: Sughosh Ganu
---
Changes since V1: New patch
include/alist.h | 22 ++
1 file changed, 22 insertions(+)
diff --git a/include/alist.h b/include/alist.h
index a68afc9fff..bab146c35d 100644
From: Simon Glass
Use this new data structure in the utility function.
Signed-off-by: Simon Glass
Signed-off-by: Sughosh Ganu
---
lib/strto.c | 35 +++
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/lib/strto.c b/lib/strto.c
index f83ac67c66
the code.
Introduce a new data structure, which is a variable-sized list of structs
each of the same, pre-set size. It provides O(1) access and is reasonably
efficient at expanding linearly, since it doubles in size when it runs out
of space.
Signed-off-by: Simon Glass
Signed-off-by: Sughosh Ganu
From: Simon Glass
The current implementation can return an extra result at the end when
the string ends with a space. Fix this by adding a special case.
Signed-off-by: Simon Glass
Signed-off-by: Sughosh Ganu
---
lib/strto.c | 4 +++-
test/str_ut.c | 4 +---
2 files changed, 4 insertions
From: Simon Glass
At present in tests it is possible to cause an out-of-memory condition
with malloc() but not realloc(). Add support to realloc() too, so code
which uses that function can be tested.
Signed-off-by: Simon Glass
Signed-off-by: Sughosh Ganu
---
common/dlmalloc.c | 4
1
ial case with str_to_list()
alist: Add support for an allocated pointer list
lib: Convert str_to_list() to use alist
Sughosh Ganu (44):
alist: add a couple of helper functions
alist: add a function declaration for alist_expand_by()
lmb: remove the unused lmb_is_reserved() function
lmb: s
11b27a ("binman: capsule: Add support for generating...")
> ---
Acked-by: Sughosh Ganu
Although I don't think this warrants a Fixes tag. It is not fixing any
issue as such.
-sughosh
>
> (no changes since v1)
>
> tools/binman/etype/efi_capsule.py | 1 -
> 1 file c
On Thu, 13 Jun 2024 at 22:57, Heinrich Schuchardt wrote:
>
> On 13.06.24 18:59, Simon Glass wrote:
> > Hi Tom,
> >
> > On Thu, 13 Jun 2024 at 09:42, Tom Rini wrote:
> >>
> >> On Thu, Jun 13, 2024 at 09:22:15AM -0600, Simon Glass wrote:
> >>> Hi Tom,
> >>>
> >>> On Wed, 12 Jun 2024 at 15:40, Tom R
On Wed, 12 Jun 2024 at 12:16, Ilias Apalodimas
wrote:
>
> On Mon, 10 Jun 2024 at 18:54, Simon Glass wrote:
> >
> > Hi,
> >
> > On Mon, 10 Jun 2024 at 09:42, Sughosh Ganu wrote:
> > >
> > > On Mon, 10 Jun 2024 at 20:47, Heinrich Schuchardt
hi Ilias,
On Wed, 12 Jun 2024 at 11:19, Ilias Apalodimas
wrote:
>
> [...]
>
> > > > > > > > > + struct event_lmb_map_update *lmb_map =
> > > > > > > > > &event->data.lmb_map;
> > > > > > > > > +
> > > > > > > > > + addr = (uintptr_t)map_sysmem(lmb_map->base, 0);
> > > > > > > > > + pages =
On Tue, 11 Jun 2024 at 15:47, Heinrich Schuchardt wrote:
>
> On 07.06.24 20:52, Sughosh Ganu wrote:
> > There are events that would be used to notify other interested modules
> > of any changes in available and occupied memory. This would happen
> > when a module allocate
On Tue, 11 Jun 2024 at 15:31, Heinrich Schuchardt wrote:
>
> On 11.06.24 10:55, Sughosh Ganu wrote:
> > On Mon, 10 Jun 2024 at 23:14, Tom Rini wrote:
> >>
> >> On Sat, Jun 08, 2024 at 12:22:31AM +0530, Sughosh Ganu wrote:
> >>
> >>> The LMB m
On Tue, 11 Jun 2024 at 14:47, Heinrich Schuchardt wrote:
>
> On 07.06.24 20:52, Sughosh Ganu wrote:
> > Allow for resizing of LMB regions if the region attributes match. The
> > current code returns a failure status on detecting an overlapping
> > address. This worked up
On Tue, 11 Jun 2024 at 14:42, Heinrich Schuchardt wrote:
>
> On 07.06.24 20:52, Sughosh Ganu wrote:
> > The changes in the EFI memory map are now notified to the LMB
> > module. There is therefore no need to explicitly get the efi memory
> > map and set aside
On Tue, 11 Jun 2024 at 02:35, Tom Rini wrote:
>
> On Sat, Jun 08, 2024 at 12:22:09AM +0530, Sughosh Ganu wrote:
>
> > The aim of this patch series is to fix the current state of
> > incoherence between modules when it comes to memory usage. The primary
> > issue that t
On Mon, 10 Jun 2024 at 23:14, Tom Rini wrote:
>
> On Sat, Jun 08, 2024 at 12:22:31AM +0530, Sughosh Ganu wrote:
>
> > The LMB memory map is now persistent and global. Running the tests for
> > the LMB module will result in the memory map getting reset, and this
> > wi
On Mon, 10 Jun 2024 at 23:01, Tom Rini wrote:
>
> On Sat, Jun 08, 2024 at 12:22:17AM +0530, Sughosh Ganu wrote:
> > With the changes to make the Logical Memory Block(LMB) allocations
> > persistent and with the common memory regions being reserved during
> > board init,
On Mon, 10 Jun 2024 at 20:47, Heinrich Schuchardt wrote:
>
> On 07.06.24 20:52, Sughosh Ganu wrote:
> > There are events that would be used to notify other interested modules
> > of any changes in available and occupied memory. This would happen
> > when a module allocate
hi Simon,
On Mon, 10 Jun 2024 at 20:33, Simon Glass wrote:
>
> Hi Sughosh,
>
> On Mon, 10 Jun 2024 at 08:40, Sughosh Ganu wrote:
> >
> > hi Simon,
> >
> > On Mon, 10 Jun 2024 at 19:25, Simon Glass wrote:
> > >
> > > Hi Sughosh,
> &
On Mon, 10 Jun 2024 at 20:22, Sughosh Ganu wrote:
>
> hi Ilias,
>
> On Mon, 10 Jun 2024 at 19:48, Ilias Apalodimas
> wrote:
> >
> > Hi Sughosh
> >
> > On Mon, 10 Jun 2024 at 15:25, Sughosh Ganu wrote:
> > >
> > > On Mon, 10 Jun 2024 at
hi Ilias,
On Mon, 10 Jun 2024 at 19:48, Ilias Apalodimas
wrote:
>
> Hi Sughosh
>
> On Mon, 10 Jun 2024 at 15:25, Sughosh Ganu wrote:
> >
> > On Mon, 10 Jun 2024 at 17:40, Ilias Apalodimas
> > wrote:
> > >
> > > On Fri, 7 Jun 2024 at 21:54, Sugho
hi Simon,
On Mon, 10 Jun 2024 at 19:25, Simon Glass wrote:
>
> Hi Sughosh,
>
> On Thu, 6 Jun 2024 at 13:18, Sughosh Ganu wrote:
> >
> > hi Simon,
> >
> > On Wed, 29 May 2024 at 22:00, Simon Glass wrote:
> > >
> > > +Sughosh Ganu for referen
hi Ilias,
On Mon, 10 Jun 2024 at 19:52, Ilias Apalodimas
wrote:
>
> Hi Sughosh
>
> On Mon, 10 Jun 2024 at 15:57, Sughosh Ganu wrote:
> >
> > On Mon, 10 Jun 2024 at 18:17, Ilias Apalodimas
> > wrote:
> > >
> > > On Mon, 10 Jun 2024 at 15:20, Sugh
On Mon, 10 Jun 2024 at 18:29, Heinrich Schuchardt wrote:
>
> On 10.06.24 14:20, Sughosh Ganu wrote:
> > hi Ilias,
> >
> > On Mon, 10 Jun 2024 at 17:34, Ilias Apalodimas
> > wrote:
> >>
> >> Hi Sughosh
> >>
> >>
> >> On Fr
On Mon, 10 Jun 2024 at 18:17, Ilias Apalodimas
wrote:
>
> On Mon, 10 Jun 2024 at 15:20, Sughosh Ganu wrote:
> >
> > hi Ilias,
> >
> > On Mon, 10 Jun 2024 at 17:34, Ilias Apalodimas
> > wrote:
> > >
> > > Hi Sughosh
> > &g
On Mon, 10 Jun 2024 at 17:40, Ilias Apalodimas
wrote:
>
> On Fri, 7 Jun 2024 at 21:54, Sughosh Ganu wrote:
> >
> > There are events that would be used to notify other interested modules
> > of any changes in available and occupied memory. This would happen
> > when
hi Ilias,
On Mon, 10 Jun 2024 at 17:34, Ilias Apalodimas
wrote:
>
> Hi Sughosh
>
>
> On Fri, 7 Jun 2024 at 21:54, Sughosh Ganu wrote:
> >
> > Allow for resizing of LMB regions if the region attributes match. The
> > current code returns a failure status on det
hi Ilias,
On Mon, 10 Jun 2024 at 17:15, Ilias Apalodimas
wrote:
>
> On Fri, 7 Jun 2024 at 21:54, Sughosh Ganu wrote:
> >
> > Add a Kconfig symbol to enable getting updates on any memory map
> > changes that might be done by some other module. This notification
> >
On Sat, 8 Jun 2024 at 09:03, Heinrich Schuchardt wrote:
>
>
>
> Am 7. Juni 2024 20:52:40 MESZ schrieb Sughosh Ganu :
> >Add a command to dump the EFI memory map.
>
> What are you missing in 'efidebug memmap'?
Nothing. I wasn't aware of this sub-command
On Sat, 8 Jun 2024 at 09:07, Heinrich Schuchardt wrote:
>
>
>
> Am 7. Juni 2024 20:52:39 MESZ schrieb Sughosh Ganu :
> >Not for committing.
>
> Best put "DON'T MERGE" into the title to avoid mishaps in future versions.
Will do.
>
> In the final
On Sat, 8 Jun 2024 at 10:09, Heinrich Schuchardt wrote:
>
> On 6/7/24 20:52, Sughosh Ganu wrote:
> > The LMB code has been changed so that the memory reservations and
> > allocations are now persistent and global. With this change, the
> > design of the LMB tests needs t
Add a command to dump the EFI memory map.
Not for committing.
Signed-off-by: Sughosh Ganu
---
cmd/Makefile| 1 +
cmd/efi_map_dump.c | 28
include/efi_loader.h| 2 ++
lib/efi_loader/efi_memory.c | 32
Not for committing.
Signed-off-by: Sughosh Ganu
---
cmd/Makefile | 1 +
cmd/efi_memory.c | 155 +++
2 files changed, 156 insertions(+)
create mode 100644 cmd/efi_memory.c
diff --git a/cmd/Makefile b/cmd/Makefile
index 87133cc27a..35fcc4af5a
With the changes to add notifications for any changes to the LMB map,
the size of the image exceeds the limit set. Bump up the image size
limit for now to get the platform to build.
This is not for committing.
Signed-off-by: Sughosh Ganu
---
Note: @Fabio Estevam, please check if it would be
The LMB memory map is now persistent and global. There is therefore no
need to add memory to the LMB memory map as part of the bdinfo
command. Only dump the current available and reserved memory as part
of the bdinfo command.
Signed-off-by: Sughosh Ganu
---
cmd/bdinfo.c | 1 -
1 file changed, 1
The LMB code has been changed to make the memory reservations
persistent and global. Make corresponding change the the
lmb_test_dump_all() function to print the global LMB added and
reserved memory.
Signed-off-by: Sughosh Ganu
---
test/cmd/bdinfo.c | 12 ++--
1 file changed, 6
suite, and thus would not interfere with the running
of the rest of the tests.
Signed-off-by: Sughosh Ganu
---
test/lib/lmb.c | 49 -
1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index 67a6be5bc3..813f7
The LMB code can now accept reserving and adding overlapping regions
of memory. Adjust the test for checking the reservation of overlapping
memory regions to work with this corresponding change in the LMB code.
Signed-off-by: Sughosh Ganu
---
test/lib/lmb.c | 8
1 file changed, 4
Memory managed by LMB is now persistent and global. With that, it
could be possible for multiple callers to try to add memory that has
already been added. Add a test case to check that the LMB module
handles it as expected.
Signed-off-by: Sughosh Ganu
---
test/lib/lmb.c | 16
1
every test.
Signed-off-by: Sughosh Ganu
---
include/lmb.h | 4
lib/lmb.c | 17 +
test/lib/lmb.c | 18 ++
3 files changed, 39 insertions(+)
diff --git a/include/lmb.h b/include/lmb.h
index 1d4cd255d2..08ece0a90b 100644
--- a/include/lmb.h
+++ b/include
tests.
Signed-off-by: Sughosh Ganu
---
test/lib/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/lib/Makefile b/test/lib/Makefile
index e75a263e6a..9154e07993 100644
--- a/test/lib/Makefile
+++ b/test/lib/Makefile
@@ -9,7 +9,7 @@ obj-$(CONFIG_EFI_LOADER
With the addition of two events for notification of any changes to
memory that is occupied and is free, the output of the event_dump.py
script has changed. Update the expected event log to incorporate this
change.
Signed-off-by: Sughosh Ganu
---
test/py/tests/test_event_dump.py | 2 ++
1 file
read the file to that address.
Signed-off-by: Sughosh Ganu
---
test/boot/cedit.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/boot/cedit.c b/test/boot/cedit.c
index aa41719048..1f4147da89 100644
--- a/test/boot/cedit.c
+++ b/test/boot/cedit.c
@@ -8,6 +8,7
The LMB memory is typically not needed very early in the platform's
boot. Do not add memory to the LMB map before relocation. Reservation
of common areas and adding of memory is done after relocation.
Signed-off-by: Sughosh Ganu
---
board/xilinx/common/board.c
memory range has other side effects. On the
other hand, the sandbox iommu test expects to see this particular
value of the DVA. Use the DVA address directly, instead of mapping it
in the LMB memory map, and then have it allocated.
Signed-off-by: Sughosh Ganu
---
drivers/iommu/sandbox_iommu.c | 7
The changes in the EFI memory map are now notified to the LMB
module. There is therefore no need to explicitly get the efi memory
map and set aside the EFI allocated memory.
Signed-off-by: Sughosh Ganu
---
lib/lmb.c | 35 ---
1 file changed, 35 deletions(-)
diff
ff-by: Sughosh Ganu
---
lib/Kconfig | 1 +
lib/lmb.c | 34 ++
2 files changed, 35 insertions(+)
diff --git a/lib/Kconfig b/lib/Kconfig
index 9ea02ae006..9e465a748b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -,6 +,7 @@ config LMB
bool "Enable t
: Sughosh Ganu
---
lib/efi_loader/efi_memory.c | 70 ++---
1 file changed, 58 insertions(+), 12 deletions(-)
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index 435e580fb3..93244161b0 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib
s can then be used by the other module to allocate
memory only from available regions, instead of overwriting already
allocated memory.
Signed-off-by: Sughosh Ganu
---
lib/lmb.c | 49 +++--
1 file changed, 47 insertions(+), 2 deletions(-)
diff --git a/l
s can then be used by the other module to allocate
memory only from available regions, instead of overwriting already
allocated memory.
Signed-off-by: Sughosh Ganu
---
lib/efi_loader/efi_memory.c | 25 +
1 file changed, 25 insertions(+)
diff --git a/lib/efi_loader/efi_memor
Add a function to check if a given address falls within the RAM
address used by U-Boot. This will be used to notify other modules if
the address gets allocated, so as to not get re-allocated by some
other module.
Signed-off-by: Sughosh Ganu
---
arch/sandbox/cpu/cpu.c | 5 +
common/board_r.c
Add a Kconfig symbol to enable getting updates on any memory map
changes that might be done by some other module. This notification
mechanism can then be used to have a synchronous view of allocated and
free memory.
Signed-off-by: Sughosh Ganu
---
lib/Kconfig | 9 +
1 file changed, 9
Add events which would be used for notifying changes in the respective
modules' memory map. This is to be used for having a synchronous view
of the memory that is currently in use, and that is available for
allocations.
Signed-off-by: Sughosh Ganu
---
common/event.c | 4
include/ev
this attribute would indicate that the region cannot be
resized.
Signed-off-by: Sughosh Ganu
---
include/lmb.h | 1 +
lib/lmb.c | 120 --
2 files changed, 107 insertions(+), 14 deletions(-)
diff --git a/include/lmb.h b/include/lmb.h
-off-by: Sughosh Ganu
---
arch/arm/mach-apple/board.c | 2 +-
arch/arm/mach-snapdragon/board.c | 2 +-
arch/arm/mach-stm32mp/stm32mp1/cpu.c | 2 +-
cmd/bdinfo.c | 2 +-
cmd/load.c | 2 +-
fs/fs.c | 2
With the move to make the LMB allocations persistent and the common
memory regions being reserved during board init, the
lmb_init_and_reserve_range() API can be replaced with a simple
lmb_add() call.
Signed-off-by: Sughosh Ganu
---
boot/bootm.c | 2 +-
include/lmb.h | 2 --
lib/lmb.c | 8
been relocated. Also add the rest of the memory that is
available for allocations to the LMB's memory map.
Signed-off-by: Sughosh Ganu
---
common/board_r.c | 15 +++
include/lmb.h| 14 ++
lib/lmb.c| 14 +-
3 files changed, 42 insertions(+), 1 deletio
With the move of the LMB structure to a persistent state, there is no
need to declare the variable locally, and pass it as part of the LMB
API's. Remove all local variable instances and change the API's
correspondingly.
Signed-off-by: Sughosh Ganu
---
arch/arc/lib/cache.c
the region occupied by
the FDT blob is to be marked as reserved by the LMB module.
Signed-off-by: Sughosh Ganu
---
arch/mips/lib/bootm.c | 2 +-
boot/image-board.c| 2 +-
boot/image-fdt.c | 7 +++
cmd/elf.c | 2 +-
include/image.h
ff-by: Sughosh Ganu
---
Note: @Mark Kettenis, please review the changes made in the apple dart
driver. I have removed the driver-local LMB instance, but I am not
sure if the current logic makes sense. I would think that it would be
possible to simply use memory region allocated by the LMB module(
The __lmb_alloc_base() function is only called from within the lmb
module. Moreover, the lmb_alloc() and lmb_alloc_base() API's are good
enough for the allocation API calls. Make the __lmb_alloc_base()
function static.
Signed-off-by: Sughosh Ganu
---
include/lmb.h | 2 --
lib/lmb.c
301 - 400 of 1244 matches
Mail list logo