Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi/acpica Add new functions
details: https://anonhg.NetBSD.org/src/rev/aa228fc8e0ca
branches: trunk
changeset: 325508:aa228fc8e0ca
user: christos <christos%NetBSD.org@localhost>
date: Fri Dec 27 18:53:25 2013 +0000
description:
Add new functions
diffstat:
sys/dev/acpi/acpica/OsdHardware.c | 16 ++++++++++++----
sys/dev/acpi/acpica/OsdMisc.c | 28 ++++++++++++++++++++++++++--
sys/dev/acpi/acpica/OsdSchedule.c | 17 +++++++++++++++--
3 files changed, 53 insertions(+), 8 deletions(-)
diffs (142 lines):
diff -r a10aea8dba1a -r aa228fc8e0ca sys/dev/acpi/acpica/OsdHardware.c
--- a/sys/dev/acpi/acpica/OsdHardware.c Fri Dec 27 18:53:16 2013 +0000
+++ b/sys/dev/acpi/acpica/OsdHardware.c Fri Dec 27 18:53:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: OsdHardware.c,v 1.8 2011/02/17 10:23:43 jruoho Exp $ */
+/* $NetBSD: OsdHardware.c,v 1.9 2013/12/27 18:53:25 christos Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.8 2011/02/17 10:23:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdHardware.c,v 1.9 2013/12/27 18:53:25 christos Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -125,7 +125,7 @@
* Read a value from a memory location.
*/
ACPI_STATUS
-AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width)
+AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT64 *Value, UINT32 Width)
{
void *LogicalAddress;
ACPI_STATUS rv = AE_OK;
@@ -147,6 +147,10 @@
*Value = *(volatile uint32_t *) LogicalAddress;
break;
+ case 64:
+ *Value = *(volatile uint64_t *) LogicalAddress;
+ break;
+
default:
rv = AE_BAD_PARAMETER;
}
@@ -162,7 +166,7 @@
* Write a value to a memory location.
*/
ACPI_STATUS
-AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width)
+AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT64 Value, UINT32 Width)
{
void *LogicalAddress;
ACPI_STATUS rv = AE_OK;
@@ -184,6 +188,10 @@
*(volatile uint32_t *) LogicalAddress = Value;
break;
+ case 64:
+ *(volatile uint64_t *) LogicalAddress = Value;
+ break;
+
default:
rv = AE_BAD_PARAMETER;
}
diff -r a10aea8dba1a -r aa228fc8e0ca sys/dev/acpi/acpica/OsdMisc.c
--- a/sys/dev/acpi/acpica/OsdMisc.c Fri Dec 27 18:53:16 2013 +0000
+++ b/sys/dev/acpi/acpica/OsdMisc.c Fri Dec 27 18:53:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: OsdMisc.c,v 1.12 2011/06/28 09:09:43 jruoho Exp $ */
+/* $NetBSD: OsdMisc.c,v 1.13 2013/12/27 18:53:25 christos Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 1.12 2011/06/28 09:09:43 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdMisc.c,v 1.13 2013/12/27 18:53:25 christos Exp $");
#include "opt_acpi.h"
#include "opt_ddb.h"
@@ -165,6 +165,30 @@
return AE_OK;
}
+
+/*
+ * AcpiOsPhysicalTableOverride:
+ *
+ * ExistingTable - Header of current table (probably firmware)
+ * NewAddress - Where new table address is returned
+ * (Physical address)
+ * NewTableLength - Where new table length is returned
+ *
+ * RETURN: Status, address/length of new table. Null pointer returned
+ * if no table is available to override.
+ *
+ * DESCRIPTION: Returns AE_SUPPORT, function not used in user space.
+ */
+ACPI_STATUS
+AcpiOsPhysicalTableOverride (
+ ACPI_TABLE_HEADER *ExistingTable,
+ ACPI_PHYSICAL_ADDRESS *NewAddress,
+ UINT32 *NewTableLength)
+{
+
+ return AE_SUPPORT;
+}
+
/*
* acpi_osd_debugger:
*
diff -r a10aea8dba1a -r aa228fc8e0ca sys/dev/acpi/acpica/OsdSchedule.c
--- a/sys/dev/acpi/acpica/OsdSchedule.c Fri Dec 27 18:53:16 2013 +0000
+++ b/sys/dev/acpi/acpica/OsdSchedule.c Fri Dec 27 18:53:25 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: OsdSchedule.c,v 1.16 2011/02/17 10:35:50 jmcneill Exp $ */
+/* $NetBSD: OsdSchedule.c,v 1.17 2013/12/27 18:53:25 christos Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.16 2011/02/17 10:35:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: OsdSchedule.c,v 1.17 2013/12/27 18:53:25 christos Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -184,3 +184,16 @@
return t;
}
+
+/*
+ *
+ * AcpiOsWaitEventsComplete:
+ *
+ * Wait for all asynchronous events to complete. This implementation
+ * does nothing.
+ */
+void
+AcpiOsWaitEventsComplete(void)
+{
+ return;
+}
Home |
Main Index |
Thread Index |
Old Index