ReactOS 0.4.17-dev-1281-g065abb3
hubregistry.cpp File Reference
#include "usbhub3.h"
#include "hubregistry.h"
#include <debug.h>
Include dependency graph for hubregistry.cpp:

Go to the source code of this file.

Classes

struct  HubDeviceErrata
 
struct  HubHubErrata
 

Macros

#define NDEBUG
 
#define HUB_D3COLD_RECONNECT_DEFAULT   1000
 
#define KSE_SKIP_MS_OS   0
 
#define KSE_DONT_SKIP_MS_OS   1
 
#define KSE_KEEP_ON_SOFT_REMOVE   3
 
#define KSE_LPM_OFF_FOR_CHAINED_HUBS   16
 
#define KSE_LPM_OFF_DOWNSTREAM   26
 
#define KSE_POLLING_TO_COMPLIANCE   35
 
#define KSE_NO_U2_FOR_TUNNELED_DEVICES   48
 
#define HUB_DUAL_ROLE_MTP   0x00000002
 
#define HUB_DUAL_ROLE_IP_OVER_USB   0x00000004
 
#define HUB_DUAL_ROLE_VIDEO   0x00000008
 
#define HUB_DUAL_ROLE_FUNCTIONS   0x0000000E
 
#define HUB_DUAL_ROLE_UCM_PRESENT   0x80000000
 

Enumerations

enum class  HubErrataGate : UCHAR { None , BehindExternalHub , NotHub }
 

Functions

VOID NTAPI HubFormatIdStrings (_In_ const USB_DEVICE_DESCRIPTOR *Descriptor, _Out_ HubIdStrings *Ids)
 
static VOID NTAPI HubFormatControllerIds (_In_ const UCXHUB_CONTROLLER_INFO_V2 *Info, _Out_ HubIdStrings *Ids)
 
 _IRQL_requires_ (PASSIVE_LEVEL) VOID NTAPI HubReadUsb4HostName(_In_ HubFdo *Hub)
 Usb4HostName overrides the _DSD USB4 host router name of every USB 3 ACPI port. A string from an earlier start is kept since ports still use it.
 
_In_ PCWSTR _In_ ULONG _Out_writes_bytes_ (Size) PVOID Data)
 
return HubRegOpen (NULL, &Name, Access, Key)
 
 if (Status !=STATUS_OBJECT_NAME_NOT_FOUND) return Status
 
return WdfRegistryCreateKey (Parent, Name, CreateAccess, REG_OPTION_NON_VOLATILE, NULL, WDF_NO_OBJECT_ATTRIBUTES, Key)
 
 if (Child->m_Pdo==NULL||Child->m_Pdo->m_Device==NULL) return STATUS_INVALID_DEVICE_STATE
 
return WdfDeviceOpenRegistryKey (Child->m_Pdo->m_Device, PLUGPLAY_REGKEY_DEVICE, Access, WDF_NO_OBJECT_ATTRIBUTES, Key)
 
 if (!NT_SUCCESS(Status)) return Status
 
RtlInitEmptyUnicodeString & Name (Buffer)
 
 if (NT_SUCCESS(Status)) Status
 
 if (HubDriver.KseQueryDeviceFlags==NULL) return 0
 
 if (!NT_SUCCESS(RtlStringCchPrintfW(Key, RTL_NUMBER_OF(Key), L"USB:%ls\\VID_%hs&PID_%hs&REV_%hs", Bus, Ids->Vendor, Ids->Product, Ids->Revision)))
 
HubDriver KseQueryDeviceFlags (Key, L"USB", &Word)
 
 if (!NT_SUCCESS(RtlStringCchPrintfW(Key, RTL_NUMBER_OF(Key), L"USB:%ls\\VID_%hs&PID_%hs", Bus, Ids->Vendor, Ids->Product)))
 
FORCEINLINE BOOLEAN NTAPI HubKseBit (_In_ ULONG64 Flags, _In_ ULONG Bit)
 
static BOOLEAN NTAPI HubIsBrokenVl810 (_In_ const USB_DEVICE_DESCRIPTOR *Descriptor)
 
_In_ WDFKEY _In_ ULONG64 _In_reads_ (Count) const HubDeviceErrata *Table
 
 for (Index=0;Index< Count;Index++)
 
 if (WdfRegistryQueryValue(Key, &Name, 0, NULL, &Size, &Type) !=STATUS_BUFFER_OVERFLOW) return
 
 if (Size==0||(Size &1)||Type !=REG_BINARY) return
 
 if (Filter==NULL) return
 
 if (Child->m_AlternateSettingFilter !=NULL) ExFreePoolWithTag(Child -> m_AlternateSettingFilter, HUB_TAG_DEVICE)
 
 if (!NT_SUCCESS(WdfRegistryQueryValue(Key, &Name, Size, Filter->Entries, NULL, NULL)))
 
RtlInitEmptyUnicodeString & Name (NameBuffer)
 
else if (Status==STATUS_OBJECT_NAME_NOT_FOUND)
 
 if (HubIsBrokenVl810(&Child->m_DeviceDescriptor)) Child -> m_Hacks|=(ULONG) ChildHack::NonFunctional
 
 HubReadAlternateSettingFilter (Child, Key)
 
 WdfRegistryClose (Root)
 
 if (Descriptor->bcdUSB==0||Descriptor->bcdUSB >=0x0300) Version
 
else if (Descriptor->bcdUSB<=0x0200) Version
 
 if (HubKseBit(Kse, KSE_LPM_OFF_DOWNSTREAM))
 
 if (Hub->IsRootHub() &&HubKseBit(Kse, KSE_LPM_OFF_FOR_CHAINED_HUBS)) Hub -> m_ParentInfo.Flags|=HUB_PARENT_DISABLE_LPM
 
 HubApplyHubErrata (Hub, Key, Kse, HubHubErrataSecond, RTL_NUMBER_OF(HubHubErrataSecond))
 
Hub SetFlag (HubFlag::DisableOnSoftRemove)
 
 if (HubKseBit(Kse, KSE_KEEP_ON_SOFT_REMOVE)) Hub -> ClearFlag(HubFlag::DisableOnSoftRemove)
 
 if (HubKseBit(Kse, KSE_POLLING_TO_COMPLIANCE)) Hub -> SetFlag(HubFlag::PollingToComplianceOnStart)
 
 if (HubKseBit(Kse, KSE_NO_U2_FOR_TUNNELED_DEVICES)) Hub -> m_TunneledDevicesSkipU2=TRUE
 
 if (HubIsBrokenVl810(&Hub->m_ParentInfo.DeviceDescriptor)) Hub -> SetFlag(HubFlag::DisableSuperSpeed)
 
 if (Hub->HasFlag(HubFlag::DisableSuperSpeed)) HubSubmitLiveDump(Hub -> m_Device, HUB_LIVEDUMP_SUPERSPEED_DISABLED, 0)
 
static VOID NTAPI HubEvtOverCurrentWorkItem (_In_ WDFWORKITEM WorkItem)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) VOID NTAPI HubNoteHubOverCurrent(_In_ HubFdo *Hub)
 
_In_ PCWSTR _In_reads_bytes_ (Size) PVOID Data
 
 WdfRegistryClose (Key)
 
_In_ PCUNICODE_STRING _In_ ULONG _In_ ULONG _In_reads_bytes_ (Length) PVOID Data)
 
 HubWriteDeviceValue (Child, &ValueName, REG_DWORD, sizeof(Value), &Value)
 
 WdfStringGetUnicodeString (String, &Text)
 
 if (Child->m_FriendlyName !=NULL)
 
 if (Text.Length==0) return STATUS_SUCCESS
 
 if (Copy==NULL)
 
 RtlCopyMemory (Copy, Text.Buffer, Text.Length)
 
 _Out_writes_ (Count) PWCHAR Buffer
 
return RtlUnicodeStringPrintf (Name, L"uxd_port_%03u", PortNumber)
 
 RtlInitEmptyUnicodeString (Name, Buffer,(USHORT)(Count *sizeof(WCHAR)))
 
return RtlUnicodeStringPrintf (Name, L"%04X%04X%04X", Descriptor->idVendor, Descriptor->idProduct, Descriptor->bcdDevice)
 
return WdfRegistryQueryValue (Key, Name, sizeof(*Record), Record, NULL, NULL)
 
 RtlZeroMemory (Record, sizeof(*Record))
 
 WdfRegistryClose (HubKey)
 
 PAGED_CODE ()
 
 if (UpdateRequired !=NULL) *UpdateRequired
 
Child ClearProperty (ChildProperty::UxdReserved)
 
 if (!NT_SUCCESS(HubReadUxdPolicy())) return STATUS_SUCCESS
 
 if (!HubDriver.HasFlag(HubGlobal::UxdEnable)||HubDriver.HasFlag(HubGlobal::DisableUxdSupport)) return STATUS_SUCCESS
 
 if (!Found) Found
 
 if (Found)
 
 HubReadUxdPolicy ()
 
 if (Event==HubUxdEvent::Disable) Delete = Child->m_Uxd.DeleteOnDisconnect != 0 || HubDriver.HasFlag(HubGlobal::UxdDeleteOnDisconnect)
 
 DPRINT ("Device %p UXD records deleted on event %d\n", Child,(int) Event)
 
 if (NT_SUCCESS(HubOpenHubKey(Child->m_Hub, KEY_ALL_ACCESS, &HubKey)))
 
 if (NT_SUCCESS(HubRegOpenPath(HubUxdDevicesPath, KEY_READ|KEY_SET_VALUE, &Key)))
 
static VOID NTAPI HubEvtSelectiveSuspendWorkItem (_In_ WDFWORKITEM WorkItem)
 
InitializeObjectAttributes & Attributes (PUNICODE_STRING) Path, OBJ_CASE_INSENSITIVE|OBJ_KERNEL_HANDLE, NULL, NULL
 
return ZwOpenKey (Handle, KEY_READ, &Attributes)
 
 ZwClose (Handle)
 
 if (!NT_SUCCESS(Status)||Data.Info.DataLength !=sizeof(ULONG)) return STATUS_UNSUCCESSFUL
 
 RtlCopyMemory (Value, Data.Info.Data, sizeof(ULONG))
 
 if (!NT_SUCCESS(HubZwOpenKey(Path, &Handle))) return NULL
 
 if ((Status==STATUS_BUFFER_TOO_SMALL||Status==STATUS_BUFFER_OVERFLOW) &&Size !=0)
 
static ULONG NTAPI HubBoundedLength (_In_reads_(Limit) PCWSTR Text, _In_ ULONG Limit)
 
VOID NTAPI HubReleaseRegistryState (_In_ HubChild *Child)
 

Variables

static const WCHAR HubUsbflagsPath []
 
static const WCHAR HubVerifierPath []
 
static const WCHAR HubUxdDevicesPath []
 
static const WCHAR HubUxdPnpPath []
 
static const WCHAR HubGlobalCeipPath []
 
static const WCHAR HubUsbControlPath []
 
