replace ad hoc driver loading with a proper driver manager, new DDK, new PnP manager with device matching, asynchronous startup, resource ownership and removal, add shared PCI capability helpers, replace typed, rigid services with a proper service manager, implement proper system shutdown and restart, shutting down unloads drivers and shuts down services, add simple power button, remove heavyweight boot self-tests and SMP stress runs, add monotonic timestamps to kernel debug output, fruitless USB and PS/2 fixes, make test builds opt in.
This commit is contained in:
1 parent
c0ad63c27f
commit
d36f19509c
160 files changed
+6563
-7366
No files matched your search
@@ -13,6 +13,9 @@ static SPINLOCK gDpcLock;
|
||||
static volatile int32_t gDpcInitialized = 0;
|
||||
static volatile int32_t gDpcActive = 0;
|
||||
|
||||
// Bound a single interrupt-exit dispatch so self-requeuing devices yield the CPU.
|
||||
#define KE_DPC_DISPATCH_BUDGET 64u
|
||||
|
||||
// Initializes dpc System.
|
||||
void KeInitializeDpcSystem(void) {
|
||||
LIST_INIT(&gDpcQueue);
|
||||
@@ -83,7 +86,10 @@ void KiDrainDpcQueue(void) {
|
||||
if (oldIrql < DISPATCH_LEVEL)
|
||||
KeRaiseIrql(DISPATCH_LEVEL);
|
||||
|
||||
while (true) {
|
||||
// The xHCI event routine already bounds its own work, but an IRQ stream
|
||||
// can requeue it after every dispatch. Limit the whole drain, too. The
|
||||
// pending queue is picked up at the next timer or device interrupt exit.
|
||||
for (uint32_t dispatched = 0; dispatched < KE_DPC_DISPATCH_BUDGET; dispatched++) {
|
||||
uintptr_t flags = KeAcquireSpinlock(&gDpcLock);
|
||||
LIST_ENTRY* node = KeListPopHeadChecked(&gDpcQueue);
|
||||
if (!node) {
|
||||
|
||||
Reference in new issue
Block a user