diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-15 21:38:58 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-07-17 17:12:26 +0800 |
commit | 5345700d2af425a8c5a36c078db5d71bf31280c7 (patch) | |
tree | 6eee64ed67989449b2e3d0a1c7dffff085926e19 /drivers/pci | |
parent | d424553675e93495f346ea7b24beb8c3dd750c67 (diff) | |
download | u-boot-5345700d2af425a8c5a36c078db5d71bf31280c7.tar.gz u-boot-5345700d2af425a8c5a36c078db5d71bf31280c7.tar.bz2 u-boot-5345700d2af425a8c5a36c078db5d71bf31280c7.zip |
x86: Allow video-BIOS code to be built for SPL
With qemu-x86_64 we need to run the video BIOS while in 32-bit mode, i.e.
SPL. Add a Kconfig option for this, adjust the Makefile rules and use
CONFIG_IS_ENABLED() where needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci_rom.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index 51dcdf9749..228ab7fca7 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -298,20 +298,20 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), } if (emulate) { -#ifdef CONFIG_BIOSEMU - BE_VGAInfo *info; - - log_debug("Running video BIOS with emulator..."); - ret = biosemu_setup(dev, &info); - if (ret) - goto err; - biosemu_set_interrupt_handler(0x15, int15_handler); - ret = biosemu_run(dev, (uchar *)ram, 1 << 16, info, - true, vesa_mode, &mode_info); - log_debug("done\n"); - if (ret) - goto err; -#endif + if (CONFIG_IS_ENABLED(BIOSEMU)) { + BE_VGAInfo *info; + + log_debug("Running video BIOS with emulator..."); + ret = biosemu_setup(dev, &info); + if (ret) + goto err; + biosemu_set_interrupt_handler(0x15, int15_handler); + ret = biosemu_run(dev, (uchar *)ram, 1 << 16, info, + true, vesa_mode, &mode_info); + log_debug("done\n"); + if (ret) + goto err; + } } else { #if defined(CONFIG_X86) && (CONFIG_IS_ENABLED(X86_32BIT_INIT) || CONFIG_TPL) log_debug("Running video BIOS..."); |