static const WCHAR HubUsbFnPath []
 
static const WCHAR HubUsbFnDefaultPath []
 
static const WCHAR HubUsbFnConfigPath []
 
static const WCHAR HubD3ColdSubkey [] = L"e5b3b5ac-9725-4f78-963f-03dfb1d828c7"
 
_In_ PCWSTR Name
 
_In_ PCWSTR _In_ ULONG Size = 0
 
_In_ PCWSTR _Out_ PULONG Value = 0
 
_In_ PCWSTR _Out_ PULONG _Out_ PBOOLEAN Present = NT_SUCCESS(*Status)
 
_In_ PCWSTR _Out_ PULONG _Out_ PBOOLEAN _Inout_ NTSTATUS * Status
 
if Status return TRUE
 
_In_ PCUNICODE_STRING _In_ ACCESS_MASK Access
 
_In_ PCUNICODE_STRING _In_ ACCESS_MASK _Out_ WDFKEY * Key
 
_In_ PCUNICODE_STRING _In_ ACCESS_MASK OpenAccess
 
_In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ACCESS_MASK CreateAccess
 
_In_ ACCESS_MASK _Out_ WDFKEY * RootKey = NULL
 
_In_ ACCESS_MASK _Out_ WDFKEY _Out_ WDFKEY * DeviceKey
 
WDFKEY Root
 
return STATUS_SUCCESS
 
_In_ BOOLEAN RootHub
 
ULONG64 Flags = 0
 
ULONG64 Word = 0
 
static const HubDeviceErrata HubDeviceErrataBeforeSoftRemove []
 
static const HubDeviceErrata HubDeviceErrataAfterSoftRemove []
 
_In_ WDFKEY _In_ ULONG64 Kse = HubQueryKseDeviceFlags(Ids, FALSE)
 
_In_ WDFKEY _In_ ULONG64 _In_ ULONG Count
 
BOOLEAN Apply
 
HubAltSettingFilter * Filter
 
ULONG Type = REG_NONE
 
Child m_AlternateSettingFilter = Filter
 
_In_ const HubIdStrings * Ids
 
HubMsOs20SetInfo SetInfo
 
 else
 
Child m_Hacks = (ULONG)ChildHack::DisableOnSoftRemove
 
Done __pad0__
 
_In_ const HubIdStrings _In_ PCWSTR ValueName
 
WCHAR Buffer [48]
 
UNICODE_STRING Path
 
ULONG Try
 
else Version = L"usb2X"
 
static const HubHubErrata HubHubErrataFirst []
 
static const HubHubErrata HubHubErrataSecond []
 
Done __pad1__
 
HubFormatIdStrings & Child
 
_In_ PCUNICODE_STRING _In_ ULONG _In_ ULONG Length
 
_In_ WDFKEY _In_ WDFSTRING String
 
_In_ WDFKEY _In_ WDFSTRING _Out_ PBOOLEAN Stop
 
UNICODE_STRING Text
 
PWCHAR Copy = (PWCHAR)ExAllocatePoolWithTag(NonPagedPool, Text.Length, HUB_TAG_DEVICE)
 
Child m_FriendlyName = Copy
 
Child m_FriendlyNameLength = Text.Length
 
_In_ PCUNICODE_STRING _Out_ HubUxdSettings * Record
 
_In_ USHORT PortNumber
 
WDFKEY HubKey
 
WDFKEY UxdKey
 
_In_ HubChild _Out_opt_ PBOOLEAN UpdateRequired
 
HubUxdSettings Current
 
BOOLEAN Found = NT_SUCCESS(HubReadUxdPortRecord(Hub, Child->m_Port->Number(), &Current))
 
 Previous = Child->m_Uxd
 
Child m_Uxd = Current
 
_In_ HubUxdEvent Event
 
BOOLEAN Delete = FALSE
 
RtlFreeUnicodeString & GuidText
 
_Out_ PHANDLE Handle
 
UNICODE_STRING KeyPath
 
ULONG Returned
 
return Info
 

Macro Definition Documentation

◆ HUB_D3COLD_RECONNECT_DEFAULT

#define HUB_D3COLD_RECONNECT_DEFAULT   1000

Definition at line 37 of file hubregistry.cpp.

◆ HUB_DUAL_ROLE_FUNCTIONS

#define HUB_DUAL_ROLE_FUNCTIONS   0x0000000E

Definition at line 52 of file hubregistry.cpp.

◆ HUB_DUAL_ROLE_IP_OVER_USB

#define HUB_DUAL_ROLE_IP_OVER_USB   0x00000004

Definition at line 50 of file hubregistry.cpp.

◆ HUB_DUAL_ROLE_MTP

#define HUB_DUAL_ROLE_MTP   0x00000002

Definition at line 49 of file hubregistry.cpp.

◆ HUB_DUAL_ROLE_UCM_PRESENT

#define HUB_DUAL_ROLE_UCM_PRESENT   0x80000000

Definition at line 53 of file hubregistry.cpp.

◆ HUB_DUAL_ROLE_VIDEO

#define HUB_DUAL_ROLE_VIDEO   0x00000008

Definition at line 51 of file hubregistry.cpp.

◆ KSE_DONT_SKIP_MS_OS

#define KSE_DONT_SKIP_MS_OS   1

Definition at line 41 of file hubregistry.cpp.

◆ KSE_KEEP_ON_SOFT_REMOVE

#define KSE_KEEP_ON_SOFT_REMOVE   3

Definition at line 42 of file hubregistry.cpp.

◆ KSE_LPM_OFF_DOWNSTREAM

#define KSE_LPM_OFF_DOWNSTREAM   26

Definition at line 44 of file hubregistry.cpp.

◆ KSE_LPM_OFF_FOR_CHAINED_HUBS

#define KSE_LPM_OFF_FOR_CHAINED_HUBS   16

Definition at line 43 of file hubregistry.cpp.

◆ KSE_NO_U2_FOR_TUNNELED_DEVICES

#define KSE_NO_U2_FOR_TUNNELED_DEVICES   48

Definition at line 46 of file hubregistry.cpp.

◆ KSE_POLLING_TO_COMPLIANCE

#define KSE_POLLING_TO_COMPLIANCE   35

Definition at line 45 of file hubregistry.cpp.

◆ KSE_SKIP_MS_OS

#define KSE_SKIP_MS_OS   0

Definition at line 40 of file hubregistry.cpp.

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file hubregistry.cpp.

Enumeration Type Documentation

◆ HubErrataGate

Enumerator
None 
BehindExternalHub 
NotHub 

Definition at line 331 of file hubregistry.cpp.

Function Documentation

◆ _In_reads_()

_In_ WDFKEY _In_ ULONG64 _In_reads_ ( Count  ) const

◆ _In_reads_bytes_() [1/2]

_In_ PCUNICODE_STRING _In_ ULONG _In_ ULONG _In_reads_bytes_ ( Length  )

Definition at line 1072 of file hubregistry.cpp.

1073{
1074 WDFKEY Key;
1076
1077 Status = HubOpenDeviceKey(Child, KEY_WRITE, &Key);
1078 if (!NT_SUCCESS(Status))
1079 {
1080 DPRINT1("Device %p value %wZ: hardware key not opened 0x%lx\n", Child, Name, Status);
1081 return Status;
1082 }
1083
1084 Status = WdfRegistryAssignValue(Key, Name, Type, Length, Data);
1085 if (!NT_SUCCESS(Status))
1086 DPRINT1("Device %p value %wZ not written 0x%lx\n", Child, Name, Status);
1087
1089 return Status;
1090}
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
Status
Definition: gdiplustypes.h:24
_In_ PCWSTR _Out_ PULONG _Out_ PBOOLEAN _Inout_ NTSTATUS * Status
WdfRegistryClose(Root)
_In_ PCWSTR Name
_In_ PCUNICODE_STRING _In_ ACCESS_MASK _Out_ WDFKEY * Key
#define KEY_WRITE
Definition: nt_native.h:1034
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFDEVICE Child
Definition: wdffdo.h:536

◆ _In_reads_bytes_() [2/2]

_In_ PCWSTR _In_reads_bytes_ ( Size  )

◆ _IRQL_requires_()

_IRQL_requires_ ( PASSIVE_LEVEL  )

Usb4HostName overrides the _DSD USB4 host router name of every USB 3 ACPI port. A string from an earlier start is kept since ports still use it.

Sends a synchronous IOCTL to the specified device object.

Reads one value of a walk. A missing value only clears Present; FALSE means stop.

Definition at line 845 of file hubregistry.cpp.

850{
851 WDFKEY Key;
852 ULONG Value;
855
856 PAGED_CODE();
857
858 Status = HubOpenHubKey(Hub, KEY_READ, &Key);
859 if (!NT_SUCCESS(Status))
860 {
861 DPRINT1("Hub %p hardware key could not be opened 0x%lx\n", Hub, Status);
862 return;
863 }
864
865 if (!HubRegWalkDword(Key, L"WakeSystemOnConnect", &Value, &Present, &Status))
866 goto Done;
867 if (Present && Value != 0)
869
870 /* Lifetime count survives devnode restarts; it is a 16 bit count */
871 if (!HubRegWalkDword(Key, L"HardResetCount", &Value, &Present, &Status))
872 goto Done;
873 if (Present)
875
876 if (!HubRegWalkDword(Key, L"OvercurrentDetected", &Value, &Present, &Status))
877 goto Done;
878 if (Present)
879 {
880 if (Value & 1)
882 else
884 }
885
886 /* 1 asks for the USB4 router DROM read; a missing value leaves the last one */
887 if (!HubRegWalkDword(Key, L"HubFWUpdateProtocol", &Value, &Present, &Status))
888 goto Done;
889 if (Present)
891
892Done:
894 DPRINT1("Hub %p hardware key read failed 0x%lx\n", Hub, Status);
895
897}
unsigned char BOOLEAN
Definition: actypes.h:127
HubFdo * Hub
Definition: bootdev.cpp:261
VOID ClearFlag(_In_ HubFlag Flag)
Definition: fdo.h:167
VOID SetFlag(_In_ HubFlag Flag)
Definition: fdo.h:160
ULONG m_LifetimeRecoveryCount
Definition: fdo.h:436
ULONG m_FwUpdateProtocol
Definition: fdo.h:453
KEVENT Done
Definition: devreq.cpp:1162
#define L(x)
Definition: resources.c:13
PAGED_CODE()
_In_ PCWSTR _Out_ PULONG Value
_In_ PCWSTR _Out_ PULONG _Out_ PBOOLEAN Present
#define KEY_READ
Definition: nt_native.h:1026
unsigned short USHORT
Definition: pedump.c:61
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
@ OverCurrentDetected
@ WakeOnConnect
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413

◆ _IRQL_requires_max_()

_IRQL_requires_max_ ( DISPATCH_LEVEL  )

IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION; the idle machine owns the IRP afterwards.

Definition at line 982 of file hubregistry.cpp.

