From bcd84fe149c29b48a8580dd64aba3a1333411039 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Thu, 10 Jan 2019 16:53:34 +0100 Subject: mb/emulation/qemu-i440fx: change file handling Reduce the number of fw_find_file calls by returning the file structure at fw_cfg_check_file. The file structure can then be used to allocate memory and access the file content directly without recurrence searching. Remove now unnecessary function fw_cfg_load_file. Fixed breaking function calls and add include guard at fw_cfg_if.h. Change-Id: I48cc943aaa999e4323e9d7e5dd666c5316533dcc Signed-off-by: Thomas Heijligen Reviewed-on: https://review.coreboot.org/c/30845 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/mainboard/emulation/qemu-i440fx/fw_cfg.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mainboard/emulation/qemu-i440fx/fw_cfg.h') diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.h b/src/mainboard/emulation/qemu-i440fx/fw_cfg.h index 5bf16af203..b5cdb9292c 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.h +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.h @@ -10,9 +10,13 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ +#ifndef FW_CFG_H +#define FW_CFG_H +#include "fw_cfg_if.h" void fw_cfg_get(int entry, void *dst, int dstlen); -int fw_cfg_check_file(const char *name); -void fw_cfg_load_file(const char *name, void *dst); +int fw_cfg_check_file(FWCfgFile *file, const char *name); int fw_cfg_max_cpus(void); unsigned long fw_cfg_smbios_tables(int *handle, unsigned long *current); + +#endif /* FW_CFG_H */ -- cgit v1.2.3