From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heinrich Schuchardt Date: Fri, 8 Feb 2019 19:46:46 +0100 Subject: [U-Boot] [PATCH v2 0/4] efi_loader: rework loading and starting of images Message-ID: <20190208184650.22765-1-xypron.glpk@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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