987{
990 WDFWORKITEM WorkItem;
992
994 return;
995
997 Config.AutomaticSerialization = TRUE;
998
1000 Attributes.ParentObject = Hub->m_Device;
1001
1002 Status = WdfWorkItemCreate(&Config, &Attributes, &WorkItem);
1003 if (!NT_SUCCESS(Status))
1004 {
1005 DPRINT1("Over current work item failed 0x%lx\n", Status);
1006 return;
1007 }
1008
1010}
WDFDEVICE m_Device
Definition: fdo.h:349
volatile LONG m_Flags
Definition: fdo.h:352
_In_ ULONG Attributes
Definition: dispmprt.h:1077
if Status return TRUE
static VOID NTAPI HubEvtOverCurrentWorkItem(_In_ WDFWORKITEM WorkItem)
WdfWorkItemEnqueue(WorkItem)
_In_opt_ PVOID _In_ PUCXHUB_WORKITEM WorkItem
Definition: hubucx.h:227
#define InterlockedOr
Definition: interlocked.h:239
long LONG
Definition: pedump.c:60
_Must_inspect_result_ _In_ WDFDEVICE _In_ PUCX_CONTROLLER_CONFIG Config
FORCEINLINE VOID WDF_OBJECT_ATTRIBUTES_INIT(_Out_ PWDF_OBJECT_ATTRIBUTES Attributes)
Definition: wdfobject.h:147
FORCEINLINE VOID WDF_WORKITEM_CONFIG_INIT(_Out_ PWDF_WORKITEM_CONFIG Config, _In_ PFN_WDF_WORKITEM EvtWorkItemFunc)
Definition: wdfworkitem.h:85

◆ _Out_writes_()

_Out_writes_ ( Count  )

◆ _Out_writes_bytes_()

_In_ PCWSTR _In_ ULONG _Out_writes_bytes_ ( Size  )

Definition at line 108 of file hubregistry.cpp.

109{
111
114
116}
#define NULL
Definition: types.h:112
_In_ const HubIdStrings _In_ PCWSTR ValueName
return WdfRegistryQueryValue(Key, Name, sizeof(*Record), Record, NULL, NULL)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243

◆ Attributes()

◆ ClearProperty()

Child ClearProperty ( ChildProperty::UxdReserved  )

◆ DPRINT()

DPRINT ( "Device %p UXD records deleted on event %d\n"  ,
Child  ,
(int)  Event 
)

◆ for()

for ( )

Definition at line 393 of file hubregistry.cpp.

394 {
395 const HubDeviceErrata* Entry = &Table[Index];
396
397 Apply = HubKseBit(Kse, Entry->KseBit);
398
399 if (Entry->Value != NULL)
400 {
401 Status = HubRegReadValue(Key, Entry->Value, sizeof(Value), &Value);
402 if (NT_SUCCESS(Status))
403 Apply = (Value != 0);
405 return Status;
406 }
407 else if (Entry->Gate == HubErrataGate::BehindExternalHub)
408 {
409 Apply = Apply && !Child->m_Hub->IsRootHub();
410 }
411 else if (Entry->Gate == HubErrataGate::NotHub)
412 {
413 Apply = Apply && !Child->HasProperty(ChildProperty::IsHub);
414 }
415
416 if (Apply)
417 Child->m_Hacks |= (ULONG)Entry->Hack;
418 }
PLIST_ENTRY Entry
Definition: devhcd.cpp:1262
ASMGENDATA Table[]
Definition: genincdata.c:61
BOOLEAN Apply
_In_ WDFKEY _In_ ULONG64 Kse
FORCEINLINE BOOLEAN NTAPI HubKseBit(_In_ ULONG64 Flags, _In_ ULONG Bit)
_In_ WDFCOLLECTION _In_ ULONG Index

◆ HubApplyHubErrata()

HubApplyHubErrata ( Hub  ,
Key  ,
Kse  ,
HubHubErrataSecond  ,
RTL_NUMBER_OF(HubHubErrataSecond)   
)

◆ HubBoundedLength()

static ULONG NTAPI HubBoundedLength ( _In_reads_(Limit) PCWSTR  Text,
_In_ ULONG  Limit 
)
static

Definition at line 1972 of file hubregistry.cpp.

1975{
1976 ULONG Length = 0;
1977
1978 while (Length < Limit && Text[Length] != UNICODE_NULL)
1979 Length++;
1980
1981 return Length;
1982}
PUCHAR Limit
Definition: desccheck.cpp:2230
UNICODE_STRING Text
_In_ PCUNICODE_STRING _In_ ULONG _In_ ULONG Length
#define UNICODE_NULL

◆ HubEvtOverCurrentWorkItem()

static VOID NTAPI HubEvtOverCurrentWorkItem ( _In_ WDFWORKITEM  WorkItem)
static

Definition at line 954 of file hubregistry.cpp.

956{
957 DECLARE_CONST_UNICODE_STRING(Name, L"OvercurrentDetected");
958 HubFdo* Hub = HubFdo::FromDevice((WDFDEVICE)WdfWorkItemGetParentObject(WorkItem));
959 ULONG Value;
960 WDFKEY Key;
962
964
965 Status = HubOpenHubKey(Hub, KEY_SET_VALUE, &Key);
966 if (NT_SUCCESS(Status))
967 {
968 Status = WdfRegistryAssignValue(Key, &Name, REG_DWORD, sizeof(Value), &Value);
970 }
971
972 if (!NT_SUCCESS(Status))
973 DPRINT1("Hub %p over current record not written 0x%lx\n", Hub, Status);
974
976}
Definition: fdo.h:132
BOOLEAN HasFlag(_In_ HubFlag Flag) const
Definition: fdo.h:153
static HubFdo * FromDevice(_In_ WDFDEVICE Device)
Definition: fdo.cpp:37
#define KEY_SET_VALUE
Definition: nt_native.h:1020
#define REG_DWORD
Definition: sdbapi.c:615
WdfObjectDelete(String)
#define DECLARE_CONST_UNICODE_STRING(_variablename, _string)
Definition: wdfcore.h:161

Referenced by _IRQL_requires_max_().

◆ HubEvtSelectiveSuspendWorkItem()

static VOID NTAPI HubEvtSelectiveSuspendWorkItem ( _In_ WDFWORKITEM  WorkItem)
static

Definition at line 1783 of file hubregistry.cpp.

1785{
1786 HubPdo* Pdo = HubPdo::FromDevice((WDFDEVICE)WdfWorkItemGetParentObject(WorkItem));
1787 HubChild* Child = Pdo->m_Child;
1788
1789 /* The work item is left to its parent here */
1790 if (Child == NULL)
1791 {
1792 DPRINT("PDO %p lost its device before the selective suspend record\n", Pdo);
1793 return;
1794 }
1795
1796 HubWriteDeviceDword(Child,
1797 L"DeviceSelectiveSuspended",
1798 Child->HasProperty(ChildProperty::SupportsSelectiveSuspend) ? 1 : 0);
1799
1801}
static HubPdo * FromDevice(_In_ WDFDEVICE Device)
Definition: childpdo.cpp:180
@ SupportsSelectiveSuspend
_In_ UCXUSBDEVICE _In_ PDEVICE_OBJECT Pdo
Definition: hubucx.h:280
#define DPRINT
Definition: sndvol32.h:73

◆ HubFormatControllerIds()

static VOID NTAPI HubFormatControllerIds ( _In_ const UCXHUB_CONTROLLER_INFO_V2 *  Info,
_Out_ HubIdStrings *  Ids 
)
static

Definition at line 72 of file hubregistry.cpp.

