public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 0/2] lmb: consider EFI memory map
@ 2023-01-04  4:26 Heinrich Schuchardt
  2023-01-04  4:26 ` [PATCH 1/2] vexpress: adjust loadaddr Heinrich Schuchardt
  2023-01-04  4:26 ` [PATCH 2/2] lmb: consider EFI memory map Heinrich Schuchardt
  0 siblings, 2 replies; 4+ messages in thread
From: Heinrich Schuchardt @ 2023-01-04  4:26 UTC (permalink / raw)
  To: Tom Rini
  Cc: Ilias Apalodimas, Liviu Dudau, Simon Glass, Patrick Delaunay,
	Stefan Roese, Michal Simek, Ashok Reddy Soma, Patrice Chotard,
	u-boot, Heinrich Schuchardt

As reported in Debian bug #1027176 relocation of the initrd may lead to
overwriting memory used by the EFI sub-system.

Currently the available memory for images is determined via the lmb
library functions. The lmb library has several shortcomings:

* It does not protect against overwriting one image with another.
* The same routines to find reserved memory are called again and
  again.

In the long run we should move to allocating memory for images.

As an intermediate solutions let's add lmb-reservations for all EFI memory
areas that are not EFI_CONVENTIONAL_MEMORY.

The variable $loadaddr of at least the vexpress_ca9x4 board collids with
memory used by the EFI sub-system. Adjust $loadaddr for the vexpress
boards to a sane value.

Heinrich Schuchardt (2):
  vexpress: adjust loadaddr
  lmb: consider EFI memory map

 include/configs/vexpress_common.h |  1 +
 lib/lmb.c                         | 45 +++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

-- 
2.37.2


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

end of thread, other threads:[~2023-01-05 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04  4:26 [PATCH 0/2] lmb: consider EFI memory map Heinrich Schuchardt
2023-01-04  4:26 ` [PATCH 1/2] vexpress: adjust loadaddr Heinrich Schuchardt
2023-01-04  4:26 ` [PATCH 2/2] lmb: consider EFI memory map Heinrich Schuchardt
2023-01-05 14:43   ` Ilias Apalodimas

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