1
/* $XFree86: xc/programs/Xserver/hw/xfree86/int10/pci.c,v 1.12 2002/04/04 14:05:51 eich Exp $ */
5
* execute BIOS int 10h calls in x86 real mode environment
6
* Copyright 1999 Egbert Eich
10
#include "xf86_ansic.h"
11
#define _INT10_PRIVATE
12
#include "xf86int10.h"
15
mapPciRom(int pciEntity, unsigned char * address)
18
unsigned char *mem, *ptr;
21
pciVideoPtr pvp = xf86GetPciInfoForEntity(pciEntity);
25
ErrorF("mapPciRom: no PCI info\n");
30
tag = pciTag(pvp->bus,pvp->device,pvp->func);
31
length = 1 << pvp->biosSize;
33
/* Read in entire PCI ROM */
34
mem = ptr = xnfcalloc(length, 1);
35
length = xf86ReadPciBIOS(0, tag, -1, ptr, length);
37
memcpy(address, ptr, length);
38
/* unmap/close/disable PCI bios mem */
43
ErrorF("mapPciRom: no BIOS found\n");