From: Heinrich Schuchardt Date: Fri, 1 Sep 2017 03:45:23 +0200 Subject: [U-Boot] [PATCH 03/23] efi_loader: support 16 protocols per efi_object In-Reply-To: References: <20170826225110.7381-1-xypron.glpk@gmx.de> <20170826225110.7381-4-xypron.glpk@gmx.de> Message-ID: <88af2425-863e-e071-4a33-7ea0533483b7@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 On 08/31/2017 04:01 PM, Alexander Graf wrote: > On 08/27/2017 12:51 AM, Heinrich Schuchardt wrote: >> 8 protocols per efi_object is insufficient for iPXE. >> >> Signed-off-by: Heinrich Schuchardt >> --- >> include/efi_loader.h | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/include/efi_loader.h b/include/efi_loader.h >> index 6f71a6202b..e8fb4fbb0a 100644 >> --- a/include/efi_loader.h >> +++ b/include/efi_loader.h >> @@ -99,8 +99,8 @@ struct efi_handler { >> struct efi_object { >> /* Every UEFI object is part of a global object list */ >> struct list_head link; >> - /* We support up to 8 "protocols" an object can be accessed >> through */ >> - struct efi_handler protocols[8]; >> + /* We support up to 16 "protocols" an object can be accessed >> through */ >> + struct efi_handler protocols[16]; > > Can you try to convert it into a list instead? Leif tried to make the > UEFI Shell work and stumbled over the same limitation, so I guess a > static array won't cut it for long. > > > Alex > > Hello Alex, is it safe to call malloc and free before efi_exit_boot_services? Currently we do not check that boottime services are not called after efi_exit_boot_services. Shouldn't every call to boottime services fail thereafter? The spec says: "After successfully calling ExitBootServices(), all boot services in the system are terminated." We definitively do not want to call malloc at runtime because all available memory (except for EFI_MEMORY_RUNTIME) is managed by the operating system. Best regards Heinrich