X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpci.c;h=7ebb3c52d3888789e6bf2bcc7a9b6d156d936639;hb=5e8cc93aaf1173688852acaa0825698c2dc0cb3f;hp=c5cd65e38680123ebe480e2bd04a34ec4c6e24d0;hpb=91253d061647c194cdc8c16c9ae85eccdf942139;p=bootcensus
diff --git a/src/pci.c b/src/pci.c
index c5cd65e..7ebb3c5 100644
--- a/src/pci.c
+++ b/src/pci.c
@@ -19,6 +19,7 @@ along with this program. If not, see .
#include
#include
#include "pci.h"
+#include "intr.h"
#include "int86.h"
#include "asmops.h"
#include "panic.h"
@@ -69,12 +70,18 @@ static uint32_t (*cfg_read32)(int, int, int, int);
void init_pci(void)
{
int i, count = 0;
+ int intrflag;
struct int86regs regs;
+ intrflag = get_intr_flag();
+
memset(®s, 0, sizeof regs);
regs.eax = 0xb101;
int86(0x1a, ®s);
+ /* restore interrupt state in case bios changed it */
+ set_intr_flag(intrflag);
+
/* PCI BIOS present if CF=0, AH=0, and EDX has the "PCI " sig FOURCC */
if((regs.flags & FLAGS_CARRY) || (regs.eax & 0xff00) || regs.edx != PCI_SIG) {
printf("No PCI BIOS present\n");