75{
76 switch (Info->Type)
77 {
79 RtlStringCbPrintfA(Ids->Vendor, sizeof(Ids->Vendor), "%04X", Info->Pci.VendorId);
80 RtlStringCbPrintfA(Ids->Product, sizeof(Ids->Product), "%04X", Info->Pci.DeviceId);
81 RtlStringCbPrintfA(Ids->Revision, sizeof(Ids->Revision), "%04X", Info->Pci.RevisionId);
82 break;
83
85 RtlCopyMemory(Ids->Vendor, Info->Acpi.VendorId, sizeof(Ids->Vendor));
86 RtlCopyMemory(Ids->Product, Info->Acpi.DeviceId, sizeof(Ids->Product));
87 RtlCopyMemory(Ids->Revision, Info->Acpi.RevisionId, sizeof(Ids->Revision));
88 Ids->Vendor[sizeof(Ids->Vendor) - 1] = ANSI_NULL;
89 Ids->Product[sizeof(Ids->Product) - 1] = ANSI_NULL;
90 Ids->Revision[sizeof(Ids->Revision) - 1] = ANSI_NULL;
91 break;
92
93 default:
94 RtlStringCbPrintfA(Ids->Vendor, sizeof(Ids->Vendor), "%04X", MAXLONG);
95 RtlStringCbPrintfA(Ids->Product, sizeof(Ids->Product), "%04X", MAXLONG);
96 RtlStringCbPrintfA(Ids->Revision, sizeof(Ids->Revision), "%04X", 0);
97 break;
98 }
99}
_In_ const HubIdStrings * Ids
#define ANSI_NULL
NTSTRSAFEVAPI RtlStringCbPrintfA(_Out_writes_bytes_(cbDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cbDest, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
Definition: ntstrsafe.h:1148
CHAR Revision[MAX_REVISION_ID_STRING_LENGTH]
Definition: hubregistry.h:18
CHAR Vendor[MAX_VENDOR_ID_STRING_LENGTH]
Definition: hubregistry.h:16
CHAR Product[MAX_DEVICE_ID_STRING_LENGTH]
Definition: hubregistry.h:17
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
@ UcxControllerParentBusTypePci
Definition: ucxcontroller.h:17
@ UcxControllerParentBusTypeAcpi
Definition: ucxcontroller.h:18
#define MAXLONG
Definition: umtypes.h:116
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690

Referenced by HubMachine::QueryErrataFlags().

◆ HubFormatIdStrings()

VOID NTAPI HubFormatIdStrings ( _In_ const USB_DEVICE_DESCRIPTOR *  Descriptor,
_Out_ HubIdStrings *  Ids 
)

Definition at line 59 of file hubregistry.cpp.

62{
63 RtlStringCbPrintfA(Ids->Vendor, sizeof(Ids->Vendor), "%04X", Descriptor->idVendor);
64 RtlStringCbPrintfA(Ids->Product, sizeof(Ids->Product), "%04X", Descriptor->idProduct);
65 RtlStringCbPrintfA(Ids->Revision, sizeof(Ids->Revision), "%04X", Descriptor->bcdDevice);
66}
_Must_inspect_result_ _In_ WDFIORESLIST _In_ PIO_RESOURCE_DESCRIPTOR Descriptor
Definition: wdfresource.h:342

Referenced by HubMachine::QueryErrataFlags(), and DeviceMachine::QueryRegistryValues().

◆ HubIsBrokenVl810()

static BOOLEAN NTAPI HubIsBrokenVl810 ( _In_ const USB_DEVICE_DESCRIPTOR *  Descriptor)
static

Definition at line 320 of file hubregistry.cpp.

322{
323 return Descriptor->idVendor == 0x2109 &&
324 Descriptor->idProduct == 0x0810 &&
325 (UCHAR)Descriptor->bcdDevice < 0x89;
326}
unsigned char UCHAR
Definition: typedefs.h:53

◆ HubKseBit()

FORCEINLINE BOOLEAN NTAPI HubKseBit ( _In_ ULONG64  Flags,
_In_ ULONG  Bit 
)

Definition at line 309 of file hubregistry.cpp.

312{
313 return (Flags & (1ULL << Bit)) != 0;
314}
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
Definition: dispmprt.h:245

Referenced by for(), and if().

◆ HubReadAlternateSettingFilter()

HubReadAlternateSettingFilter ( Child  ,
Key   
)

◆ HubReadUxdPolicy()

HubReadUxdPolicy ( )

◆ HubRegOpen()

return HubRegOpen ( NULL  ,
&  Name,
Access  ,
Key   
)

Referenced by if().

◆ HubReleaseRegistryState()

VOID NTAPI HubReleaseRegistryState ( _In_ HubChild *  Child)

Frees the buffers the registry and MS OS code keep in the device. Call at destroy.

Definition at line 2115 of file hubregistry.cpp.

2117{
2118 if (Child->m_FriendlyName != NULL)
2119 {
2120 ExFreePoolWithTag(Child->m_FriendlyName, HUB_TAG_DEVICE);
2121 Child->m_FriendlyName = NULL;
2122 Child->m_FriendlyNameLength = 0;
2123 }
2124
2125 if (Child->m_MsOs20Set != NULL)
2126 {
2127 ExFreePoolWithTag(Child->m_MsOs20Set, HUB_TAG_DEVICE);
2128 Child->m_MsOs20Set = NULL;
2129 }
2130
2131 if (Child->m_ExtProperties != NULL)
2132 {
2133 ExFreePoolWithTag(Child->m_ExtProperties, HUB_TAG_DEVICE);
2134 Child->m_ExtProperties = NULL;
2135 }
2136}
#define HUB_TAG_DEVICE
Definition: hubutil.h:13
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109

◆ HubWriteDeviceValue()

HubWriteDeviceValue ( Child  ,
&  ValueName,
REG_DWORD  ,
sizeof(Value)  ,
&  Value 
)

◆ if() [1/37]

if ( !  Found)

Definition at line 2998 of file btrfs.c.

2998 {
2999 ERR("out of memory\n");
3001 }
#define ERR(fmt,...)
Definition: precomp.h:57
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158

◆ if() [2/37]

if ( !HubDriver.  HasFlagHubGlobal::UxdEnable)||HubDriver.HasFlag(HubGlobal::DisableUxdSupport)

◆ if() [3/37]

if ( !  NT_SUCCESSHubReadUxdPolicy())

◆ if() [4/37]

if ( !  NT_SUCCESSHubZwOpenKey(Path, &Handle))

◆ if() [5/37]

if ( !  NT_SUCCESSRtlStringCchPrintfW(Key, RTL_NUMBER_OF(Key), L"USB:%ls\\VID_%hs&PID_%hs", Bus, Ids->Vendor, Ids->Product))

Definition at line 291 of file hubregistry.cpp.

293 :%ls\\VID_%hs&PID_%hs",
294 Bus,
295 Ids->Vendor,
296 Ids->Product)))
297 {
298 return Flags;
299 }
void ls(int argc, const char *argv[])
Definition: cmds.c:1136

◆ if() [6/37]

if ( !  NT_SUCCESSRtlStringCchPrintfW(Key, RTL_NUMBER_OF(Key), L"USB:%ls\\VID_%hs&PID_%hs&REV_%hs", Bus, Ids->Vendor, Ids->Product, Ids->Revision))

Definition at line 276 of file hubregistry.cpp.

278 :%ls\\VID_%hs&PID_%hs&REV_%hs",
279 Bus,
280 Ids->Vendor,
281 Ids->Product,
282 Ids->Revision)))
283 {
284 return 0;
285 }

◆ if() [7/37]

if ( !  NT_SUCCESSStatus)

Definition at line 245 of file hubregistry.cpp.

246 {
248 *DeviceKey = NULL;
249 return Status;
250 }
WDFKEY Root
_In_ ACCESS_MASK _Out_ WDFKEY _Out_ WDFKEY * DeviceKey

◆ if() [8/37]

◆ if() [9/37]

if ( !  NT_SUCCESSWdfRegistryQueryValue(Key, &Name, Size, Filter->Entries, NULL, NULL))

Definition at line 453 of file hubregistry.cpp.

454 {
456 Child->m_AlternateSettingFilter = NULL;
457 return;
458 }
HubAltSettingFilter * Filter

◆ if() [10/37]

Definition at line 1953 of file hubregistry.cpp.

1954 {
1956 if (Info != NULL &&
1958 {
1960 Info = NULL;
1961 }
1962 }
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PagedPool
Definition: env_spec_w32.h:308
_Out_ PHANDLE Handle
@ KeyValuePartialInformation
Definition: nt_native.h:1185
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION

◆ if() [11/37]

◆ if() [12/37]

if ( Child->m_FriendlyName !  = NULL)

Definition at line 1184 of file hubregistry.cpp.

1185 {
1186 ExFreePoolWithTag(Child->m_FriendlyName, HUB_TAG_DEVICE);
1187 Child->m_FriendlyName = NULL;
1188 Child->m_FriendlyNameLength = 0;
1189 }

◆ if() [13/37]

if ( Child->  m_Pdo = =NULL||Child->m_Pdo->m_Device==NULL)

Definition at line 1014 of file hubid.cpp.

1015 {
1016 if (Language == HUB_DEFAULT_LANGUAGE)
1017 {
1018 DPRINT("Device %p has no product string\n", Child);
1019 return STATUS_NOT_SUPPORTED;
1020 }
1021
1022 Child->m_LanguageId = HUB_DEFAULT_LANGUAGE;
1023 HubIdReadProductString(Child);
1024
1025 if (Child->m_ProductString == NULL)
1026 {
1027 DPRINT("Device %p has no product string\n", Child);
1028 return STATUS_NOT_SUPPORTED;
1029 }
1030 }
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
#define HUB_DEFAULT_LANGUAGE
Definition: hubid.cpp:23

◆ if() [14/37]

if ( Copy  = = NULL)

Definition at line 1195 of file hubregistry.cpp.

1196 {
1197 /* The remaining reads are skipped, yet the caller sees success */
1198 DPRINT1("Device %p friendly name could not be allocated\n", Child);
1199 *Stop = TRUE;
1200 return STATUS_SUCCESS;
1201 }
return STATUS_SUCCESS
_In_opt_ PVOID _Out_ BOOLEAN * Stop
Definition: ldrtypes.h:258

◆ if() [15/37]

else if ( Descriptor->bcdUSB<=  0x0200)

◆ if() [16/37]

if ( Descriptor->  bcdUSB = =0||Descriptor->bcdUSB >=0x0300)

◆ if() [17/37]

else if ( Event  = =HubUxdEvent::Disable) = Child->m_Uxd.DeleteOnDisconnect != 0 || HubDriver.HasFlag(HubGlobal::UxdDeleteOnDisconnect)

◆ if() [18/37]

if ( Filter  = = NULL)

Definition at line 728 of file ws2tcpip.h.

728 {
730 return SOCKET_ERROR;
731 }
VOID WSAAPI WSASetLastError(IN INT iError)
Definition: dllmain.c:142
#define WSAENOBUFS
Definition: winerror.h:2871
#define SOCKET_ERROR
Definition: winsock.h:327

◆ if() [19/37]

if ( Found  )

Definition at line 1484 of file hubregistry.cpp.

1485 {
1486 DPRINT("Device %p on port %u is reserved for a virtual machine\n", Child, Child->m_Port->Number());
1487 Child->SetProperty(ChildProperty::UxdReserved);
1489 }

◆ if() [20/37]

if ( Hub->  HasFlagHubFlag::DisableSuperSpeed) -> m_Device, HUB_LIVEDUMP_SUPERSPEED_DISABLED, 0)

◆ if() [21/37]

if ( Hub->  IsRootHub) &&HubKseBit(Kse, KSE_LPM_OFF_FOR_CHAINED_HUBS) -> m_ParentInfo.Flags|=HUB_PARENT_DISABLE_LPM

◆ if() [22/37]

if ( HubDriver.  KseQueryDeviceFlags = =NULL)

◆ if() [23/37]

if ( HubIsBrokenVl810 &->  m_DeviceDescriptor) -> m_Hacks|=(ULONG) ChildHack::NonFunctional

◆ if() [24/37]

if ( HubIsBrokenVl810 &->.  DeviceDescriptor) -> SetFlag(HubFlag::DisableSuperSpeed)

◆ if() [25/37]

◆ if() [26/37]

Definition at line 790 of file hubregistry.cpp.

791 {
794 }
HubParentInfo m_ParentInfo
Definition: fdo.h:360
ULONG Flags
Definition: fdo.h:100
int32_t * PLONG
Definition: typedefs.h:58
#define HUB_PARENT_DISABLE_LPM
Definition: fdo.h:106

◆ if() [27/37]

if ( HubKseBit(Kse, KSE_NO_U2_FOR_TUNNELED_DEVICES)  ) -> m_TunneledDevicesSkipU2=TRUE

◆ if() [28/37]

◆ if() [29/37]

if ( NT_SUCCESS(HubOpenHubKey(Child->m_Hub, KEY_ALL_ACCESS, &HubKey))  )

Definition at line 1539 of file hubregistry.cpp.

1540 {
1541 Status = HubRegOpen(HubKey, &UxdName, KEY_ALL_ACCESS, &Key);
1543 {
1546 }
1547 else if (NT_SUCCESS(Status))
1548 {
1549 if (NT_SUCCESS(HubFormatUxdPortName(Child->m_Port->Number(), Buffer, RTL_NUMBER_OF(Buffer), &Name)))
1550 WdfRegistryRemoveValue(Key, &Name);
1552 }
1553
1555 }
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
Definition: bufpool.h:45
return HubRegOpen(NULL, &Name, Access, Key)
WDFKEY HubKey
return WdfRegistryCreateKey(Parent, Name, CreateAccess, REG_OPTION_NON_VOLATILE, NULL, WDF_NO_OBJECT_ATTRIBUTES, Key)
#define KEY_ALL_ACCESS
Definition: nt_native.h:1044
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1060
#define WDF_NO_OBJECT_ATTRIBUTES
Definition: wdftypes.h:105

◆ if() [30/37]

if ( NT_SUCCESS(HubRegOpenPath(HubUxdDevicesPath, KEY_READ|KEY_SET_VALUE, &Key))  )

Definition at line 1557 of file hubregistry.cpp.

