Add mainboard x86emu interrupt function support. Add tim5690 VGA BIOS functions: int15 getting LCD panel ID.

Signed-off-by: Libra Li <libra.li@technexion.com>
Acked-by: Marc Jones <marcj303@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4990 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Libra Li
2009-12-23 19:16:47 +00:00
committed by Marc Jones
parent 9341acda13
commit c143693c26
7 changed files with 303 additions and 26 deletions

View File

@@ -29,6 +29,8 @@
#include <console.h>
#endif
#include <arch/interrupt.h>
#define REALMODE_BASE ((void *)0x600)
struct realmode_idt {
@@ -64,6 +66,12 @@ static int intXX_unknown_handler(struct eregs *regs)
return -1;
}
/* setup interrupt handlers for mainboard */
void mainboard_interrupt_handlers(int intXX, void *intXX_func)
{
intXX_handler[intXX] = intXX_func;
}
int int12_handler(struct eregs *regs);
int int15_handler(struct eregs *regs);
int int1a_handler(struct eregs *regs);
@@ -80,16 +88,32 @@ static void setup_interrupt_handlers(void)
/* Mark all other intXX calls as unknown first */
for (i = 0x10; i < 0x100; i++)
intXX_handler[i] = &intXX_unknown_handler;
/* Now set the default functions that are actually
* needed to initialize the option roms. This is very
* slick, as it allows us to implement mainboard specific
* interrupt handlers, such as the int15
*/
intXX_handler[0x12] = &int12_handler;
intXX_handler[0x15] = &int15_handler;
intXX_handler[0x1a] = &int1a_handler;
{
/* If the mainboard_interrupt_handler isn't called first.
*/
if(!intXX_handler[i])
{
/* Now set the default functions that are actually
* needed to initialize the option roms. This is very
* slick, as it allows us to implement mainboard specific
* interrupt handlers, such as the int15
*/
switch (i) {
case 0x12:
intXX_handler[0x12] = &int12_handler;
break;
case 0x15:
intXX_handler[0x15] = &int15_handler;
break;
case 0x1a:
intXX_handler[0x1a] = &int1a_handler;
break;
default:
intXX_handler[i] = &intXX_unknown_handler;
break;
}
}
}
}
static void write_idt_stub(void *target, u8 intnum)
@@ -127,7 +151,7 @@ void run_bios(struct device *dev, unsigned long addr)
{
/* clear vga bios data area */
memset((void *)0x400, 0, 0x200);
/* Set up C interrupt handlers */
setup_interrupt_handlers();