ReactOS  0.4.15-dev-341-g17c5fb8
interface.c
Go to the documentation of this file.
1 #include "precomp.h"
2 
3 #define NDEBUG
4 #include <debug.h>
5 
6 VOID
7 NTAPI
9 {
11 }
12 
13 VOID
14 NTAPI
16 {
18 }
19 
21 NTAPI
29 {
31 
33 }
34 
36 NTAPI
38 {
40 
42 }
43 
45 NTAPI
48 {
50 
52 }
53 
55 NTAPI
58 {
60 
62 }
63 
65 NTAPI
68 {
70 
72 }
73 
75 NTAPI
79 {
81 
83 }
84 
85 VOID
86 NTAPI
89 {
91 }
92 
95  PIRP Irp)
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
_In_ ULONG Mode
Definition: hubbusif.h:303
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
NTSTATUS NTAPI AcpiInterfaceClearStatus(PDEVICE_OBJECT Context, PVOID ObjectContext)
Definition: interface.c:66
PGPE_CLEAR_STATUS GpeClearStatus
Definition: iotypes.h:2666
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI AcpiInterfaceDereference(PVOID Context)
Definition: interface.c:15
BOOLEAN(NTAPI * PGPE_SERVICE_ROUTINE)(PVOID, PVOID)
Definition: iotypes.h:2594
ULONG KINTERRUPT_MODE BOOLEAN PGPE_SERVICE_ROUTINE PVOID PVOID * ObjectContext
Definition: iotypes.h:2681
PGPE_DISABLE_EVENT GpeDisableEvent
Definition: iotypes.h:2665
#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:2668
PGPE_DISCONNECT_VECTOR GpeDisconnectVector
Definition: iotypes.h:2663
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG KINTERRUPT_MODE BOOLEAN Shareable
Definition: iotypes.h:2681
unsigned char BOOLEAN
enum _KINTERRUPT_MODE KINTERRUPT_MODE
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:2660
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
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:798
PGPE_ENABLE_EVENT GpeEnableEvent
Definition: iotypes.h:2664
PDEVICE_NOTIFY_CALLBACK2 NotificationHandler
Definition: iotypes.h:2727
PDEVICE_NOTIFY_CALLBACK2 PVOID NotificationContext
Definition: iotypes.h:2727
ACPI_GPE_EVENT_INFO UINT32 GpeNumber
Definition: acevents.h:195
VOID NTAPI AcpiInterfaceReference(PVOID Context)
Definition: interface.c:8
VOID(NTAPI * PDEVICE_NOTIFY_CALLBACK)(PVOID, ULONG)
Definition: iotypes.h:2638
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
PREGISTER_FOR_DEVICE_NOTIFICATIONS RegisterForDeviceNotifications
Definition: iotypes.h:2667
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4157
NTSTATUS Bus_PDO_QueryInterface(PPDO_DEVICE_DATA DeviceData, PIRP Irp)
Definition: interface.c:94
#define DPRINT1
Definition: precomp.h:8
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:115
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: iotypes.h:2661
NTSTATUS NTAPI AcpiInterfaceDisableEvent(PDEVICE_OBJECT Context, PVOID ObjectContext)
Definition: interface.c:56
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
return STATUS_SUCCESS
Definition: btrfs.c:3014
PGPE_CONNECT_VECTOR GpeConnectVector
Definition: iotypes.h:2662
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
_In_ PKSERVICE_ROUTINE ServiceRoutine
Definition: iofuncs.h:798