1558 {
1559 if (NT_SUCCESS(HubFormatUxdDeviceName(Child, Buffer, RTL_NUMBER_OF(Buffer), &Name)))
1560 WdfRegistryRemoveValue(Key, &Name);
1562 }

◆ if() [31/37]

if ( NT_SUCCESS(Status)  )

Definition at line 498 of file hubregistry.cpp.

499 {
500 if (Value != 0)
502 }
@ DisableSerialNumber

◆ if() [32/37]

if ( Size  = =0||(Size &1)||Type !=REG_BINARY)

◆ if() [33/37]

Definition at line 503 of file hubregistry.cpp.

504 {
505 goto Done;
506 }

◆ if() [34/37]

Definition at line 517 of file hubregistry.cpp.

518 {
523 }
#define KSE_DONT_SKIP_MS_OS
Definition: hubregistry.cpp:41
#define KSE_SKIP_MS_OS
Definition: hubregistry.cpp:40

◆ if() [35/37]

if ( Text.  Length = =0)

◆ if() [36/37]

if ( UpdateRequired !  = NULL)

Definition at line 1497 of file hubregistry.cpp.

1500 {
1502 }
_In_ HubChild _Out_opt_ PBOOLEAN UpdateRequired

◆ if() [37/37]

◆ KseQueryDeviceFlags()

HubDriver KseQueryDeviceFlags ( Key  ,
L"USB"  ,
&  Word 
)

◆ Name() [1/2]

◆ Name() [2/2]

RtlInitEmptyUnicodeString & Name ( NameBuffer  )

◆ PAGED_CODE()

PAGED_CODE ( )

Referenced by _IRQL_requires_().

◆ RtlCopyMemory() [1/2]

RtlCopyMemory ( Copy  ,
Text.  Buffer,
Text.  Length 
)

◆ RtlCopyMemory() [2/2]

RtlCopyMemory ( Value  ,
Data.Info.  Data,
sizeof(ULONG)   
)

◆ RtlInitEmptyUnicodeString()

RtlInitEmptyUnicodeString ( Name  ,
Buffer  ,
(USHORT)(Count *sizeof(WCHAR))   
)

Referenced by _Out_writes_().

◆ RtlUnicodeStringPrintf() [1/2]

return RtlUnicodeStringPrintf ( Name  ,
L"%04X%04X%04X"  ,
Descriptor->  idVendor,
Descriptor->  idProduct,
Descriptor->  bcdDevice 
)

◆ RtlUnicodeStringPrintf() [2/2]

◆ RtlZeroMemory()

RtlZeroMemory ( Record  ,
sizeof *  Record 
)

◆ SetFlag()

◆ WdfDeviceOpenRegistryKey()

◆ WdfRegistryClose() [1/3]

WdfRegistryClose ( HubKey  )

◆ WdfRegistryClose() [2/3]

WdfRegistryClose ( Key  )

◆ WdfRegistryClose() [3/3]

WdfRegistryClose ( Root  )

◆ WdfRegistryCreateKey()

return WdfRegistryCreateKey ( Parent  ,
Name  ,
CreateAccess  ,
REG_OPTION_NON_VOLATILE  ,
NULL  ,
WDF_NO_OBJECT_ATTRIBUTES  ,
Key   
)

Referenced by if().

◆ WdfRegistryQueryValue()

return WdfRegistryQueryValue ( Key  ,
Name  ,
sizeof *  Record,
Record  ,
NULL  ,
NULL   
)

Referenced by _Out_writes_bytes_().

◆ WdfStringGetUnicodeString()

WdfStringGetUnicodeString ( String  ,
&  Text 
)

◆ ZwClose()

ZwClose ( Handle  )

Referenced by __drv_maxIRQL(), _Function_class_(), _IRQL_requires_max_(), _Success_(), acpi_create_registry_table(), acpi_create_volatile_registry_tables(), ACPIDispatchDeviceControl(), AcpiOsExecute(), AdvancedErrorChecks(), AfdCloseSocket(), allow_degraded_mount(), ApphelpCacheRead(), ApphelpCacheWrite(), ArbpForEachRegistryRange(), AtaCreateIdeDirectory(), AtaFdoCreatePortThread(), AtaGetRegistryKey(), AtaInPEMode(), AtaLegacyShouldDetectChannels(), AtaSetPortRegistryKey(), AtaSetRegistryKey(), BasicBehaviorChecks(), BehaviorChecks(), BroadcastOpen(), BuildWindowStationNameList(), CheckForDeviceDesc(), CheckSection_(), ClasspIsMediaChangeDisabledDueToHardwareLimitation(), ClasspIsMediaChangeDisabledForClass(), ClasspMediaChangeDeviceInstanceOverride(), ClassPnp(), ClasspScanForSpecialInRegistry(), Close(), CloseKey(), ClosePin(), CloseRemoteDatabase(), CmBattAddDevice(), CmBattCreateFdo(), CmLoadKey(), CmpCloseHiveFiles(), CmpCreateEvent(), CmpInitHiveFromFile(), CmpInitializeHiveList(), CmpInitializeMachineDependentConfiguration(), CmpLinkHiveToMaster(), CmpLinkKeyToHive(), CmpOpenHiveFiles(), CompBattGetDeviceObjectPointer(), CreateClientPort(), CreateDeviceFromRegistry(), CreateGreenFdo(), CreateMixerPinAndSetFormat(), CreatePinCallback(), CreateRemoteDatabaseWorker(), FxSystemThread::CreateThread(), DiskAddDevice(), DiskCreateFdo(), DiskRemoveDevice(), DriverEntry(), EngLoadModuleEx(), EngpGetDisplayDriverAccelerationLevel(), EngpGetDisplayDriverParameters(), EngpGetRegistryHandleFromDeviceMap(), EngpHasVgaDriver(), EngpUpdateGraphicsDeviceList(), EngpUpdateMonitorDevices(), EnumDeviceKeys(), EnumerateDevices(), EnumerateSoundDevices(), EnumerateSubkey(), ExCreateCallback(), ExpGetCurrentUserUILanguage(), ExpSetCurrentUserUILanguage(), ExpUuidLoadSequenceNumber(), ExpUuidSaveSequenceNumber(), ExpValidateNlsLocaleId(), Ext2StartReaper(), FatGetCompatibilityModeValue(), FatIsFujitsuFMR(), FdoCreateRawParallelPdo(), FdoRemoveAdapter(), FileSectionViewPermissionCheck(), FindDeviceDescForAdapter(), FindProductName(), FinishThread(), FontLink_LoadDefaultCharset(), FontLink_LoadDefaultFonts(), FontLink_LoadSettings(), FontLink_PopulateEntries(), FreeGlobalData(), fs_ignored(), FsRecRegisterFs(), FsRtlDeregisterUncProvider(), FsRtlGetTunnelParameterValue(), FsRtlInitializeWorkerThread(), FsRtlpIsDfsEnabled(), FsRtlRegisterUncProvider(), FsRtlTest_StartTest(), get_registry_value(), GetClassRegistryHandle(), GetClassServicePath(), GetFilterAltitude(), GetImageName(), GetObjectType(), GetProcessorInformation(), GetRegistryValueBuffer(), GetVersionRegistryHandle(), GetVersionServicePath(), HalpDmaAllocateChildAdapter(), HalpGetChipHacks(), HalpGetNMICrashFlag(), HalpMarkAcpiHal(), HalpMarkChipsetDecode(), HalpQueryPciRegistryInfo(), HalpRegisterPciDebuggingDeviceInfo(), HalpReportSerialNumber(), i8042StoreSMBiosTables(), InitDisplayDriver(), InitializeProvider(), InitMetrics(), InitUserImpl(), InitVideo(), IntDeleteRegFontEntries(), IntGdiAddFontResourceSingle(), IntGetFullFileName(), IntLoadFontsInRegistry(), IntLoadFontSubstList(), IntLoadRegistryParameters(), IntLoadSystemFonts(), IntQueryUserSecurityIdentification(), IntVideoPortChildQueryId(), IntVideoPortMapPhysicalMemory(), IoCreateDriver(), IoCreateSymbolicLink(), IoCreateUnprotectedSymbolicLink(), IoDeleteSymbolicLink(), IoGetDeviceInterfaceAlias(), IoGetDeviceInterfaces(), IoOpenDeviceInterfaceRegistryKey(), IoOpenDeviceRegistryKey(), IopBootLog(), IopCreateDeviceKeyPath(), IopCreateEvent(), IopCreateFile(), IopCreateLogFile(), IopCreateRegistryKeyEx(), IopEnumerateDetectedDevices(), IopGetBootPartitionTimeout(), IopGetDeviceObjectPointer(), IopGetParentIdPrefix(), IopInitializeBuiltinDriver(), IopInitializeDriverModule(), IopInitializePlugPlayServices(), IopInstallCriticalDevice(), IopIsFirmwareMapperDisabled(), IopLoadUnloadDriverWorker(), IopLogWorker(), IopOpenInterfaceKey(), IopOpenOrCreateSymbolicLinkSubKeys(), IopQueryBusDescription(), IopQueryDeviceCapabilities(), IopQueryDeviceDescription(), IopSaveBootLogToFile(), IopSetDeviceInstanceData(), IopSetServiceEnumData(), IopShouldProcessDevice(), IopStartRamdisk(), IopUpdateControlKeyWithResources(), IopUpdateResourceMap(), IopUpdateRootKey(), IopWriteLogFile(), IoQueryDeviceDescription(), IoRegisterDeviceInterface(), IoReportDetectedDevice(), IoReportHalResourceUsage(), IoSetDeviceInterfaceState(), IoSetSystemPartition(), KdbpCliInit(), KdpDebugLogInit(), KeI386VdmInitialize(), KsCacheMedium(), KsepGetShimsFromRegistry(), KsFilterFactoryUpdateCacheData(), KsMapModuleName(), KspEnumerateBusRegistryKeys(), KspInstallInterface(), KspReadMediaCategory(), KspScanBus(), KsRegisterFilterWithNoKSPins(), LogMessage(), LsaDeregisterLogonProcess(), LsaRegisterLogonProcess(), main(), MiCreateMemoryEvent(), MiShutdownSystem(), MmCheckSystemImage(), MmInitBsmThread(), MmLoadSystemImage(), MountMgrMountedDeviceArrival(), MountMgrQuerySymbolicLink(), MountMgrValidateBackPointer(), MupCloseUncProvider(), MupGetProviderInformation(), MuppIsDfsEnabled(), Mx::MxClose(), ndisBindMiniportsToProtocol(), NdisCloseConfiguration(), NdisIPnPStartDevice(), NdisOpenConfiguration(), NdisOpenConfigurationKeyByIndex(), NdisOpenConfigurationKeyByName(), NdisOpenFile(), NdisOpenProtocolConfiguration(), nfs41_CreateConnection(), nfs41_DeleteConnection(), NtCreatePagingFile(), NtUserLoadKeyboardLayoutEx(), ObjectBasicInformationTests(), ObjectNameInformationTests(), ObtClose(), ObtCreateObjectTypes(), OnlineMountedVolumes(), OpenDevice(), OpenRegistryHandlesFromSymbolicLink(), OpenSubkey(), PageFileBehaviorChecks(), PciAcpiFindRsdt(), PciAddDevice(), PciEcamQueryWindow(), PciGetBiosConfig(), PciGetIrqRoutingTableFromRegistry(), PciGetRegistryValue(), PciIdeXCreateIdeDirectory(), PciSaveBiosConfig(), PcNewRegistryKey(), Phase1InitializationDiscard(), PiAttachFilterDriversCallback(), PiCallDriverAddDevice(), PiControlInitializeDevice(), PiGetDeviceRegistryProperty(), PiInitCacheGroupInformation(), PiInitializeDevNode(), Pin_fnClose(), PiPropCreateBranch(), PiPropOpenObjectKey(), PiPropReadFromStore(), PiPropReadInterfaceField(), PiPropReadKeyValue(), PiPropStoreApply(), PiPropStoreDelete(), PiPropStoreQuery(), PiPropStoreWrite(), PiPropWriteBuiltin(), PiStartDeviceFinal(), PnpDeviceObjectToDeviceInstance(), PopAddRemoveSysCapsCallback(), PopFlushVolumes(), PopFlushVolumeWorker(), PopQueryBatteryState(), PopReadShutdownPolicy(), ProcessorSetFriendlyName(), PsLocateSystemDll(), QueryVolumeName(), read_group_mappings(), read_mappings(), read_registry(), ReadIpConfiguration(), ReconcileThisDatabaseWithMasterWorker(), RegGetSectionDWORD(), registry_load_volume_options(), registry_mark_volume_mounted(), registry_mark_volume_unmounted_path(), RegistryInitAdapterKey(), RegistryInitLunKey(), RtlAcquirePrivilege(), RtlAdjustPrivilege(), RtlCheckRegistryKey(), RtlCreateBootStatusDataFile(), RtlCreateSystemVolumeInformationFolder(), RtlCreateUserProcess(), RtlFormatCurrentUserKeyPath(), RtlGetNtProductType(), RtlImpersonateSelf(), RtlpCloseRegistryHandle(), RtlpMapFile(), RtlpSysVolTakeOwnership(), RtlQueryRegistryValues(), RtlReleasePrivilege(), RtlUnlockBootStatusData(), RxGetRegistryParameters(), RxInitializeDispatcher(), RxReadRegistryParameters(), RxSpinUpWorkerThread(), ScsiPortInitialize(), SearchForLegacyDrivers(), SeGetLogonIdDeviceMap(), SepCleanupLUIDDeviceMapDirectory(), SepInitializationPhase1(), SepRegQueryHelper(), SerenumDetectLegacyDevice(), SerenumDetectPnpDevice(), SerialPnp(), SerialPnpStartDevice(), SermouseDetectLegacyDevice(), ServiceCheckBootStart(), SetRegistryValue(), SharedMemoryFree(), SimpleErrorChecks(), SocketDestroy(), SocketShutdown(), SpiCreatePortConfig(), SpiInitOpenKeys(), START_TEST(), UcxController::StartWorkerThread(), sys_shutdown(), SysAudio_Shutdown(), SystemProcessTest(), SystemProcessWorker(), TdiCloseDevice(), TdiOpenDevice(), Test_IoOpenDeviceInterfaceRegistryKey(), TestAllInformation(), TestCreateEvent(), TestEventConcurrent(), TestPhysicalMemorySection(), TestSymlinks(), TestTcpConnect(), UDFDismountDevice(), uninit(), USBAudioInitComponentId(), USBAudioRegCreateMediaCategoriesKey(), USBD_GetPdoRegistryParameter(), USBH_SetPdoRegistryParameter(), USBH_WriteFailReasonID(), USBPORT_GetRegistryKeyValueFullInfo(), USBPORT_SetRegistryKeyValue(), UserChangeDisplaySettings(), UserEnumDisplayDevices(), UserEnumRegistryDisplaySettings(), UserGetLanguageID(), UserLoadImage(), UserLoadKbdFile(), UserProcessDestroy(), VdmpInitialize(), VfatSetRenameInformation(), VfdCloseImage(), VfdCreateDevice(), VfdDeleteDevice(), VfdOpenImage(), ViCreateDriveLetter(), ViMountImage(), WdfDeleteKmdfVersionFromRegistry(), WdfLdrDiagnosticsValueByNameAsULONG(), WdfWriteKmdfVersionToRegistry(), WdmAudCleanup(), WdmAudIoctlClose(), WdmAudOpenSysAudioDevices(), WorkerThread(), WskSocket(), xHalIoAssignDriveLetters(), and CRegistryKey::~CRegistryKey().

