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
@@ -1,22 +1,57 @@
|
||||
// Public nt-lite DDK interrupt declarations.
|
||||
|
||||
// Kernel interrupt objects and platform source registration.
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <ntlite/status.h>
|
||||
|
||||
typedef struct KE_INTERRUPT KE_INTERRUPT;
|
||||
typedef void (*KE_INTERRUPT_ROUTINE)(void* context);
|
||||
|
||||
typedef struct KE_INTERRUPT_INFO {
|
||||
uint32_t CpuIndex;
|
||||
uint32_t HardwareId;
|
||||
uint32_t Gsi;
|
||||
uint16_t Flags;
|
||||
uint8_t Vector;
|
||||
uint8_t IsMessage;
|
||||
uint64_t Delivered;
|
||||
} KE_INTERRUPT_INFO;
|
||||
|
||||
typedef enum KE_INTERRUPT_MESSAGE_OPERATION {
|
||||
KeInterruptMessageQuiesce = 1,
|
||||
KeInterruptMessageProgram,
|
||||
KeInterruptMessageResume
|
||||
} KE_INTERRUPT_MESSAGE_OPERATION;
|
||||
|
||||
typedef struct NTL_DDK_MSI_MESSAGE {
|
||||
uint64_t Address;
|
||||
uint32_t Data;
|
||||
uint32_t Reserved;
|
||||
} NTL_DDK_MSI_MESSAGE;
|
||||
|
||||
// Only the bus owner programs a device's message source. The interrupt manager
|
||||
// selects CPUs/vectors and coordinates quiescence with this device callback.
|
||||
typedef KSTATUS (*KE_INTERRUPT_MESSAGE_PROGRAM)(void* context,
|
||||
KE_INTERRUPT_MESSAGE_OPERATION operation, const NTL_DDK_MSI_MESSAGE* message);
|
||||
|
||||
// The platform owns GSI routing and ISA overrides; drivers own only their handler.
|
||||
__declspec(dllexport) KSTATUS KeInterruptConnectGsi(uint32_t gsi, uint16_t flags,
|
||||
uint64_t affinity, KE_INTERRUPT_ROUTINE routine, void* context, KE_INTERRUPT** out);
|
||||
__declspec(dllexport) KSTATUS KeInterruptConnectIsa(uint8_t isaIrq, uint16_t sourceFlags, uint64_t affinity,
|
||||
KE_INTERRUPT_ROUTINE routine, void* context, KE_INTERRUPT** out);
|
||||
|
||||
// Allocates one kernel IRQ slot for MSI delivery.
|
||||
__declspec(dllexport) KSTATUS KeIrqAllocateMsiVector(uint8_t* outIrq);
|
||||
|
||||
// Registers a legacy interrupt handler for an IRQ slot.
|
||||
__declspec(dllexport) void KeIrqRegister(uint8_t irq, void (*handler)(void));
|
||||
|
||||
__declspec(dllexport) KSTATUS KeIrqComposeMsiMessage(uint8_t irq, NTL_DDK_MSI_MESSAGE* messageOut);
|
||||
// PCI enables the device's MSI/MSI-X source after reserving the CPU/vector route.
|
||||
__declspec(dllexport) KSTATUS KeInterruptReserveMessage(uint64_t affinity,
|
||||
KE_INTERRUPT_ROUTINE routine, void* context, KE_INTERRUPT** out);
|
||||
__declspec(dllexport) KSTATUS KeInterruptComposeMessage(const KE_INTERRUPT* interrupt,
|
||||
NTL_DDK_MSI_MESSAGE* out);
|
||||
__declspec(dllexport) KSTATUS KeInterruptQuery(const KE_INTERRUPT* interrupt, KE_INTERRUPT_INFO* out);
|
||||
__declspec(dllexport) KSTATUS KeInterruptBindMessageSource(KE_INTERRUPT* interrupt,
|
||||
KE_INTERRUPT_MESSAGE_PROGRAM program, void* context);
|
||||
__declspec(dllexport) KSTATUS KeInterruptActivateMessage(KE_INTERRUPT* interrupt);
|
||||
__declspec(dllexport) KSTATUS KeInterruptSetAffinity(KE_INTERRUPT* interrupt,
|
||||
uint64_t permittedCpuMask);
|
||||
// Bus drivers close a route before disabling its source, serializing migration.
|
||||
__declspec(dllexport) void KeInterruptBeginDisconnect(KE_INTERRUPT* interrupt);
|
||||
// Disconnect waits for active handlers and requires PASSIVE_LEVEL.
|
||||
__declspec(dllexport) void KeInterruptDisconnect(KE_INTERRUPT* interrupt);
|
||||
Reference in new issue
Block a user