replace nob with ms' build, move disk creation to build.bat, major comment cleanup, remove old and stupid tests, overhaul interrupt management with per-CPU vector allocation, affinity migration and safe teardown, add proper IOAPIC routing and PCI MSI/MSI-X/INTx support, migrate drivers to the new interrupt API, integrate ACPICA with a proper OS services layer, move ACPI firmware events, power button handling and S5 shutdown into acpi.sys, add parallel driver startup and atomic publication, replace PnP arrays with dynamic lists, redesign service startup again to be asynchronous, add delayed startup mode for services, allow omitting keys in services.ini, fix acpi ec deferred work handling, fix kernel threads having garbage exit code.
This commit is contained in:
1 parent
d36f19509c
commit
36eef8f58d
696 files changed
+147281
-7530
No files matched your search
@@ -21,7 +21,6 @@ static const IO_DRIVER_ID_TABLE gUsbStorageIdTable = {
|
||||
sizeof(gUsbStorageIds) / sizeof(gUsbStorageIds[0]),
|
||||
};
|
||||
|
||||
// Implements the storage From Disk Device operation.
|
||||
static USB_STORAGE_EXTENSION* UsbStorageFromDiskDevice(DEVICE_OBJECT* device) {
|
||||
if (!device || !device->DeviceExtension)
|
||||
return (USB_STORAGE_EXTENSION*)0;
|
||||
@@ -32,7 +31,6 @@ static USB_STORAGE_EXTENSION* UsbStorageFromDiskDevice(DEVICE_OBJECT* device) {
|
||||
return diskExt->Storage;
|
||||
}
|
||||
|
||||
// Implements the storage From Interface Device operation.
|
||||
static USB_STORAGE_EXTENSION* UsbStorageFromInterfaceDevice(DEVICE_OBJECT* device) {
|
||||
if (!device || !device->DeviceExtension)
|
||||
return (USB_STORAGE_EXTENSION*)0;
|
||||
@@ -43,7 +41,6 @@ static USB_STORAGE_EXTENSION* UsbStorageFromInterfaceDevice(DEVICE_OBJECT* devic
|
||||
return ext;
|
||||
}
|
||||
|
||||
// Implements the storage Find Bulk Endpoint operation.
|
||||
static const USB_ENDPOINT_DESCRIPTOR* UsbStorageFindBulkEndpoint(const USB_PDO_EXTENSION* pdoExt, bool wantIn) {
|
||||
if (!pdoExt) return (const USB_ENDPOINT_DESCRIPTOR*)0;
|
||||
|
||||
@@ -290,7 +287,6 @@ KSTATUS UsbStorageBotCommand(USB_STORAGE_EXTENSION* storage,
|
||||
(USB_STORAGE_SENSE_DATA*)0);
|
||||
}
|
||||
|
||||
// Implements the be32 operation.
|
||||
uint32_t UsbBe32(const uint8_t* p) {
|
||||
return ((uint32_t)p[0] << 24) | ((uint32_t)p[1] << 16) |
|
||||
((uint32_t)p[2] << 8) | (uint32_t)p[3];
|
||||
@@ -310,7 +306,6 @@ void UsbStoreBe16(uint8_t* p, uint16_t v) {
|
||||
p[1] = (uint8_t)v;
|
||||
}
|
||||
|
||||
// Implements the storage Inquiry operation.
|
||||
KSTATUS UsbStorageInquiry(USB_STORAGE_EXTENSION* storage) {
|
||||
if (!storage || !storage->XhciDevice)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -332,7 +327,6 @@ KSTATUS UsbStorageInquiry(USB_STORAGE_EXTENSION* storage) {
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the storage Test Unit Ready operation.
|
||||
KSTATUS UsbStorageTestUnitReady(USB_STORAGE_EXTENSION* storage) {
|
||||
if (!storage || !storage->XhciDevice)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -353,7 +347,6 @@ KSTATUS UsbStorageTestUnitReady(USB_STORAGE_EXTENSION* storage) {
|
||||
return last;
|
||||
}
|
||||
|
||||
// Implements the storage Read Capacity operation.
|
||||
KSTATUS UsbStorageReadCapacity(USB_STORAGE_EXTENSION* storage) {
|
||||
if (!storage || !storage->XhciDevice)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -463,7 +456,6 @@ static KSTATUS UsbStorageSynchronizeCache(USB_STORAGE_EXTENSION* storage) {
|
||||
return NTLSTATUS_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
// Implements the storage Acquire Io operation.
|
||||
void UsbStorageAcquireIo(USB_STORAGE_EXTENSION* storage) {
|
||||
if (!storage) return;
|
||||
XHCI_CONTROLLER* xhci = storage->Device ? (XHCI_CONTROLLER*)storage->Device->Hcd->ControllerContext : (XHCI_CONTROLLER*)0;
|
||||
@@ -472,12 +464,10 @@ void UsbStorageAcquireIo(USB_STORAGE_EXTENSION* storage) {
|
||||
}
|
||||
}
|
||||
|
||||
// Implements the storage Release Io operation.
|
||||
void UsbStorageReleaseIo(USB_STORAGE_EXTENSION* storage) {
|
||||
if (storage) NtlAtomicExchange32(&storage->IoBusy, 0);
|
||||
}
|
||||
|
||||
// Implements the storage Dispatch Read Write operation.
|
||||
KSTATUS UsbStorageDispatchReadWrite(DEVICE_OBJECT* device, IRP* irp) {
|
||||
if (!device || !irp)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -608,7 +598,6 @@ KSTATUS XhciAllocateMassStorageMemory(XHCI_CONTROLLER* xhci, XHCI_DEVICE* dev) {
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the configure Mass Storage Endpoints operation.
|
||||
KSTATUS XhciConfigureMassStorageEndpoints(XHCI_CONTROLLER* xhci, XHCI_DEVICE* dev) {
|
||||
if (!dev->MassCandidate)
|
||||
return NTLSTATUS_SUCCESS;
|
||||
@@ -687,7 +676,6 @@ uint8_t UsbFindFreeDiskIndex(void) {
|
||||
return 0xFFu;
|
||||
}
|
||||
|
||||
// Implements the storage Register Disk operation.
|
||||
KSTATUS UsbStorageRegisterDisk(USB_STORAGE_EXTENSION* storage) {
|
||||
if (!storage || storage->BlockSize != USB_STORAGE_SECTOR_SIZE || storage->BlockCount == 0)
|
||||
return NTLSTATUS_NOT_SUPPORTED;
|
||||
@@ -731,7 +719,6 @@ KSTATUS UsbStorageRegisterDisk(USB_STORAGE_EXTENSION* storage) {
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the storage Start Device operation.
|
||||
static KSTATUS UsbStorageStartDevice(DEVICE_OBJECT* device, USB_STORAGE_EXTENSION* storage) {
|
||||
if (!device || !storage || !storage->InterfacePdo || !storage->Device)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -849,7 +836,6 @@ fail:
|
||||
return st;
|
||||
}
|
||||
|
||||
// Implements the storage Disk Pnp operation.
|
||||
static KSTATUS UsbStorageDiskPnp(DEVICE_OBJECT* device, IRP* irp, USB_STORAGE_EXTENSION* storage, IO_PNP_MINOR_FUNCTION minor) {
|
||||
if (!device || !irp || !storage)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -900,7 +886,6 @@ static KSTATUS UsbStorageDiskPnp(DEVICE_OBJECT* device, IRP* irp, USB_STORAGE_EX
|
||||
}
|
||||
}
|
||||
|
||||
// Implements the storage Interface Pnp operation.
|
||||
static KSTATUS UsbStorageInterfacePnp(DEVICE_OBJECT* device, IRP* irp, USB_STORAGE_EXTENSION* storage, IO_PNP_MINOR_FUNCTION minor) {
|
||||
if (!device || !irp || !storage)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -978,7 +963,6 @@ static KSTATUS UsbStorageInterfacePnp(DEVICE_OBJECT* device, IRP* irp, USB_STORA
|
||||
}
|
||||
}
|
||||
|
||||
// Implements the storage Dispatch Pnp operation.
|
||||
KSTATUS UsbStorageDispatchPnp(DEVICE_OBJECT* device, IRP* irp) {
|
||||
if (!device || !irp)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -998,7 +982,6 @@ KSTATUS UsbStorageDispatchPnp(DEVICE_OBJECT* device, IRP* irp) {
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
// Implements the storage Add Device operation.
|
||||
KSTATUS UsbStorageAddDevice(DRIVER_OBJECT* driver, DEVICE_OBJECT* physicalDeviceObject) {
|
||||
if (!driver || !physicalDeviceObject || physicalDeviceObject->Type != DeviceObjectPhysical)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
Reference in new issue
Block a user