ACPI and Vodoo 3/Banshee PCI/AGP card adding fixes, fixes #3535.

This commit is contained in:
OBattler
2023-08-10 16:10:59 +02:00
parent 5397388a1b
commit 9f4ae7030e
2 changed files with 6 additions and 12 deletions

View File

@@ -141,12 +141,12 @@ acpi_update_irq(acpi_t *dev)
acpi_timer_update(dev, (dev->regs.pmen & TMROF_EN) && !(dev->regs.pmsts & TMROF_STS));
}
static void
acpi_do_raise_smi(void *priv, int do_smi, int is_apm)
void
acpi_raise_smi(void *priv, int do_smi)
{
acpi_t *dev = (acpi_t *) priv;
if (is_apm || (dev->regs.glbctl & 0x01)) {
if (dev->regs.glbctl & 0x01) {
if ((dev->vendor == VEN_VIA) || (dev->vendor == VEN_VIA_596B)) {
if (!dev->regs.smi_lock || !dev->regs.smi_active) {
if (do_smi)
@@ -168,12 +168,6 @@ acpi_do_raise_smi(void *priv, int do_smi, int is_apm)
}
}
void
acpi_raise_smi(void *priv, int do_smi)
{
acpi_do_raise_smi(priv, do_smi, 0);
}
static uint32_t
acpi_reg_read_common_regs(UNUSED(int size), uint16_t addr, void *priv)
{
@@ -1588,7 +1582,7 @@ acpi_apm_out(uint16_t port, uint8_t val, void *priv)
dev->apm->cmd = val;
if (dev->vendor == VEN_INTEL)
dev->regs.glbsts |= 0x20;
acpi_do_raise_smi(dev, dev->apm->do_smi, 1);
acpi_raise_smi(dev, dev->apm->do_smi);
} else
dev->apm->stat = val;
}

View File

@@ -3164,9 +3164,9 @@ banshee_init_common(const device_t *info, char *fn, int has_sgram, int type, int
banshee->svga.decode_mask = 0x1ffffff;
if (banshee->has_bios)
pci_add_card(banshee->agp ? PCI_ADD_AGP : PCI_ADD_VIDEO, banshee_pci_read, banshee_pci_write, banshee, &banshee->pci_slot);
else
pci_add_card(banshee->agp ? PCI_ADD_AGP : PCI_ADD_NORMAL, banshee_pci_read, banshee_pci_write, banshee, &banshee->pci_slot);
else
pci_add_card(banshee->agp ? PCI_ADD_AGP : PCI_ADD_VIDEO, banshee_pci_read, banshee_pci_write, banshee, &banshee->pci_slot);
banshee->voodoo = voodoo_2d3d_card_init(voodoo_type);
banshee->voodoo->p = banshee;