U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] efi: Start tidying up memory management
@ 2024-07-25 13:56 Simon Glass
  2024-07-25 13:56 ` [PATCH 1/6] doc: Show more information in efi index Simon Glass
                   ` (6 more replies)
  0 siblings, 7 replies; 45+ messages in thread
From: Simon Glass @ 2024-07-25 13:56 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Heinrich Schuchardt, Ilias Apalodimas, Sughosh Ganu, Tom Rini,
	Simon Glass, AKASHI Takahiro, Bin Meng, Joao Marcos Costa,
	Masahisa Kojima, Raymond Mao, Vincent Stehlé

We have been discussing the state of EFI memory management for some
years so I thought it might be best to send a short series showing some
of the issues we have talked about.

This one just deals with memory allocation. It provides a way to detect
EFI 'page allocations' when U-Boot' malloc() should be used. It should
help us to clean up this area of U-Boot.

It also updates EFI to use U-Boot memory allocation for the pool. Most
functions use that anyway and it is much more efficient. It also avoids
allocating things 'in space' in conflict with the loaded images.

This series also includes a little patch to show more information in
the index for the EFI pages.

Note that this series is independent from Sugosh's lmb series[1],
although I believe it will point the way to simplifying some of the
later patches in that series.

Overall, some issues which should be resolved are:
- allocation inconsistency, e.g. efi_add_protocol() uses malloc() but
  efi_dp_dup() does not (this series makes a start)
- change efi_bl_init() to register events later, when the devices are
  actually used
- rather than efi_set_bootdev(), provide a bootstd way to take note of
  the device images came from and allow EFI to query that when needed
- EFI_LOADER_BOUNCE_BUFFER - can use U-Boot bounce buffers?

Minor questions on my mind:
- is unaligned access useful? Is there a performance penalty?
- API confusion about whether something is an address or a pointer

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=416441


Simon Glass (6):
  doc: Show more information in efi index
  efi: Convert device_path allocation to use malloc()
  efi: Allow monitoring of page allocations
  efi: Avoid pool allocation in efi_get_memory_map_alloc()
  efi: Use malloc() for the EFI pool
  efi: Show the location of the bounce buffer

 doc/develop/uefi/index.rst               |   2 +-
 include/efi_loader.h                     |  24 ++++
 lib/efi_loader/efi_bootbin.c             |  10 ++
 lib/efi_loader/efi_device_path.c         |  43 ++++---
 lib/efi_loader/efi_device_path_to_text.c |   2 +-
 lib/efi_loader/efi_memory.c              | 148 +++++++++++------------
 lib/efi_loader/efi_setup.c               |   7 ++
 7 files changed, 133 insertions(+), 103 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2024-08-01 17:44 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 13:56 [PATCH 0/6] efi: Start tidying up memory management Simon Glass
2024-07-25 13:56 ` [PATCH 1/6] doc: Show more information in efi index Simon Glass
2024-07-25 16:02   ` Heinrich Schuchardt
2024-07-25 13:56 ` [PATCH 2/6] efi: Convert device_path allocation to use malloc() Simon Glass
2024-07-25 16:13   ` Heinrich Schuchardt
2024-07-25 23:32     ` Simon Glass
2024-07-25 13:56 ` [PATCH 3/6] efi: Allow monitoring of page allocations Simon Glass
2024-07-25 16:20   ` Heinrich Schuchardt
2024-07-25 23:33     ` Simon Glass
2024-07-25 13:56 ` [PATCH 4/6] efi: Avoid pool allocation in efi_get_memory_map_alloc() Simon Glass
2024-07-25 16:38   ` Heinrich Schuchardt
2024-07-31 14:39     ` Simon Glass
2024-07-25 13:56 ` [PATCH 5/6] efi: Use malloc() for the EFI pool Simon Glass
2024-07-25 15:49   ` Heinrich Schuchardt
2024-07-25 23:32     ` Simon Glass
2024-07-26  8:31       ` Ilias Apalodimas
2024-07-26 14:54         ` Simon Glass
2024-07-29 10:01           ` Ilias Apalodimas
2024-07-29 15:28             ` Simon Glass
2024-07-30  8:19               ` Ilias Apalodimas
2024-07-30 14:38                 ` Simon Glass
2024-07-30 14:53                   ` Mark Kettenis
2024-07-30 15:18                     ` Simon Glass
2024-07-30 14:53                   ` Ilias Apalodimas
2024-07-30 15:18                     ` Simon Glass
2024-07-30 15:24                       ` Tom Rini
2024-07-30 19:42                         ` Simon Glass
2024-07-30 19:49                           ` Tom Rini
2024-07-30 20:05                             ` Simon Glass
2024-07-30 20:11                               ` Tom Rini
2024-07-30 20:52                                 ` Simon Glass
2024-07-30 21:20                                   ` Tom Rini
2024-07-31 14:39                                     ` Simon Glass
2024-07-31 17:17                                       ` Tom Rini
2024-08-01 10:14                                         ` Ilias Apalodimas
2024-08-01 16:14                                           ` Simon Glass
2024-08-01 16:22                                             ` Ilias Apalodimas
2024-08-01 17:43                                               ` Simon Glass
2024-07-31  7:39                               ` Ilias Apalodimas
2024-07-31 14:39                                 ` Simon Glass
2024-07-25 13:56 ` [PATCH 6/6] efi: Show the location of the bounce buffer Simon Glass
2024-07-25 16:31   ` Heinrich Schuchardt
2024-07-31 14:39     ` Simon Glass
2024-07-25 14:25 ` [PATCH 0/6] efi: Start tidying up memory management Ilias Apalodimas
2024-07-25 15:58   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox