diff options
author | Simon Glass <sjg@chromium.org> | 2014-11-14 20:56:33 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-11-25 07:11:14 -0700 |
commit | 6854f87cbcad544dc07a02b96d358f81ca60c593 (patch) | |
tree | 228c9d727db6d46449debc7bd10b59f0964277e5 /include/bios_emul.h | |
parent | 0ca2426beae04189f094180748e72463f48a9270 (diff) |
pci: Add general support for execution of video ROMs
Some platforms don't have native code for dealing with their video
hardware. In some cases they use a binary blob to set it up and perform
required actions like setting the video mode. This approach is a hangover
from the old PC days where a ROM was provided and executed during startup.
Even now, these ROMs are supplied as a way to set up video. It avoids the
code for every video chip needing to be provided in the boot loader. But
it makes the video much less flexible - e.g. it is not possible to do
anything else while the video init is happening (including waiting hundreds
of milliseconds for display panels to start up).
In any case, to deal with this sad state of affairs, provide an API for
execution of x86 video ROMs, either natively or through emulation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bios_emul.h')
-rw-r--r-- | include/bios_emul.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/bios_emul.h b/include/bios_emul.h index 35d1ff31c5..f4c4d1d443 100644 --- a/include/bios_emul.h +++ b/include/bios_emul.h @@ -9,6 +9,7 @@ /* Include the register header directly here */ #include "../drivers/bios_emulator/include/x86emu/regs.h" +#include <pci.h> /**************************************************************************** REMARKS: @@ -40,4 +41,18 @@ struct vbe_mode_info; int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo, int cleanUp); +/* Run a BIOS ROM natively (only supported on x86 machines) */ +void bios_run_on_x86(pci_dev_t pcidev, unsigned long addr, int vesa_mode, + struct vbe_mode_info *mode_info); + +/** + * bios_set_interrupt_handler() - Install an interrupt handler for the BIOS + * + * This installs an interrupt handler that the BIOS will call when needed. + * + * @intnum: Interrupt number to install a handler for + * @int_handler_func: Function to call to handle interrupt + */ +void bios_set_interrupt_handler(int intnum, int (*int_handler_func)(void)); + #endif |