ReactOS  0.4.15-dev-1152-g6c94e4f
interface.c File Reference
#include "precomp.h"
#include <debug.h>
Include dependency graph for interface.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

VOID NTAPI AcpiInterfaceReference (PVOID Context)
 
VOID NTAPI AcpiInterfaceDereference (PVOID Context)
 
NTSTATUS NTAPI AcpiInterfaceConnectVector (PDEVICE_OBJECT Context, ULONG GpeNumber, KINTERRUPT_MODE Mode, BOOLEAN Shareable, PGPE_SERVICE_ROUTINE ServiceRoutine, PVOID ServiceContext, PVOID ObjectContext)
 
NTSTATUS NTAPI AcpiInterfaceDisconnectVector (PVOID ObjectContext)
 
NTSTATUS NTAPI AcpiInterfaceEnableEvent (PDEVICE_OBJECT Context, PVOID ObjectContext)
 
NTSTATUS NTAPI AcpiInterfaceDisableEvent (PDEVICE_OBJECT Context, PVOID ObjectContext)
 
NTSTATUS NTAPI AcpiInterfaceClearStatus (PDEVICE_OBJECT Context, PVOID ObjectContext)
 
NTSTATUS NTAPI AcpiInterfaceNotificationsRegister (PDEVICE_OBJECT Context, PDEVICE_NOTIFY_CALLBACK NotificationHandler, PVOID NotificationContext)
 
VOID NTAPI AcpiInterfaceNotificationsUnregister (PDEVICE_OBJECT Context, PDEVICE_NOTIFY_CALLBACK NotificationHandler)
 
NTSTATUS Bus_PDO_QueryInterface (PPDO_DEVICE_DATA DeviceData, PIRP Irp)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 3 of file interface.c.

Function Documentation

◆ AcpiInterfaceClearStatus()

NTSTATUS NTAPI AcpiInterfaceClearStatus ( PDEVICE_OBJECT  Context,
PVOID  ObjectContext 
)

Definition at line 66 of file interface.c.

