Fixes to ACPI and 4x0 - fixes the Freeway.
This commit is contained in:
36
src/acpi.c
36
src/acpi.c
@@ -81,25 +81,6 @@ acpi_update_irq(void *priv)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
acpi_raise_smi_common(void *priv)
|
||||
{
|
||||
acpi_t *dev = (acpi_t *) priv;
|
||||
|
||||
if ((dev->vendor == VEN_VIA) || (dev->vendor == VEN_VIA_596B)) {
|
||||
if ((!dev->regs.smi_lock || !dev->regs.smi_active)) {
|
||||
smi_line = 1;
|
||||
dev->regs.smi_active = 1;
|
||||
}
|
||||
} else if (dev->vendor == VEN_INTEL) {
|
||||
smi_line = 1;
|
||||
/* Clear bit 16 of GLBCTL. */
|
||||
dev->regs.glbctl &= ~0x00010000;
|
||||
} else if (dev->vendor == VEN_SMC)
|
||||
smi_line = 1;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
acpi_raise_smi(void *priv)
|
||||
{
|
||||
@@ -108,8 +89,19 @@ acpi_raise_smi(void *priv)
|
||||
if ((dev->vendor == VEN_INTEL) && !(dev->regs.glbctl & 0x00010000))
|
||||
return;
|
||||
|
||||
if (dev->regs.glbctl & 0x01)
|
||||
acpi_raise_smi_common(dev);
|
||||
if (dev->regs.glbctl & 0x01) {
|
||||
if ((dev->vendor == VEN_VIA) || (dev->vendor == VEN_VIA_596B)) {
|
||||
if ((!dev->regs.smi_lock || !dev->regs.smi_active)) {
|
||||
smi_line = 1;
|
||||
dev->regs.smi_active = 1;
|
||||
}
|
||||
} else if (dev->vendor == VEN_INTEL) {
|
||||
smi_line = 1;
|
||||
/* Clear bit 16 of GLBCTL. */
|
||||
dev->regs.glbctl &= ~0x00010000;
|
||||
} else if (dev->vendor == VEN_SMC)
|
||||
smi_line = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1119,7 +1111,7 @@ acpi_apm_out(uint16_t port, uint8_t val, void *p)
|
||||
if (dev->apm->do_smi) {
|
||||
if (dev->vendor == VEN_INTEL)
|
||||
dev->regs.glbsts |= 0x20;
|
||||
acpi_raise_smi_common(dev);
|
||||
acpi_raise_smi(dev);
|
||||
}
|
||||
} else
|
||||
dev->apm->stat = val;
|
||||
|
||||
@@ -143,7 +143,7 @@ i4x0_smram_handler_phase1(i4x0_t *dev)
|
||||
size[0] = 0x00020000;
|
||||
}
|
||||
|
||||
if (((regs[0x72] & 0x78) == 0x48) || ((regs[0x72] & 0x28) == 0x08))
|
||||
if (regs[0x72] & 0x08)
|
||||
smram_enable(dev->smram_low, base[0], base[0] & 0x000f0000, size[0],
|
||||
((regs[0x72] & 0x78) == 0x48), (regs[0x72] & 0x08));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user