◆ ZwOpenKey()

return ZwOpenKey ( Handle  ,
KEY_READ  ,
&  Attributes 
)

Referenced by _IRQL_requires_max_(), _Success_(), AcpiRegOpenKey(), allow_degraded_mount(), ApphelpCacheRead(), ApphelpCacheWrite(), ArbpOpenPolicySubkey(), AtaInPEMode(), AtaOpenRegistryKey(), check_boot_options(), CheckKeySecurity__(), ClasspIsMediaChangeDisabledDueToHardwareLimitation(), ClasspIsMediaChangeDisabledForClass(), ClasspScanForSpecialInRegistry(), CmpRemoveFromHiveFileList(), ConfigureSoundBlasterDevice(), DiskAddDevice(), DriverEntry(), EnumDeviceKeys(), EnumerateSoundDevices(), ExpGetCurrentUserUILanguage(), ExpSetCurrentUserUILanguage(), ExpUuidLoadSequenceNumber(), ExpUuidSaveSequenceNumber(), ExpValidateNlsLocaleId(), FatGetCompatibilityModeValue(), FatIsFujitsuFMR(), FindProductName(), FltpOpenFilterServicesKey(), FsRtlGetTunnelParameterValue(), FsRtlpIsDfsEnabled(), FxIFRGetSize(), GetClassRegistryHandle(), GetFilterAltitude(), GetImageName(), GetRegistryValueBuffer(), GetVersionRegistryHandle(), HalpGetChipHacks(), HalpGetNMICrashFlag(), HalpOpenRegistryKey(), HalpQueryPciRegistryInfo(), InitializeProvider(), IntCopyRegistryKey(), IntCreateNewRegistryPath(), IntGdiAddFontResourceSingle(), IntLoadFontsInRegistry(), IntLoadFontSubstList(), IntLoadRegistryParameters(), IntSetupDeviceSettingsKey(), IoGetDeviceInterfaces(), IopBootLog(), IopDetectResourceConflict(), IopInstallCriticalDevice(), IopIsFirmwareMapperDisabled(), IopOpenInterfaceKey(), IopOpenRegistryKeyEx(), IopQueryBusDescription(), IopQueryDeviceDescription(), IopSaveBootLogToFile(), IopShouldProcessDevice(), IoQueryDeviceDescription(), KeI386VdmInitialize(), KsepGetShimsFromRegistry(), KsMapModuleName(), KspEnumerateBusRegistryKeys(), KspReadMediaCategory(), LdrOpenImageFileOptionsKey(), MupGetProviderInformation(), MuppIsDfsEnabled(), Mx::MxOpenKey(), ndisBindMiniportsToProtocol(), NdisOpenConfiguration(), NdisOpenConfigurationKeyByIndex(), NdisOpenConfigurationKeyByName(), NdisOpenProtocolConfiguration(), NtSetDefaultLocale(), OpenKey(), OpenRegistryKey(), OpenSubkey(), PciOpenKey(), Phase1InitializationDiscard(), PopFlushVolumes(), PopReadShutdownPolicy(), ProcessorSetFriendlyName(), ReadIpConfiguration(), registry_load_volume_options(), registry_mark_volume_unmounted_path(), RegOpenKey(), RtlGetNtProductType(), RtlOpenCurrentUser(), RtlpGetRegistryHandle(), RtlpNtOpenKey(), RtlQueryRegistryValues(), RXactpOpenTargetKey(), RxGetRegistryParameters(), RxReadRegistryParameters(), SearchForLegacyDrivers(), SepRegQueryHelper(), SerialPnp(), ServiceCheckBootStart(), SetRegistryValue(), SpiCreatePortConfig(), SpiInitOpenKeys(), START_TEST(), USBAudioRegCreateMediaCategoriesKey(), UserGetLanguageID(), WdfDeleteKmdfVersionFromRegistry(), WdfLdrDiagnosticsValueByNameAsULONG(), and WdfWriteKmdfVersionToRegistry().

Variable Documentation

◆ __pad0__

Done __pad0__

Definition at line 584 of file hubregistry.cpp.

◆ __pad1__

Done __pad1__

Definition at line 817 of file hubregistry.cpp.

◆ Access

_In_ ACCESS_MASK Access

Definition at line 146 of file hubregistry.cpp.

◆ Apply

BOOLEAN Apply

Definition at line 390 of file hubregistry.cpp.

Referenced by DECLARE_INTERFACE_(), and for().

◆ Buffer

Definition at line 605 of file hubregistry.cpp.

◆ Child

Definition at line 1029 of file hubregistry.cpp.

◆ Copy

◆ Count

_In_ ULONG Count
Initial value:

Definition at line 386 of file hubregistry.cpp.

Referenced by _Out_writes_().

◆ CreateAccess

Definition at line 175 of file hubregistry.cpp.

Referenced by ObCheckCreateObjectAccess().

◆ Current

HubUxdSettings Current

Definition at line 1463 of file hubregistry.cpp.

