introduce a stable NTL_DDK driver ABI to replace direct HAL_API and kernel-header access in drivers, add code/kernel/io_ddk.c and code/public/ntlite/ddk/ headers, change DriverEntry to take (const NTL_DDK*, NTL_DRIVER_INIT*), update kmain to build the DDK once via IoInitializeDdk/IoGetDdk and hand it to both boot and runtime drivers, downgrade code/public/ntlite/ddi/io_driver.h to a legacy I/O model header pulling from ntlite/ddk instead of kernel internals, move code/third_party/lwip into code/drivers/net/lwip/third_party, fix up lwip_sources.txt and build.c include paths to match, split build.c's single CFLAGS macro into COMMON/KERNEL/USER/BOOT/DRIVER cflags.

This commit is contained in:
maksw committed 2026-07-01 23:19:11 +02:00
1 parent 08329516ba
commit 485a6bbfe7
385 files changed
+1822 -1079

No files matched your search

+5 -5
View File
@@ -87,7 +87,7 @@ static KSTATUS UsbHubEnumerateRootPortWithRetries(USB_HUB_EXTENSION* hub,
DbgPrint("usb-hub: root port %u enumeration attempt %u failed st=0x%x; retrying\n",
port, attempt, last);
UsbDelayUs(xhci->Hal, 50000);
UsbDelayUs(xhci->Ddk, 50000);
}
if (UsbHubRootPortConnected(xhci, port)) {
@@ -346,7 +346,7 @@ static KSTATUS UsbHubResetExternalPort(USB_HUB_EXTENSION* hub, uint8_t port, uin
USB_HUB_PORT_STATUS ps;
memset(&ps, 0, sizeof(ps));
for (uint32_t i = 0; i < 500u; i++) {
UsbDelayUs(((XHCI_CONTROLLER*)hub->Hcd->ControllerContext)->Hal, 1000u);
UsbDelayUs(((XHCI_CONTROLLER*)hub->Hcd->ControllerContext)->Ddk, 1000u);
st = UsbHubGetPortStatus(hub, port, &ps);
if (!KSUCCESS(st))
return st;
@@ -416,7 +416,7 @@ static void UsbHubHandleExternalPortChange(USB_HUB_EXTENSION* hub, uint8_t port)
hub->ChildSlot[port] = USB_HUB_PORT_ENUMERATING;
hub->ChildPortState[port] = UsbHubPortConnectedDebounce;
UsbDelayUs(((XHCI_CONTROLLER*)hub->Hcd->ControllerContext)->Hal, 30000u);
UsbDelayUs(((XHCI_CONTROLLER*)hub->Hcd->ControllerContext)->Ddk, 30000u);
uint8_t speed = 0;
hub->ChildPortState[port] = UsbHubPortResetting;
@@ -504,7 +504,7 @@ static void UsbHubHandleRootPortChange(USB_HUB_EXTENSION* hub, uint8_t port) {
hub->RootPortSlot[port] = USB_HUB_PORT_ENUMERATING;
hub->RootPortState[port] = UsbHubPortConnectedDebounce;
UsbDelayUs(xhci->Hal, 30000);
UsbDelayUs(xhci->Ddk, 30000);
portsc = XhciRead32(xhci->Op, XhciPortReg(port));
if (!(portsc & XHCI_PORTSC_CCS)) {
UsbHubClearRootPortFailure(hub, port);
@@ -806,7 +806,7 @@ static KSTATUS UsbHubStartExternalDevice(DEVICE_OBJECT* device, USB_HUB_EXTENSIO
for (uint8_t port = 1; port <= hub->PortCount; port++)
(void)UsbHubSetPortFeature(hub, port, USB_HUB_PORT_FEAT_POWER);
UsbDelayUs(((XHCI_CONTROLLER*)hub->Hcd->ControllerContext)->Hal,
UsbDelayUs(((XHCI_CONTROLLER*)hub->Hcd->ControllerContext)->Ddk,
(uint32_t)hub->PowerOnToPowerGoodMs * 1000u);
st = KeSemaphoreCreate(0, 0x7fffffff, &hub->WorkerSemaphore);