Author: cgutman
Date: Sat Oct 1 07:19:57 2011
New Revision: 53913
URL:
http://svn.reactos.org/svn/reactos?rev=53913&view=rev
Log:
[ACPI]
- Implement AcpiOsGetPhysicalAddress
- Make sure that AcpiOsGetThreadId returns a non-zero value
Modified:
trunk/reactos/drivers/bus/acpi/osl.c
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] Sat Oct 1 07:19:57 2011
@@ -124,7 +124,18 @@
void *LogicalAddress,
ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
{
- ASSERT(FALSE);
+ PHYSICAL_ADDRESS PhysAddr;
+
+ if (!LogicalAddress || !PhysicalAddress)
+ {
+ DPRINT1("Bad parameter\n");
+ return AE_BAD_PARAMETER;
+ }
+
+ PhysAddr = MmGetPhysicalAddress(LogicalAddress);
+
+ *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)PhysAddr.QuadPart;
+
return AE_OK;
}
@@ -190,7 +201,8 @@
ACPI_THREAD_ID
AcpiOsGetThreadId (void)
{
- return (ULONG)PsGetCurrentThreadId();
+ /* Thread ID must be non-zero */
+ return (ULONG)PsGetCurrentThreadId() + 1;
}
ACPI_STATUS