68 {
70 
72 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceConnectVector()

NTSTATUS NTAPI AcpiInterfaceConnectVector ( PDEVICE_OBJECT  Context,
ULONG  GpeNumber,
KINTERRUPT_MODE  Mode,
BOOLEAN  Shareable,
PGPE_SERVICE_ROUTINE  ServiceRoutine,
PVOID  ServiceContext,
PVOID  ObjectContext 
)

Definition at line 22 of file interface.c.

29 {
31 
33 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceDereference()

VOID NTAPI AcpiInterfaceDereference ( PVOID  Context)

Definition at line 15 of file interface.c.

16 {
18 }
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceDisableEvent()

NTSTATUS NTAPI AcpiInterfaceDisableEvent ( PDEVICE_OBJECT  Context,
PVOID  ObjectContext 
)

Definition at line 56 of file interface.c.

58 {
60 
62 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceDisconnectVector()

NTSTATUS NTAPI AcpiInterfaceDisconnectVector ( PVOID  ObjectContext)

Definition at line 37 of file interface.c.

38 {
40 
42 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceEnableEvent()

NTSTATUS NTAPI AcpiInterfaceEnableEvent ( PDEVICE_OBJECT  Context,
PVOID  ObjectContext 
)

Definition at line 46 of file interface.c.

48 {
50 
52 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceNotificationsRegister()

NTSTATUS NTAPI AcpiInterfaceNotificationsRegister ( PDEVICE_OBJECT  Context,
PDEVICE_NOTIFY_CALLBACK  NotificationHandler,
PVOID  NotificationContext 
)

Definition at line 76 of file interface.c.

79 {
81 
83 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceNotificationsUnregister()

VOID NTAPI AcpiInterfaceNotificationsUnregister ( PDEVICE_OBJECT  Context,
PDEVICE_NOTIFY_CALLBACK  NotificationHandler 
)

Definition at line 87 of file interface.c.

89 {
91 }
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ AcpiInterfaceReference()

VOID NTAPI AcpiInterfaceReference ( PVOID  Context)

Definition at line 8 of file interface.c.

9 {
11 }
#define UNIMPLEMENTED
Definition: debug.h:115

Referenced by Bus_PDO_QueryInterface().

◆ Bus_PDO_QueryInterface()

NTSTATUS Bus_PDO_QueryInterface ( PPDO_DEVICE_DATA  DeviceData,
PIRP  Irp 
)

Definition at line 94 of file interface.c.

96 {
98  PACPI_INTERFACE_STANDARD AcpiInterface;
99 
100  if (IrpSp->Parameters.QueryInterface.Version != 1)
101  {
102  DPRINT1("Invalid version number: %d\n",
103  IrpSp->Parameters.QueryInterface.Version);
105  }
106 
107  if (RtlCompareMemory(IrpSp->Parameters.QueryInterface.InterfaceType,
108  &GUID_ACPI_INTERFACE_STANDARD, sizeof(GUID)) == sizeof(GUID))
109  {
110  DPRINT("GUID_ACPI_INTERFACE_STANDARD\n");
111 
113  {
114  DPRINT1("Buffer too small! (%d)\n", IrpSp->Parameters.QueryInterface.Size);
116  }
117 
118  AcpiInterface = (PACPI_INTERFACE_STANDARD)IrpSp->Parameters.QueryInterface.Interface;
119 
124  AcpiInterface->GpeEnableEvent = AcpiInterfaceEnableEvent;
126  AcpiInterface->GpeClearStatus = AcpiInterfaceClearStatus;
129 
130  return STATUS_SUCCESS;
131  }
132  else
133  {
134  DPRINT1("Invalid GUID\n");
135  return STATUS_NOT_SUPPORTED;
136  }
137 }
NTSTATUS NTAPI AcpiInterfaceEnableEvent(PDEVICE_OBJECT Context, PVOID ObjectContext)
Definition: interface.c:46
NTSTATUS NTAPI AcpiInterfaceClearStatus(PDEVICE_OBJECT Context, PVOID ObjectContext)
Definition: interface.c:66
PGPE_CLEAR_STATUS GpeClearStatus
Definition: iotypes.h:3001
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
VOID NTAPI AcpiInterfaceDereference(PVOID Context)
Definition: interface.c:15
PGPE_DISABLE_EVENT GpeDisableEvent
Definition: iotypes.h:3000
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
NTSTATUS NTAPI AcpiInterfaceNotificationsRegister(PDEVICE_OBJECT Context, PDEVICE_NOTIFY_CALLBACK NotificationHandler, PVOID NotificationContext)
Definition: interface.c:76
PUNREGISTER_FOR_DEVICE_NOTIFICATIONS UnregisterForDeviceNotifications
Definition: iotypes.h:3003
PGPE_DISCONNECT_VECTOR GpeDisconnectVector
Definition: iotypes.h:2998
void DPRINT(...)
Definition: polytest.cpp:61
NTSTATUS NTAPI AcpiInterfaceDisconnectVector(PVOID ObjectContext)
Definition: interface.c:37
struct _ACPI_INTERFACE_STANDARD * PACPI_INTERFACE_STANDARD
PINTERFACE_REFERENCE InterfaceReference
Definition: iotypes.h:2995
VOID NTAPI AcpiInterfaceNotificationsUnregister(PDEVICE_OBJECT Context, PDEVICE_NOTIFY_CALLBACK NotificationHandler)
Definition: interface.c:87
NTSTATUS NTAPI AcpiInterfaceConnectVector(PDEVICE_OBJECT Context, ULONG GpeNumber, KINTERRUPT_MODE Mode, BOOLEAN Shareable, PGPE_SERVICE_ROUTINE ServiceRoutine, PVOID ServiceContext, PVOID ObjectContext)
Definition: interface.c:22
PGPE_ENABLE_EVENT GpeEnableEvent
Definition: iotypes.h:2999
VOID NTAPI AcpiInterfaceReference(PVOID Context)
Definition: interface.c:8
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2789
PREGISTER_FOR_DEVICE_NOTIFICATIONS RegisterForDeviceNotifications
Definition: iotypes.h:3002
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
#define DPRINT1
Definition: precomp.h:8
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: iotypes.h:2996
NTSTATUS NTAPI AcpiInterfaceDisableEvent(PDEVICE_OBJECT Context, PVOID ObjectContext)
Definition: interface.c:56
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:3107
return STATUS_SUCCESS
Definition: btrfs.c:3014
PGPE_CONNECT_VECTOR GpeConnectVector
Definition: iotypes.h:2997
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465

Referenced by Bus_PDO_PnP().