Author: cgutman
Date: Wed Mar 17 09:48:57 2010
New Revision: 46241
URL:
http://svn.reactos.org/svn/reactos?rev=46241&view=rev
Log:
- Check that the memory location that we are trying to read is valid
- Remove the VMware hack
- ACPI works on all tested VMs now (QEMU, VirtualBox, and VMware)
- Just a resource code issue remains and prevents us from enabling ACPI by default
Modified:
trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c
trunk/reactos/drivers/bus/acpi/osl.c
Modified: trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/ta…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/tables/tbutils.c [iso-8859-1] Wed Mar 17
09:48:57 2010
@@ -592,7 +592,6 @@
UINT32 Length;
UINT8 *TableEntry;
ACPI_STATUS Status;
- ACPI_TABLE_HEADER LocalHeader;
ACPI_FUNCTION_TRACE (TbParseRootTable);
@@ -646,14 +645,6 @@
}
AcpiTbPrintTableHeader (Address, Table);
-
- AcpiTbCleanupTableHeader (&LocalHeader, Table);
- if (strstr(LocalHeader.AslCompilerId, "VMW"))
- {
- ACPI_ERROR ((AE_INFO, "VMware detected; ACPI has been disabled\n"));
- AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
- return_ACPI_STATUS (AE_ERROR);
- }
/* Get the length of the full table, verify length and map entire table */
Modified: trunk/reactos/drivers/bus/acpi/osl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/osl.c?rev…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] Wed Mar 17 09:48:57 2010
@@ -466,7 +466,8 @@
NTSTATUS Status;
PCI_SLOT_NUMBER slot;
- if (Register == 0 || PciId->Device == 0)
+ if (Register == 0 || PciId->Device == 0 ||
+ Register + Width > PCI_COMMON_HDR_LENGTH)
return AE_ERROR;
slot.u.AsULONG = 0;
@@ -498,7 +499,8 @@
ULONG buf = Value;
PCI_SLOT_NUMBER slot;
- if (Register == 0 || PciId->Device == 0)
+ if (Register == 0 || PciId->Device == 0 ||
+ Register + Width > PCI_COMMON_HDR_LENGTH)
return AE_ERROR;
slot.u.AsULONG = 0;