Bug #11842: Fix emulation of int1A PCI BIOS services.

Use only %di to name the PCI register to read/write, rather than %edi.
DOS is only expecting the base PCI config space anyway, and the BIOS
might be using the high bits of %edi.
This commit is contained in:
Adam Jackson 2008-06-24 14:08:04 -04:00
parent d34430414a
commit 9e5b3deafb

View File

@ -730,7 +730,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb108:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_read_u8(dev, & X86_CL, X86_EDI);
pci_device_cfg_read_u8(dev, & X86_CL, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -743,7 +743,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb109:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_read_u16(dev, & X86_CX, X86_EDI);
pci_device_cfg_read_u16(dev, & X86_CX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -756,7 +756,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10a:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_read_u32(dev, & X86_ECX, X86_EDI);
pci_device_cfg_read_u32(dev, & X86_ECX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -769,7 +769,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10b:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_write_u8(dev, X86_CL, X86_EDI);
pci_device_cfg_write_u8(dev, X86_CL, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -782,7 +782,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10c:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_write_u16(dev, X86_CX, X86_EDI);
pci_device_cfg_write_u16(dev, X86_CX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {
@ -795,7 +795,7 @@ int1A_handler(xf86Int10InfoPtr pInt)
return 1;
case 0xb10d:
if ((dev = findPci(pInt, X86_EBX)) != NULL) {
pci_device_cfg_write_u32(dev, X86_ECX, X86_EDI);
pci_device_cfg_write_u32(dev, X86_ECX, X86_DI);
X86_EAX = X86_AL | (SUCCESSFUL << 8);
X86_EFLAGS &= ~((unsigned long)0x01); /* clear carry flag */
} else {