1176bf4ceSSimon Glass /* 2176bf4ceSSimon Glass * Copyright (C) 1996-1999 SciTech Software, Inc. 3176bf4ceSSimon Glass * 4176bf4ceSSimon Glass * SPDX-License-Identifier: GPL-2.0 5176bf4ceSSimon Glass */ 6176bf4ceSSimon Glass 7176bf4ceSSimon Glass #ifndef _BIOS_EMUL_H 8176bf4ceSSimon Glass #define _BIOS_EMUL_H 9176bf4ceSSimon Glass 10176bf4ceSSimon Glass /* Include the register header directly here */ 11176bf4ceSSimon Glass #include "../drivers/bios_emulator/include/x86emu/regs.h" 12*6854f87cSSimon Glass #include <pci.h> 13176bf4ceSSimon Glass 14176bf4ceSSimon Glass /**************************************************************************** 15176bf4ceSSimon Glass REMARKS: 16176bf4ceSSimon Glass Data structure used to describe the details for the BIOS emulator system 17176bf4ceSSimon Glass environment as used by the X86 emulator library. 18176bf4ceSSimon Glass 19176bf4ceSSimon Glass HEADER: 20176bf4ceSSimon Glass biosemu.h 21176bf4ceSSimon Glass 22176bf4ceSSimon Glass MEMBERS: 23176bf4ceSSimon Glass vgaInfo - VGA BIOS information structure 24176bf4ceSSimon Glass biosmem_base - Base of the BIOS image 25176bf4ceSSimon Glass biosmem_limit - Limit of the BIOS image 26176bf4ceSSimon Glass busmem_base - Base of the VGA bus memory 27176bf4ceSSimon Glass ****************************************************************************/ 28176bf4ceSSimon Glass typedef struct { 29176bf4ceSSimon Glass int function; 30176bf4ceSSimon Glass int device; 31176bf4ceSSimon Glass int bus; 32176bf4ceSSimon Glass u32 VendorID; 33176bf4ceSSimon Glass u32 DeviceID; 34176bf4ceSSimon Glass pci_dev_t pcidev; 35176bf4ceSSimon Glass void *BIOSImage; 36176bf4ceSSimon Glass u32 BIOSImageLen; 37176bf4ceSSimon Glass u8 LowMem[1536]; 38176bf4ceSSimon Glass } BE_VGAInfo; 39176bf4ceSSimon Glass 40176bf4ceSSimon Glass struct vbe_mode_info; 41176bf4ceSSimon Glass 42176bf4ceSSimon Glass int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo **pVGAInfo, int cleanUp); 43176bf4ceSSimon Glass 44*6854f87cSSimon Glass /* Run a BIOS ROM natively (only supported on x86 machines) */ 45*6854f87cSSimon Glass void bios_run_on_x86(pci_dev_t pcidev, unsigned long addr, int vesa_mode, 46*6854f87cSSimon Glass struct vbe_mode_info *mode_info); 47*6854f87cSSimon Glass 48*6854f87cSSimon Glass /** 49*6854f87cSSimon Glass * bios_set_interrupt_handler() - Install an interrupt handler for the BIOS 50*6854f87cSSimon Glass * 51*6854f87cSSimon Glass * This installs an interrupt handler that the BIOS will call when needed. 52*6854f87cSSimon Glass * 53*6854f87cSSimon Glass * @intnum: Interrupt number to install a handler for 54*6854f87cSSimon Glass * @int_handler_func: Function to call to handle interrupt 55*6854f87cSSimon Glass */ 56*6854f87cSSimon Glass void bios_set_interrupt_handler(int intnum, int (*int_handler_func)(void)); 57*6854f87cSSimon Glass 58176bf4ceSSimon Glass #endif 59