From aba5e9194b98988162e5bd026dbcb6627a53efe5 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 19 Aug 2016 01:23:30 +0200 Subject: efi_loader: Fix efi_install_configuration_table So far we were only installing the FDT table and didn't have space to store any other. Hence nobody realized that our efi table allocation was broken in that it didn't set the indicator for the number of tables plus one. This patch fixes it, allowing code to allocate new efi tables. Signed-off-by: Alexander Graf Reviewed-by: Simon Glass --- lib/efi_loader/efi_boottime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 51961d2060..17f1927465 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -395,7 +395,7 @@ efi_status_t efi_install_configuration_table(const efi_guid_t *guid, void *table /* Add a new entry */ memcpy(&efi_conf_table[i].guid, guid, sizeof(*guid)); efi_conf_table[i].table = table; - systab.nr_tables = i; + systab.nr_tables = i + 1; return EFI_SUCCESS; } -- cgit v1.2.3