implement user mode catchable exceptions, refactor system status codes to use NTLSTATUS_ prefix, update build scripts to use shared literal macros for linker arguments, update named queue lifetime cleanup to include KeNamedQueueUnpublishHandle.
This commit is contained in:
1 parent
1f5477cf66
commit
b7fcfce6f7
140 files changed
+7649
-3943
No files matched your search
@@ -22,7 +22,7 @@ KSTATUS XhciSetConfiguration(XHCI_CONTROLLER* xhci, XHCI_DEVICE* dev,
|
||||
dev->Configured = true;
|
||||
UsbTrace("usb: SET_CONFIGURATION slot=%u value=%u complete\n",
|
||||
dev->SlotId, configurationValue);
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Returns tracked Interface By Number.
|
||||
@@ -214,7 +214,7 @@ KSTATUS XhciDiscoverAndSetConfiguration(XHCI_CONTROLLER* xhci, XHCI_DEVICE* dev,
|
||||
const USB_DEVICE_DESCRIPTOR* devDesc) {
|
||||
if (devDesc->bNumConfigurations == 0) {
|
||||
DbgPrint("usb: slot=%u has no configurations\n", dev->SlotId);
|
||||
return STATUS_NOT_FOUND;
|
||||
return NTLSTATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
USB_CONFIGURATION_DESCRIPTOR config;
|
||||
@@ -232,7 +232,7 @@ KSTATUS XhciDiscoverAndSetConfiguration(XHCI_CONTROLLER* xhci, XHCI_DEVICE* dev,
|
||||
if (config.bConfigurationValue == 0) {
|
||||
DbgPrint("usb: slot=%u configuration value 0 is invalid for SET_CONFIGURATION\n",
|
||||
dev->SlotId);
|
||||
return STATUS_DEVICE_ERROR;
|
||||
return NTLSTATUS_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
st = XhciSetConfiguration(xhci, dev, config.bConfigurationValue);
|
||||
@@ -248,7 +248,7 @@ KSTATUS XhciDiscoverAndSetConfiguration(XHCI_CONTROLLER* xhci, XHCI_DEVICE* dev,
|
||||
}
|
||||
}
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the rollback Enumerated Slot operation.
|
||||
@@ -283,7 +283,7 @@ static KSTATUS XhciEnumeratePathEx(XHCI_CONTROLLER* xhci,
|
||||
uint8_t* outSlotId) {
|
||||
if (outSlotId) *outSlotId = 0;
|
||||
if (!xhci || !path || path->RootPort == 0)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
uint8_t slotId = 0;
|
||||
KSTATUS st = XhciEnableSlot(xhci, &slotId);
|
||||
@@ -372,7 +372,7 @@ static KSTATUS XhciEnumeratePathEx(XHCI_CONTROLLER* xhci,
|
||||
}
|
||||
|
||||
if (outSlotId) *outSlotId = slotId;
|
||||
return STATUS_SUCCESS;
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the enumerate Port Ex operation.
|
||||
@@ -401,18 +401,18 @@ KSTATUS XhciEnumerateHubPortEx(XHCI_CONTROLLER* xhci,
|
||||
uint8_t* outSlotId) {
|
||||
if (outSlotId) *outSlotId = 0;
|
||||
if (!xhci || !hub || !hub->Device || !hub->Self || hubPort == 0)
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
USB_DEVICE* parent = hub->Device;
|
||||
if (parent->Path.Depth >= 5u) {
|
||||
DbgPrint("usb-hub: hub slot=%u port=%u exceeds xHCI route depth\n",
|
||||
parent->SlotId, hubPort);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
return NTLSTATUS_NOT_SUPPORTED;
|
||||
}
|
||||
if (hubPort > 15u) {
|
||||
DbgPrint("usb-hub: hub slot=%u port=%u cannot be represented in xHCI route string yet\n",
|
||||
parent->SlotId, hubPort);
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
return NTLSTATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
USB_PORT_PATH path = parent->Path;
|
||||
|
||||
Reference in new issue
Block a user