/* FIXME: Add display peripheral (monitor) data */
}
+static VOID
+DetectSWBus(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
+{
+ PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
+ PCONFIGURATION_COMPONENT_DATA BusKey;
+ ULONG Size;
+
+ /* Increment bus number */
+ (*BusNumber)++;
+
+ /* Set 'Configuration Data' value */
+ Size = sizeof(CM_PARTIAL_RESOURCE_LIST) - sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR);
+
+ PartialResourceList = MmHeapAlloc(Size);
+ if (PartialResourceList == NULL)
+ {
+ DPRINTM(DPRINT_HWDETECT, "Failed to allocate resource descriptor\n");
+ return;
+ }
+
+ /* Initialize resource descriptor */
+ memset(PartialResourceList, 0, Size);
+ PartialResourceList->Version = 1;
+ PartialResourceList->Revision = 1;
+ PartialResourceList->Count = 0;
+
+ /* Create new bus key */
+ FldrCreateComponentKey(SystemKey,
+ AdapterClass,
+ MultiFunctionAdapter,
+ 0x0,
+ 0x0,
+ 0xFFFFFFFF,
+ "SWENUM",
+ PartialResourceList,
+ Size,
+ &BusKey);
+
+ MmHeapFree(PartialResourceList);
+}
static VOID
DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
DetectPnpBios(SystemKey, &BusNumber);
DetectIsaBios(SystemKey, &BusNumber);
DetectAcpiBios(SystemKey, &BusNumber);
-
+ DetectSWBus(SystemKey, &BusNumber);
+
DPRINTM(DPRINT_HWDETECT, "DetectHardware() Done\n");
return SystemKey;
const UNICODE_STRING IdentifierPci = RTL_CONSTANT_STRING(L"PCI");
UNICODE_STRING HardwareIdPci = RTL_CONSTANT_STRING(L"*PNP0A03\0");
static ULONG DeviceIndexPci = 0;
+ const UNICODE_STRING IdentifierSW = RTL_CONSTANT_STRING(L"SWENUM");
+ UNICODE_STRING HardwareIdSW= RTL_CONSTANT_STRING(L"SWENUM\0");
+ static ULONG DeviceIndexSW = 0;
const UNICODE_STRING IdentifierSerial = RTL_CONSTANT_STRING(L"SerialController");
UNICODE_STRING HardwareIdSerial = RTL_CONSTANT_STRING(L"*PNP0501\0");
static ULONG DeviceIndexSerial = 0;
if (ValueName.Length >= sizeof(WCHAR) && ValueName.Buffer[ValueName.Length / sizeof(WCHAR) - 1] == UNICODE_NULL)
ValueName.Length -= sizeof(WCHAR);
}
-
+DPRINT1("RelativePath %wZ\n", RelativePath);
if (RelativePath && RtlCompareUnicodeString(RelativePath, &IdentifierSerial, FALSE) == 0)
{
pHardwareId = &HardwareIdSerial;
pHardwareId = &HardwareIdIsa;
DeviceIndex = DeviceIndexIsa++;
}
+ else if (RtlCompareUnicodeString(&ValueName, &IdentifierSW, FALSE) == 0)
+ {
+ pHardwareId = &HardwareIdSW;
+ DeviceIndex = DeviceIndexSW++;
+ }
else
{
- DPRINT("Unknown device '%wZ'\n", &ValueName);
+ DPRINT1("Unknown device '%wZ'\n", &ValueName);
goto nextdevice;
}
}