From d779b72dec04cdcbd03cd0ed98d96ff759c21066 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Sun, 31 Mar 2002 06:25:56 +0000 Subject: [PATCH] more fixes. Matrox cards work OK now. --- src/arch/i386/lib/idt.c | 8 ++++++++ src/bioscall/pcibios.c | 29 +++++++++++++++++++++++------ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/arch/i386/lib/idt.c b/src/arch/i386/lib/idt.c index c907b19acb..3c8aeda637 100644 --- a/src/arch/i386/lib/idt.c +++ b/src/arch/i386/lib/idt.c @@ -35,6 +35,10 @@ void handler(void) { " pushal\n" " movl $0x10, %eax\n" " jmp 1f\n" + "idthandle42:\n" + " pushal\n" + " movl $0x42, %eax\n" + " jmp 1f\n" "idthandle1a: \n" " pushal\n" " movl $0x1a, %eax\n" @@ -179,6 +183,7 @@ void setup_realmode_idt(void) { extern unsigned char idthandle, end_idthandle; extern unsigned char idthandle10, idthandle1a; + extern unsigned char idthandle42; int i; struct realidt *idts = (struct realidt *) 0; @@ -195,6 +200,9 @@ setup_realmode_idt(void) { idts[0x1a].offset += &idthandle1a - &idthandle; printk_debug("idts[0x1a].offset is now 0x%x\n", idts[0x1a].offset); + idts[0x42].offset += &idthandle42 - &idthandle; + printk_debug("idts[0x42].offset is now 0x%x\n", + idts[0x42].offset); memcpy((void *) 1024, &idthandle, &end_idthandle - &idthandle); diff --git a/src/bioscall/pcibios.c b/src/bioscall/pcibios.c index c00e3a124c..5e3d496c8d 100644 --- a/src/bioscall/pcibios.c +++ b/src/bioscall/pcibios.c @@ -13,8 +13,10 @@ enum { FINDDEV = 0xb102, READCONFBYTE = 0xb108, READCONFWORD = 0xb109, + READCONFDWORD = 0xb10a, WRITECONFBYTE = 0xb10b, - WRITECONFWORD = 0xb10c + WRITECONFWORD = 0xb10c, + WRITECONFDWORD = 0xb10d }; // errors go in AH. Just set these up so that word assigns @@ -84,11 +86,14 @@ pcibios( } } break; + case READCONFDWORD: case READCONFWORD: case READCONFBYTE: + case WRITECONFDWORD: case WRITECONFWORD: case WRITECONFBYTE: { + unsigned long dword; unsigned short word; unsigned char byte; unsigned char reg; @@ -103,19 +108,31 @@ pcibios( *peax = PCIBIOS_BADREG; retval = -1; } - - if (func == READCONFBYTE) { + switch(func) { + case READCONFBYTE: retval = pci_read_config_byte(dev, reg, &byte); *pecx = byte; - } else if (func == READCONFWORD) { + break; + case READCONFWORD: retval = pci_read_config_word(dev, reg, &word); *pecx = word; - } else if (func == WRITECONFBYTE) { + break; + case READCONFDWORD: + retval = pci_read_config_dword(dev, reg, &dword); + *pecx = dword; + break; + case WRITECONFBYTE: byte = *pecx; retval = pci_write_config_byte(dev, reg, byte); - } else if (func == WRITECONFWORD) { + break; + case WRITECONFWORD: word = *pecx; retval = pci_write_config_word(dev, reg, word); + break; + case WRITECONFDWORD: + word = *pecx; + retval = pci_write_config_dword(dev, reg, dword); + break; } if (retval)