Referenced by _IRQL_requires_max_(), ACDBG_FN(), AddDisplayDevice(), AddEntriesFromInfSection(), AddFileName(), AddrFindShared(), AddrSearchNext(), ApicInitializeIOApic(), AppendGenericListEntry(), ArbiterLibAllocateEntry(), ArbpFreeAllocationWorkSpaces(), ArcGetMemoryDescriptor(), AtaTrimIdString(), Cardbus_MassageHeaderForLimitsDetermination(), Cardbus_SaveCurrentSettings(), CloseAllDialogWindows(), CmpBuildHashStackAndLookupCache(), CmpDereferenceNameControlBlockWithLock(), CmpDoSort(), CmpParseKey(), CmpRemoveKeyHash(), ConvertCoffs(), ConvertStabs(), CopyFIBs(), CountBTreeKeys(), CountFIBs(), CListIterator< Item >::CurrentItem(), DefaultProcessEntry(), DeletePwrScheme(), DestroyFIBEs(), Device_SaveLimits(), DGDeliverData(), DisplayPendingOps(), ExfReInitializeRundownProtectionCacheAware(), ExfRundownCompletedCacheAware(), ExfWaitForRundownProtectionReleaseCacheAware(), ExpQuerySystemProcessInformation(), FillResolutionsAndColors(), FindAdapterByIndex(), FindBestElement(), FindSymbolicLinkEntry(), CListIterator< Item >::First(), FxUsbDevice::GetCurrentFrameNumber(), GetDialogListEntry(), GetPossibleSettings(), GetReassemblyInfo(), GetSystemPowerStatus(), HubChildReadUsb20Lpm(), HubDescNextMsOs20(), HubHasMultiTtInterface(), DeviceMachine::InstallMsOs20Values(), IntDeRegisterShellHookWindow(), IntGetLoadedCodePageEntry(), IoCheckEaBufferValidity(), IopCreateDeviceKeyPath(), IPFreeReassemblyList(), IsBadReadPtr(), IsBadStringPtrA(), IsBadStringPtrW(), IsBadWritePtr(), CListIterator< Item >::IsDone(), KeFreezeAllThreads(), KeThawAllThreads(), KiGetVectorDispatch(), KsepMultiSzToShims(), LANUnregisterProtocol(), LdrpCheckForLoadedDllHandle(), LdrpInitializeProcess(), CListIterator< Item >::Next(), NICGetCurrentPage(), NlsUninit(), NtfsLookupFileAt(), OnBPPChanged(), OnDisplayDeviceChanged(), OnResolutionChanged(), PciAddCurrentPlacementRequirement(), PciApplyResizableBarSizes(), PciBridgeIsSubtractiveDecode(), PciGetFunctionLimits(), PcipGetFunctionLimits(), PciWriteLimitsAndRestoreCurrent(), PortCacheSetFeature(), PPBridge_MassageHeaderForLimitsDetermination(), PPBridge_SaveCurrentSettings(), ProbeForRead(), ProbeForWrite(), ProcessDeviceClassChangeEvent(), ProcessLangEntry(), PsaEnumerateProcessModules(), PushLockValidateWaitChain(), RetrieveTimeZone(), RouterCreateRoute(), RouterDumpRoutes(), RouterGetRoute(), RouterRemoveRoute(), RouterRemoveRoutesForInterface(), RtlAddRange(), RtlCopyRangeList(), RtlDeleteOwnersRanges(), RtlDeleteRange(), RtlDestroyHeap(), RtlFirstFreeAce(), RtlFreeRangeList(), RtlGetNextRange(), RtlInvertRangeListEx(), RtlMakeSelfRelativeSD(), RtlpConflictsOnAdd(), RtlpDphFreeDelayedBlocksFromHeap(), RtlpFindAndCommitPages(), RtlpHashAtomName(), RtlpInsertUnCommittedPages(), RtlpRemoveHeapFromProcessList(), RtlpWindowIsAvailable(), SeiDbgPrint(), DeviceMachine::SelectInterfaceValid(), SeSetWorldSecurityDescriptor(), SettingsPageProc(), SeUnregisterLogonSessionTerminatedRoutine(), ShimDbgPrint(), START_TEST(), SYSLINK_Draw(), SYSLINK_GetFocusLink(), SYSLINK_GetLinkItemByIndex(), SYSLINK_GetNextLink(), SYSLINK_GetPrevLink(), SYSLINK_HitTest(), SYSLINK_LButtonDown(), SYSLINK_LButtonUp(), SYSLINK_LinkAtPt(), SYSLINK_Render(), SYSLINK_SetFocusLink(), TestUM(), USBD_GetInterfaceLength(), UserBuildShellHookHwndList(), VGADDI_AllocSavedScreenBits(), and WdmlibRtlIsNtDdiVersionAvailable().

◆ Delete

◆ DeviceKey

◆ else

