4 * execute BIOS int 10h calls in x86 real mode environment
5 * Copyright 1999 Egbert Eich
7 #ifdef HAVE_XORG_CONFIG_H
8 #include <xorg-config.h>
15 #define _INT10_PRIVATE
16 #include "xf86int10.h"
19 mapPciRom(int pciEntity
, unsigned char * address
)
22 unsigned char *mem
, *ptr
;
25 pciVideoPtr pvp
= xf86GetPciInfoForEntity(pciEntity
);
29 ErrorF("mapPciRom: no PCI info\n");
34 tag
= pciTag(pvp
->bus
,pvp
->device
,pvp
->func
);
35 length
= 1 << pvp
->biosSize
;
37 /* Read in entire PCI ROM */
38 mem
= ptr
= xnfcalloc(length
, 1);
39 length
= xf86ReadPciBIOS(0, tag
, -1, ptr
, length
);
41 memcpy(address
, ptr
, length
);
42 /* unmap/close/disable PCI bios mem */
47 ErrorF("mapPciRom: no BIOS found\n");