ReactOS  0.4.15-dev-2972-gda2a567
fxdeviceinitkm.cpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxDeviceInitKm.cpp
8 
9 Abstract:
10  Internals for WDFDEVICE_INIT
11 
12 Author:
13 
14 
15 
16 
17 Environment:
18 
19  Kernel mode only
20 
21 Revision History:
22 
23 --*/
24 
25 #include "coreprivshared.hpp"
26 
27 extern "C" {
28 // #include "FxDeviceInitKm.tmh"
29 }
30 
31 VOID
34  )
35 {
37 
38  //
39  // Remember the parent so we can store it later in WdfDeviceCreate
40  //
41  Pdo.Parent = Parent;
42 
43  //
44  // PDOs *must* have a name. By setting this flag, the driver writer
45  // does not need to know this
46  //
48 
49  //
50  // By default, PDOs are not power pageable b/c they do not know how the
51  // stack above them will work. For a "closed" system where the bus driver
52  // knows the stack be loaded on its PDO, this may not be true and it
53  // can use WdfDeviceInitSetPowerPageable to set it back.
54  //
55  // In all current shipping OS's, if the parent is power pageable, the
56  // child must be power pagable as well.
57  //
58  if (Parent->IsPowerPageableCapable() == FALSE) {
60  }
61 }
62 
63 VOID
66  )
67 {
69 
70  if (IoTypeConfig->ReadWriteIoType == WdfDeviceIoUndefined ||
71  IoTypeConfig->ReadWriteIoType > WdfDeviceIoDirect) {
75  "Out of range Read/Write IoType %d, %!status!",
76  IoTypeConfig->ReadWriteIoType, status);
78  return;
79  }
80 
81  ReadWriteIoType = IoTypeConfig->ReadWriteIoType;
82 
83  return;
84 }
85 
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
LONG NTSTATUS
Definition: precomp.h:26
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:728
#define FALSE
Definition: types.h:117
FxDeviceInitType InitType
#define _In_
Definition: ms_sal.h:308
#define FILE_AUTOGENERATED_DEVICE_NAME
Definition: iotypes.h:138
CfxDevice * Parent
#define TRACINGDEVICE
Definition: dbgtrace.h:58
_In_ PWDFDEVICE_INIT _In_ PWDF_IO_TYPE_CONFIG IoTypeConfig
Definition: wdfdevice.h:4391
PFX_DRIVER_GLOBALS DriverGlobals
VOID SetPdo(__in FxDevice *Parent)
VOID AssignIoType(_In_ PWDF_IO_TYPE_CONFIG IoTypeConfig)
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
BOOLEAN PowerPageable
#define __in
Definition: dbghelp.h:35
static SERVICE_STATUS status
Definition: service.c:31
WDF_DEVICE_IO_TYPE ReadWriteIoType
FxVerifierDbgBreakPoint(pFxDriverGlobals)
Definition: ps.c:97