else
Initial value:
{
goto Done

Definition at line 524 of file hubregistry.cpp.

◆ Event

Initial value:

Definition at line 1512 of file hubregistry.cpp.

◆ Filter

CopyMemory & Filter
Initial value:
#define NonPagedPool
Definition: env_spec_w32.h:307
_In_ PCWSTR _In_ ULONG Size
static const ENTRY Entries[]
static PVOID ExAllocatePoolZero(ULONG PoolType, SIZE_T NumberOfBytes, ULONG Tag)
Definition: precomp.h:45
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Definition at line 433 of file hubregistry.cpp.

Referenced by _IRQL_requires_max_(), _SEH3$_GetFilterResult(), _SEH3$_InvokeNestedFunctionFilter(), AudioPositionPropertyHandler(), BdaMethodCreatePin(), BdaMethodCreateTopology(), BdaPropertyGetPinControl(), BdaPropertyTemplateConnections(), BuildFilterStrings(), CEnumIDListBase::CreateInstance(), CredEnumerateA(), CredEnumerateW(), DECLARE_INTERFACE_(), DeleteWithWildcard(), DoOpenFile(), DoSaveFile(), EthCreateFilter(), EthDeleteFilter(), EthFilterDprIndicateReceive(), EthFilterDprIndicateReceiveComplete(), Ext2NotifyReportChange(), FilterAudioMuteHandler(), FilterAudioVolumeHandler(), FindDeviceByGuid(), FindDeviceByMappedId(), FltEnumerateVolumes(), FltpOpenFilterServicesKey(), FltpRegisterContexts(), FltRegisterFilter(), FltStartFiltering(), FltUnregisterFilter(), GetDeviceID(), GetFilterAltitude(), GetFilterFrame(), GetPinIdFromFilter(), HubChildSettingFiltered(), if(), IKsFilter_AddPin(), IKsFilter_AttachFilterToFilterFactory(), IKsFilter_DispatchClose(), IKsFilter_DispatchDeviceIoControl(), IKsFilter_GetFilterFromIrp(), IKsFilter_RemoveFilterFromFilterFactory(), IKsFilter_RemovePin(), IKsPin_DispatchKsStream(), InitOpenFileName(), KsFilterAcquireProcessingMutex(), KsFilterAddTopologyConnections(), KsFilterAttemptProcessing(), KsFilterCreatePinFactory(), KsFilterGetAndGate(), KsFilterGetChildPinCount(), KsFilterGetFirstChildPin(), KsFilterRegisterPowerCallbacks(), KsFilterReleaseProcessingMutex(), KspCreateFilterFactory(), KspCreatePin(), KSPropertySetImpl_Get(), LoadHive(), NewDirectSoundCaptureBuffer(), NewPrimarySoundBuffer(), NewSecondarySoundBuffer(), nfs41_QueryDirectory(), PcCreateItemDispatch(), PcCreatePinDispatch(), PinCreate(), PinReset(), PinState(), PrintPersistentRoutes(), TestFltRegisterFilter(), USBAudioFilterCreate(), USBAudioPinCreate(), UsbAudioPinDataIntersect(), and VfatWrite().

◆ Flags

* Flags = 0

Definition at line 270 of file hubregistry.cpp.

Referenced by if().

◆ Found

Found = NT_SUCCESS(HubReadUxdPortRecord(Hub, Child->m_Port->Number(), &Current))

Definition at line 1464 of file hubregistry.cpp.

◆ GuidText

Definition at line 1597 of file hubregistry.cpp.

◆ Handle

HANDLE Handle
Initial value:

Definition at line 1882 of file hubregistry.cpp.

Referenced by if().

◆ HubD3ColdSubkey

const WCHAR HubD3ColdSubkey[] = L"e5b3b5ac-9725-4f78-963f-03dfb1d828c7"
static

Definition at line 34 of file hubregistry.cpp.

◆ HubDeviceErrataAfterSoftRemove

const HubDeviceErrata HubDeviceErrataAfterSoftRemove[]
static
Initial value:
=
{
{ L"RequestConfigDescOnReset", 4, HubErrataGate::None, ChildHack::RequestConfigDescOnReset },
{ L"SkipContainerIdQuery", 5, HubErrataGate::None, ChildHack::SkipContainerIdQuery },
{ L"SkipBOSDescriptorQuery", 27, HubErrataGate::None, ChildHack::SkipBosQuery },
}
@ ResetAfterIdleResume
@ DisableRemoteWakeForUsb20Lpm
@ TolerateStalePipes
@ AlwaysSecondReset
@ IgnoreBosValidationFailure
@ RequestConfigDescOnReset
@ DisableSuperSpeed
@ SkipContainerIdQuery
@ NoExitLatencyRequest
@ NoIsochDelayRequest

Definition at line 357 of file hubregistry.cpp.

◆ HubDeviceErrataBeforeSoftRemove

const HubDeviceErrata HubDeviceErrataBeforeSoftRemove[]
static
Initial value:
=
{
{ L"UseWin8DescriptorValidation", 31, HubErrataGate::None, ChildHack::UseWin8DescriptorValidation },
}
@ ResetAfterSystemResume
@ UseWin8DescriptorValidation

Definition at line 350 of file hubregistry.cpp.

◆ HubGlobalCeipPath

const WCHAR HubGlobalCeipPath[]
static
Initial value:
=
L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Usb\\Ceip"

Definition at line 22 of file hubregistry.cpp.

◆ HubHubErrataFirst

const HubHubErrata HubHubErrataFirst[]
static
Initial value:
=
{
{ L"ResetTTOnCancel", 8, HubFlag::ResetTtOnCancel, 0 },
{ L"NoClearTTBufferOnCancel", 9, HubFlag::NoClearTtOnCancel, (ULONG)HubFlag::ResetTtOnCancel },
{ L"DisableLPM", 12, HubFlag::DisableLpm, 0 },
}
@ ToleratesU0WhileDetached
@ DelayAfterResetComplete
@ DisableUsb20Lpm
@ ResetTtOnCancel
@ IgnoreEnabledInSsInactive
@ PowerOnPortsOnStart
@ NoClearTtOnCancel
@ DisableSuperSpeed
@ DiscardEnableDuringReset

Definition at line 702 of file hubregistry.cpp.

◆ HubHubErrataSecond

const HubHubErrata HubHubErrataSecond[]
static
Initial value:

Definition at line 716 of file hubregistry.cpp.

◆ HubKey

WDFKEY HubKey

Definition at line 1389 of file hubregistry.cpp.

Referenced by if().

◆ HubUsbControlPath

const WCHAR HubUsbControlPath[]
static
Initial value:
=
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\USB"

Definition at line 24 of file hubregistry.cpp.

◆ HubUsbflagsPath

const WCHAR HubUsbflagsPath[]
static
Initial value:
=
L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\usbflags"

Definition at line 14 of file hubregistry.cpp.

◆ HubUsbFnConfigPath

const WCHAR HubUsbFnConfigPath[]
static
Initial value:
=
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\USBFN\\Configurations\\"

Definition at line 30 of file hubregistry.cpp.

◆ HubUsbFnDefaultPath

const WCHAR HubUsbFnDefaultPath[]
static
Initial value:
=
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\USBFN\\Default"

Definition at line 28 of file hubregistry.cpp.

◆ HubUsbFnPath

const WCHAR HubUsbFnPath[]
static
Initial value:
=
L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\USBFN"

Definition at line 26 of file hubregistry.cpp.

◆ HubUxdDevicesPath

const WCHAR HubUxdDevicesPath[]
static
Initial value:
=
L"\\registry\\machine\\system\\currentcontrolset\\services\\usbhub\\uxd_control\\devices"

Definition at line 18 of file hubregistry.cpp.

◆ HubUxdPnpPath

const WCHAR HubUxdPnpPath[]
static
Initial value:
=
L"\\registry\\machine\\system\\currentcontrolset\\services\\usbhub\\uxd_control\\pnp"

Definition at line 20 of file hubregistry.cpp.

◆ HubVerifierPath

const WCHAR HubVerifierPath[]
static
Initial value:
=
L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\usb\\HardwareVerifier"

Definition at line 16 of file hubregistry.cpp.

◆ Ids

◆ Info

Definition at line 1965 of file hubregistry.cpp.

◆ Key

WDFKEY Key
Initial value:
{
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx 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:732
return WdfRegistryOpenKey(NULL, &KeyName, Access, WDF_NO_OBJECT_ATTRIBUTES, Key)
_In_ PCUNICODE_STRING _In_ ACCESS_MASK Access

Definition at line 147 of file hubregistry.cpp.

Referenced by _In_reads_bytes_(), _IRQL_requires_(), and HubEvtOverCurrentWorkItem().

◆ KeyPath

◆ Kse

ULONG64 Kse = HubQueryKseDeviceFlags(Ids, FALSE)

Definition at line 384 of file hubregistry.cpp.

Referenced by for(), and if().

◆ Length

Definition at line 1071 of file hubregistry.cpp.

Referenced by HubBoundedLength().

◆ m_AlternateSettingFilter

Child m_AlternateSettingFilter = Filter

Definition at line 451 of file hubregistry.cpp.

◆ m_FriendlyName

Child m_FriendlyName = Copy

Definition at line 1204 of file hubregistry.cpp.

◆ m_FriendlyNameLength

Child m_FriendlyNameLength = Text.Length

Definition at line 1205 of file hubregistry.cpp.

◆ m_Hacks

Definition at line 538 of file hubregistry.cpp.

◆ m_Uxd

Child m_Uxd = Current

Definition at line 1495 of file hubregistry.cpp.

◆ Name

_In_ PCWSTR Name
Initial value:
{
_In_ WDFKEY _In_ ULONG64 _In_ ULONG Count
RtlInitEmptyUnicodeString(Name, Buffer,(USHORT)(Count *sizeof(WCHAR)))

Definition at line 106 of file hubregistry.cpp.

Referenced by _In_reads_bytes_(), _Out_writes_(), _Out_writes_bytes_(), HubEvtOverCurrentWorkItem(), and if().

◆ OpenAccess

Definition at line 174 of file hubregistry.cpp.

◆ Path

_In_ PCWSTR Path

Definition at line 606 of file hubregistry.cpp.

Referenced by _tmain(), AcpiDsLoad1BeginOp(), AcpiInstallMethod(), AcpiNsLookup(), AcpiPsGetNextNamepath(), AcpiRsGetMethodData(), AcpiUtEvaluateObject(), AcpiUtMethodError(), AddIconFromRegistry(), AddInstallationSource(), AddSubst(), AllowPermLayer(), ArcOpen(), BasepGetComputerNameFromNtPath(), BasepLoadLibraryAsDatafile(), BeautifyPath(), BtrFsOpen(), build_path(), XhciUsbDevice::BuildAddressContext(), CabinetNormalizePath(), CheckForGlobalDriveLetter(), ClassifyFile(), CmpWalkPath(), ConnectRegistry(), ConstructDeviceName(), CCabinet::ConvertPath(), ConvertPathCharacters(), CreateDirectoryRecursive(), CreateFreeLoaderIniForReactOSAndBootSector(), CreateItem(), CreateObjectsFromPersistFolder(), CreateShellItemFromParse(), CStubWindow32::CreateStub(), Dde_OnExecute(), UcxUsbDevice::DisconnectPort(), DiskOpen(), DissectArcPath(), DllRegisterServer(), DoEntry(), DosChangeDirectory(), DosKRNLInitialize(), DumpCommand(), DumpFolderColumns(), DumpPidl(), ExpandSymbolicLink(), ExtOpen(), FatOpen(), FileQueryFiles(), filesys_BuildPath(), filesys_GetBaseName(), filesys_GetFileName(), filesys_GetParentFolderName(), FindFiles_PathIsAbsolute(), FindItem(), FindLFNorSFN_U(), CStubWindow32::FindStubWindow(), FltpOpenFilterServicesKey(), FsGetFirstNameFromPath(), FsGetNumPathParts(), GetAdapterFriendlyName(), GetAssocClass(), GetAutostartEntriesFromRegistry(), GetCustomIconPath(), GetDrivePath(), CCabinet::GetFileName(), GetFileName(), GetFileSize(), CFontCache::GetFontFilePath(), GetGinaPath(), GetInterfaceFriendlyName(), GetKnownPath(), GetLongPathNameW(), GetNameFromPath(), GetOptUlong(), GetOwnerModuleFromPidEntry(), GetPathCase(), GetProgramFilesPath(), GetRecycleBinPathFromDriveNumber(), GetShortPathNameW(), GetSpecialPath(), GetWmiVersionInfo(), HandleDesktopIniOp(), HubIoGetConnectionName(), HubSelPathLatency(), Initialize(), InitOurDirectory(), CRegTreeOptions::InitTree(), InstallDefaultSystemSoundScheme(), InstallOneInterface(), InternetExplorer_get_Path(), IsoLastPathSeparator(), IsoOpen(), IsValidDrivePath(), IsValidInstallDirectory(), IsZipFile(), KsCacheMedium(), KsOpenDefaultDevice(), KspReadMediaCategory(), LoadImageFromPath(), LoadModule(), MainWndDropFiles(), UcxEndpoint::NeedToCancelTransfers(), CCabinet::NormalizePath(), NtfsOpen(), NtfsOpenTargetDirectory(), NtPathToDiskPartComponents(), OFNHookProc(), ok_keys_(), CZipExtract::CCompleteSettingsPage::OnSetActive(), Open(), OpenNt4KernelSoundDevice(), OpensWithExplorer(), OurDirectoryPath(), OurInstallationPath(), PathIsDriveRoot(), PathIsOnDrive(), PathIsOnUnc(), CDownloadManager::PerformDownloadAndInstall(), PiPropBuildValuePath(), PiPropStoreQuery(), PiPropStoreWrite(), PopulateCustomPathCombo(), PxeOpen(), query_typelib_path(), XhciController::ReadVerifierFlags(), RegKeyExists(), RegKeyHasValues(), RegSetString(), RegSetStringEx(), RemoveFileName(), CAvailableApplicationInfo::RetrieveIcon(), CInstalledApplicationInfo::RetrieveIcon(), CAvailableApplicationInfo::RetrieveScreenshot(), RtlCheckRegistryKey(), RtlCreateRegistryKey(), RtlDeleteRegistryValue(), RtlDetermineDosPathNameType_U(), RtlDetermineDosPathNameType_Ustr(), RtlDosSearchPath_U(), RtlGetLengthWithoutLastFullDosOrNtPathElement(), RtlIsDosDeviceName_U(), RtlNtPathNameToDosPathName(), RtlpCollapsePath(), RtlpGetRegistryHandle(), RtlQueryRegistryValues(), RtlSetCurrentDirectory_U(), RtlWriteRegistryValue(), RunFontViewer(), RxFcbTableLookupFcb(), ScanFoldersForDriver(), SdbpIsPathOnRemovableMedia(), SearchDriverRecursive(), CDFParser::SetFileRelativePath(), CFontCache::SetFontDir(), SetOptUlong(), SetupDiOpenDeviceInterfaceRegKey(), SetupSetFileAttributes(), SHELL_CreatePropSheetStubWindow(), SHELL_QueryCLSIDValue(), SHGFI(), SHParseName(), SHParseNameEx(), SHRegOpenUSKeyA(), SHRegOpenUSKeyW(), SkipPathTypeIndicator_U(), SmpInitializeKnownDllsInternal(), START_TEST(), StartChild(), StartProcess(), Test_InvokeIdList(), Test_ProtectedFiles(), TestIoCreateFile(), TestMessageHandler(), UcxBuildPortPath(), UefiDiskOpen(), UsbdexBuildParametersPath(), ViLoadImagesFromRegistry(), WebBrowser_get_Path(), WshShortcut_get_TargetPath(), WshShortcut_put_TargetPath(), and WspiapiLoad().

◆ PortNumber

Definition at line 1383 of file hubregistry.cpp.

◆ Present

◆ Previous

◆ Record

◆ Returned

◆ Root

◆ RootHub

Initial value:
{
PCWSTR Bus = RootHub ? L"ROOT_HUB" : L"USB"
const uint16_t * PCWSTR
Definition: typedefs.h:57
_Must_inspect_result_ _In_ UCXCONTROLLER _In_ PUCX_ROOTHUB_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ UCXROOTHUB * RootHub
Definition: ucxroothub.h:299

Definition at line 266 of file hubregistry.cpp.

◆ RootKey

◆ SetInfo

Definition at line 481 of file hubregistry.cpp.

◆ Size

ULONG Size = 0

Definition at line 107 of file hubregistry.cpp.

◆ Status

Initial value:
{
*Status = HubRegReadValue(Key, Name, sizeof(*Value), Value)

Definition at line 128 of file hubregistry.cpp.

Referenced by _In_reads_bytes_(), _IRQL_requires_(), _IRQL_requires_max_(), for(), HubEvtOverCurrentWorkItem(), and if().

◆ STATUS_SUCCESS

return STATUS_SUCCESS

Definition at line 253 of file hubregistry.cpp.

Referenced by if().

◆ Stop

* Stop
Initial value:

Definition at line 1163 of file hubregistry.cpp.

◆ String

_In_ WDFSTRING String
Initial value:
{
RtlFreeUnicodeString & GuidText

Definition at line 1162 of file hubregistry.cpp.

◆ Text

Definition at line 1166 of file hubregistry.cpp.

Referenced by HubBoundedLength().

◆ TRUE

Definition at line 134 of file hubregistry.cpp.

Referenced by _IRQL_requires_max_(), and if().

◆ Try

ULONG Try

Definition at line 609 of file hubregistry.cpp.

Referenced by DisplayStatus(), RunTests(), and StartThread().

◆ Type

◆ UpdateRequired

_In_ HubChild _Out_opt_ PBOOLEAN UpdateRequired
Initial value:

Definition at line 1460 of file hubregistry.cpp.

Referenced by if().

◆ UxdKey

WDFKEY UxdKey

Definition at line 1390 of file hubregistry.cpp.

◆ Value

Definition at line 126 of file hubregistry.cpp.

Referenced by _IRQL_requires_(), and HubEvtOverCurrentWorkItem().

◆ ValueName

◆ Version

else Version = L"usb2X"

Definition at line 620 of file hubregistry.cpp.

◆ Word

return Flags Word = 0

Definition at line 271 of file hubregistry.cpp.

Referenced by AtaSwapIdString(), DGifGetWord(), and FAST486_OPCODE_HANDLER().