From 25757220d6c11645b32489e9c8318559815b0dee Mon Sep 17 00:00:00 2001 From: Miao Yan Date: Wed, 20 Jan 2016 01:57:04 -0800 Subject: x86: qemu: re-structure qemu_fwcfg_list_firmware() Re-write the logic in qemu_fwcfg_list_firmware(), add a function qemu_fwcfg_read_firmware_list() to handle reading firmware list. Signed-off-by: Miao Yan Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/x86/include/asm/fw_cfg.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'arch/x86/include/asm') diff --git a/arch/x86/include/asm/fw_cfg.h b/arch/x86/include/asm/fw_cfg.h index fb110fa..2acf43e 100644 --- a/arch/x86/include/asm/fw_cfg.h +++ b/arch/x86/include/asm/fw_cfg.h @@ -12,6 +12,8 @@ #define FW_DMA_PORT_LOW 0x514 #define FW_DMA_PORT_HIGH 0x518 +#include + enum qemu_fwcfg_items { FW_CFG_SIGNATURE = 0x00, FW_CFG_ID = 0x01, @@ -67,9 +69,10 @@ struct fw_cfg_file { char name[FW_CFG_MAX_FILE_PATH]; }; -struct fw_cfg_files { - __be32 count; - struct fw_cfg_file files[]; +struct fw_file { + struct fw_cfg_file cfg; /* firmware file information */ + unsigned long addr; /* firmware file in-memory address */ + struct list_head list; /* list node to link to fw_list */ }; struct fw_cfg_dma_access { -- cgit v1.1