- Check that the memory location that we are trying to read is valid
authorCameron Gutman <aicommander@gmail.com>
Wed, 17 Mar 2010 08:48:57 +0000 (08:48 +0000)
committerCameron Gutman <aicommander@gmail.com>
Wed, 17 Mar 2010 08:48:57 +0000 (08:48 +0000)
 - 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

svn path=/trunk/; revision=46241

reactos/drivers/bus/acpi/acpica/tables/tbutils.c
reactos/drivers/bus/acpi/osl.c

index a0f2758..ec2a88e 100644 (file)
@@ -592,7 +592,6 @@ AcpiTbParseRootTable (
     UINT32                  Length;
     UINT8                   *TableEntry;
     ACPI_STATUS             Status;
     UINT32                  Length;
     UINT8                   *TableEntry;
     ACPI_STATUS             Status;
-    ACPI_TABLE_HEADER       LocalHeader;
 
 
     ACPI_FUNCTION_TRACE (TbParseRootTable);
 
 
     ACPI_FUNCTION_TRACE (TbParseRootTable);
@@ -647,14 +646,6 @@ AcpiTbParseRootTable (
 
     AcpiTbPrintTableHeader (Address, Table);
 
 
     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 */
 
     Length = Table->Length;
     /* Get the length of the full table, verify length and map entire table */
 
     Length = Table->Length;
index d86e70b..9e2f35e 100644 (file)
@@ -466,7 +466,8 @@ AcpiOsReadPciConfiguration (
     NTSTATUS Status;
     PCI_SLOT_NUMBER slot;
 
     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;
         return AE_ERROR;
 
     slot.u.AsULONG = 0;
@@ -498,7 +499,8 @@ AcpiOsWritePciConfiguration (
     ULONG buf = Value;
     PCI_SLOT_NUMBER slot;
 
     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;
         return AE_ERROR;
 
     slot.u.AsULONG = 0;