[PATCH] x86: Drop duplicate declaration of emulator state
Wolfgang Wallner
wolfgang.wallner at br-automation.com
Mon Sep 14 10:11:22 CEST 2020
Hi Simon,
-----"U-Boot" <u-boot-bounces at lists.denx.de> schrieb: -----
> Betreff: [PATCH] x86: Drop duplicate declaration of emulator state
>
> With x86 we can execute an option ROM either natively or using the x86
> emulator (if enabled with CONFIG_BIOSEMU). Both of these share the
> _X86EMU_env variable, with the native code using it to hold register state
> during interrupt processing.
>
> At present, in 32-bit U-Boot, the variable is declared twice, once in
> common code and once in code only compiled with CONFIG_BIOSEMU.
>
> With gcc-10 this causes a 'multiple definitions' error on boards with
> CONFIG_BIOSEMU.
>
> Drop the emulator definition, except for 64-bit builds.
>
> Also drop inclusion of the emulator in 64-bit U-Boot since this does not
> work at present, and generally isn't needed if 32-bit code has already set
> up the option ROMs.
>
> Reported-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> drivers/bios_emulator/x86emu/sys.c | 4 ++++
> 1 file changed, 4 insertions(+)
Tested-by: Wolfgang Wallner <wolfgang.wallner at br-automation.com>
Tested by building chromebook_coral_defconfig on an Arch Linux with GCC 10.1.0
regards, Wolfgang
More information about the U-Boot
mailing list