1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-08-31 08:12:06 +02:00

efi: clean up efi command

* Eliminate superfluous enum value EFI_TABLE_END.
* Use correct variable type for the memory type.
* Check validity of memory type.
* Make efi_build_mem_table static.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Heinrich Schuchardt
2020-08-27 12:39:03 +02:00
parent 0f7878b853
commit 5b94e26f1a
2 changed files with 22 additions and 18 deletions

View File

@@ -180,7 +180,6 @@ enum efi_mem_type {
EFI_PERSISTENT_MEMORY_TYPE,
EFI_MAX_MEMORY_TYPE,
EFI_TABLE_END, /* For efi_build_mem_table() */
};
/* Attribute values */
@@ -481,17 +480,4 @@ void efi_putc(struct efi_priv *priv, const char ch);
*/
int efi_info_get(enum efi_entry_t type, void **datap, int *sizep);
/**
* efi_build_mem_table() - make a sorted copy of the memory table
*
* @map: Pointer to EFI memory map table
* @size: Size of table in bytes
* @skip_bs: True to skip boot-time memory and merge it with conventional
* memory. This will significantly reduce the number of table
* entries.
* @return pointer to the new table. It should be freed with free() by the
* caller
*/
void *efi_build_mem_table(struct efi_entry_memmap *map, int size, bool skip_bs);
#endif /* _LINUX_EFI_H */