Add new functions
This commit is contained in:
parent
e9e92000ab
commit
0a1a7e4862
|
@ -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 @@ AcpiOsWritePort(ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
|
|||
* 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 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width)
|
|||
*Value = *(volatile uint32_t *) LogicalAddress;
|
||||
break;
|
||||
|
||||
case 64:
|
||||
*Value = *(volatile uint64_t *) LogicalAddress;
|
||||
break;
|
||||
|
||||
default:
|
||||
rv = AE_BAD_PARAMETER;
|
||||
}
|
||||
|
@ -162,7 +166,7 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width)
|
|||
* 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 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width)
|
|||
*(volatile uint32_t *) LogicalAddress = Value;
|
||||
break;
|
||||
|
||||
case 64:
|
||||
*(volatile uint64_t *) LogicalAddress = Value;
|
||||
break;
|
||||
|
||||
default:
|
||||
rv = AE_BAD_PARAMETER;
|
||||
}
|
||||
|
|
|
@ -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 @@ AcpiOsPredefinedOverride(const ACPI_PREDEFINED_NAMES *InitVal,
|
|||
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:
|
||||
*
|
||||
|
|
|
@ -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 @@ AcpiOsGetTimer(void)
|
|||
|
||||
return t;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* AcpiOsWaitEventsComplete:
|
||||
*
|
||||
* Wait for all asynchronous events to complete. This implementation
|
||||
* does nothing.
|
||||
*/
|
||||
void
|
||||
AcpiOsWaitEventsComplete(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue