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:
maksw committed 2026-10-28 15:18:43 +01:00
1 parent d36f19509c
commit 36eef8f58d
696 files changed
+147281 -7530

No files matched your search

-19
View File
@@ -11,7 +11,6 @@ DRIVER_OBJECT gUsbBusDriver;
static bool gUsbBusModelReady;
static uint8_t gUsbNextControllerIndex;
// Implements the device Destroy operation.
static void UsbDeviceDestroy(OBJECT* object) {
USB_DEVICE* dev = (USB_DEVICE*)object;
if (dev->RemoveLockReady) {
@@ -36,22 +35,18 @@ static void UsbPipeDestroy(OBJECT* object) {
}
}
// Implements the reference Device operation.
void UsbReferenceDevice(USB_DEVICE* dev) {
if (dev) ObReferenceObject(&dev->Header);
}
// Implements the dereference Device operation.
void UsbDereferenceDevice(USB_DEVICE* dev) {
if (dev) ObDereferenceObject(&dev->Header);
}
// Implements the reference Pipe operation.
void UsbReferencePipe(USB_PIPE* pipe) {
if (pipe) ObReferenceObject(&pipe->Header);
}
// Implements the dereference Pipe operation.
void UsbDereferencePipe(USB_PIPE* pipe) {
if (pipe) ObDereferenceObject(&pipe->Header);
}
@@ -111,12 +106,10 @@ KSTATUS UsbCreatePipe(USB_DEVICE* dev,
return NTLSTATUS_SUCCESS;
}
// Implements the id From Buffer operation.
static SYS_STRING_VIEW UsbIdFromBuffer(char* buf) {
return SysSvFromCstr(buf);
}
// Implements the id Put Char operation.
static void UsbIdPutChar(char* buf, size_t cap, size_t* pos, char ch) {
if (!buf || !pos || cap == 0)
return;
@@ -129,7 +122,6 @@ static void UsbIdPutChar(char* buf, size_t cap, size_t* pos, char ch) {
buf[cap - 1] = '\0';
}
// Implements the id Append Literal operation.
static void UsbIdAppendLiteral(char* buf, size_t cap, size_t* pos, const char* text) {
if (!text)
return;
@@ -137,7 +129,6 @@ static void UsbIdAppendLiteral(char* buf, size_t cap, size_t* pos, const char* t
UsbIdPutChar(buf, cap, pos, *text++);
}
// Implements the id Append Hex operation.
static void UsbIdAppendHex(char* buf, size_t cap, size_t* pos, uint32_t value, uint8_t digits) {
static const char kHex[] = "0123456789ABCDEF";
while (digits) {
@@ -146,7 +137,6 @@ static void UsbIdAppendHex(char* buf, size_t cap, size_t* pos, uint32_t value, u
}
}
// Implements the format Vid Pid Rev operation.
static void UsbFormatVidPidRev(char* buf, size_t cap, uint16_t vid, uint16_t pid, uint16_t rev) {
size_t pos = 0;
if (cap) buf[0] = '\0';
@@ -158,7 +148,6 @@ static void UsbFormatVidPidRev(char* buf, size_t cap, uint16_t vid, uint16_t pid
UsbIdAppendHex(buf, cap, &pos, rev, 4);
}
// Implements the format Vid Pid operation.
static void UsbFormatVidPid(char* buf, size_t cap, uint16_t vid, uint16_t pid) {
size_t pos = 0;
if (cap) buf[0] = '\0';
@@ -168,7 +157,6 @@ static void UsbFormatVidPid(char* buf, size_t cap, uint16_t vid, uint16_t pid) {
UsbIdAppendHex(buf, cap, &pos, pid, 4);
}
// Implements the format Vid Pid Mi operation.
static void UsbFormatVidPidMi(char* buf, size_t cap, uint16_t vid, uint16_t pid, uint8_t mi) {
size_t pos = 0;
if (cap) buf[0] = '\0';
@@ -180,7 +168,6 @@ static void UsbFormatVidPidMi(char* buf, size_t cap, uint16_t vid, uint16_t pid,
UsbIdAppendHex(buf, cap, &pos, mi, 2);
}
// Implements the format Class Sub Prot operation.
static void UsbFormatClassSubProt(char* buf, size_t cap, uint8_t cls, uint8_t sub, uint8_t proto) {
size_t pos = 0;
if (cap) buf[0] = '\0';
@@ -192,7 +179,6 @@ static void UsbFormatClassSubProt(char* buf, size_t cap, uint8_t cls, uint8_t su
UsbIdAppendHex(buf, cap, &pos, proto, 2);
}
// Implements the format Class operation.
static void UsbFormatClass(char* buf, size_t cap, uint8_t cls) {
size_t pos = 0;
if (cap) buf[0] = '\0';
@@ -200,14 +186,12 @@ static void UsbFormatClass(char* buf, size_t cap, uint8_t cls) {
UsbIdAppendHex(buf, cap, &pos, cls, 2);
}
// Implements the format Composite operation.
static void UsbFormatComposite(char* buf, size_t cap) {
size_t pos = 0;
if (cap) buf[0] = '\0';
UsbIdAppendLiteral(buf, cap, &pos, "USB\\COMPOSITE");
}
// Implements the format Root Hub operation.
static void UsbFormatRootHub(char* buf, size_t cap) {
size_t pos = 0;
if (cap) buf[0] = '\0';
@@ -452,7 +436,6 @@ KSTATUS UsbCreateInterfacePdos(USB_HCD* hcd, XHCI_DEVICE* xdev, DEVICE_OBJECT* p
return NTLSTATUS_SUCCESS;
}
// Implements the reference First Child operation.
static DEVICE_OBJECT* UsbReferenceFirstChild(DEVICE_OBJECT* parent) {
if (!parent) return (DEVICE_OBJECT*)0;
uintptr_t flags = KeAcquireSpinlock(&parent->Lock);
@@ -463,7 +446,6 @@ static DEVICE_OBJECT* UsbReferenceFirstChild(DEVICE_OBJECT* parent) {
return child;
}
// Implements the send Pnp If Alive operation.
static void UsbSendPnpIfAlive(DEVICE_OBJECT* pdo, IO_PNP_MINOR_FUNCTION minor) {
if (!pdo || pdo->DeletePending)
return;
@@ -550,7 +532,6 @@ KSTATUS UsbSubmitUrbSync(DEVICE_OBJECT* target, USB_URB* urb) {
return KSUCCESS(st) ? urb->Status : st;
}
// Implements the async Urb Irp Complete operation.
static void UsbAsyncUrbIrpComplete(IRP* irp, void* context) {
(void)context;
IoFreeIrp(irp);