All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/4] efi_loader: rework loading and starting of images
@ 2019-02-08 18:46 Heinrich Schuchardt
  2019-02-08 18:46 ` [U-Boot] [PATCH v2 1/4] efi_loader: LoadImage: always allocate new pages Heinrich Schuchardt
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Heinrich Schuchardt @ 2019-02-08 18:46 UTC (permalink / raw)
  To: u-boot

This patch series starts the necessary changes needed to correctly
implement the unloading of images in Exit().

If we want to properly unload images in Exit() the memory should always be
allocated in the same way. As we allocate memory when reading from file we
should do the same when the original image is in memory.

Up to now efi_load_pe() returns the entry point or NULL in case of an
error. This does not allow to return correct error codes from LoadImage().

Let efi_load_pe() return a status code and fill in the entry point in the
corresponding field of the image object.

Remove the duplicate code in efi_do_enter() and use efi_start_image() to
start the image invoked by the bootefi command.

Clean up bootefi_test_prepare().

Further patches will be needed:
- use LoadImage() in bootefi and bootmgr
- implement correct unloading of images in Exit()

Heinrich Schuchardt (4):
  efi_loader: LoadImage: always allocate new pages
  efi_loader: set entry point in efi_load_pe()
  efi_loader: use efi_start_image() for bootefi
  efi_loader: clean up bootefi_test_prepare()

 cmd/bootefi.c                     |  91 ++++++++++--------------
 include/efi_loader.h              |  10 ++-
 lib/efi_loader/efi_bootmgr.c      |   2 +-
 lib/efi_loader/efi_boottime.c     | 112 ++++++++++++++++++++----------
 lib/efi_loader/efi_image_loader.c |  37 +++++-----
 5 files changed, 141 insertions(+), 111 deletions(-)

-- 
2.20.1

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

end of thread, other threads:[~2019-07-19 18:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 18:46 [U-Boot] [PATCH v2 0/4] efi_loader: rework loading and starting of images Heinrich Schuchardt
2019-02-08 18:46 ` [U-Boot] [PATCH v2 1/4] efi_loader: LoadImage: always allocate new pages Heinrich Schuchardt
2019-02-08 18:46 ` [U-Boot] [PATCH v2 2/4] efi_loader: set entry point in efi_load_pe() Heinrich Schuchardt
2019-02-08 18:46 ` [U-Boot] [PATCH v2 3/4] efi_loader: use efi_start_image() for bootefi Heinrich Schuchardt
2019-07-18  6:00   ` Jonathan Gray
2019-07-18  8:39     ` Mark Kettenis
2019-07-18  9:16       ` Jonathan Gray
2019-07-18 17:33         ` Heinrich Schuchardt
2019-07-18 17:40           ` Alexander Graf
2019-07-18 17:45             ` Heinrich Schuchardt
2019-07-18 18:50           ` Alexander Graf
2019-07-18 23:07             ` Mark Kettenis
2019-07-19  5:43               ` Heinrich Schuchardt
2019-07-19  6:14                 ` Jonathan Gray
2019-07-19 17:52                   ` Heinrich Schuchardt
2019-07-19 18:36                     ` Heinrich Schuchardt
2019-02-08 18:46 ` [U-Boot] [PATCH v2 4/4] efi_loader: clean up bootefi_test_prepare() Heinrich Schuchardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.