ACPI: OS-dependent code tweaks

Change-Id: I533685f6716cb48ccf3d5ca5ef0fb681a5293549
This commit is contained in:
David van Moolenbroek 2014-12-23 09:45:52 +00:00
parent 3b0299dd65
commit 2a3bc70264

View file

@ -317,6 +317,7 @@ AcpiOsVprintf (
va_list Args)
{
printf("ACPI: ");
vprintf (Fmt, Args);
printf("\n");
}
@ -366,15 +367,7 @@ AcpiOsMapMemory (
ACPI_PHYSICAL_ADDRESS where, /* not page aligned */
ACPI_SIZE length) /* in bytes, not page-aligned */
{
ACPI_PHYSICAL_ADDRESS addr;
void * vir;
unsigned sdiff;
addr = where & ~0xfff; /* align to 4k */
sdiff = where - addr;
vir = vm_map_phys(SELF, (void *) addr, length + sdiff);
return (void *) ((char *)vir + sdiff);
return vm_map_phys(SELF, (void *) where, length);
}
@ -397,6 +390,7 @@ AcpiOsUnmapMemory (
void *where,
ACPI_SIZE length)
{
vm_unmap_phys(SELF, where, length);
}
@ -588,7 +582,7 @@ AcpiOsInstallInterruptHandler (
ACPI_OSD_HANDLER ServiceRoutine,
void *Context)
{
printf("AcpiOsInstallInterruptHandler NOT SUPPORTED\n");
printf("ACPI: no support for power interrupt yet\n");
return AE_OK;
}
@ -610,7 +604,7 @@ AcpiOsRemoveInterruptHandler (
UINT32 InterruptNumber,
ACPI_OSD_HANDLER ServiceRoutine)
{
printf("AcpiOsRemoveInterruptHandler NOT SUPPORTED\n");
printf("ACPI: no support for power interrupt yet\n");
return AE_OK;
}
@ -795,6 +789,8 @@ AcpiOsReadPort (
case 32:
sys_inl(Address, Value);
break;
default:
panic("unsupported width: %d", Width);
}
return AE_OK;
}
@ -830,9 +826,10 @@ AcpiOsWritePort (
case 32:
sys_outl(Address, Value);
break;
default:
panic("unsupported width: %d", Width);
}
return AE_OK;
return AE_OK;
}