add ntfs.sys standalone driver target, change default usb vhd layout formatting to ntfs, implement Fat32CreateDir for directory creation support in the fat32 file system driver, add a dedicated HAL serial output endpoint for COM1 writes in hal_serial.c and subscribe serial to HAL text streams, introduce waitable kernel timers with KeTimerCreate, KeTimerSet, and KeTimerCancel alongside spinlock-protected global timer list initialization and scheduler tick tracking, implement SyscallWriteFileAsync system call for asynchronous non-blocking file writes, refactor NetSocketConnect and NetSocketSendTo to use generic SYS_SOCKET_ADDRESS_K structures instead of being hardcoded to IPv4, update gethostbyname and DNS name resolution to support IPv6 parsing via ResolveNameFamily, update tcpserve.exe with -4 and -6 command-line flags to accept and display IPv6 addresses, append size and version headers to all kernel telemetry and statistics structures including SYS_PMM_STATS, SYS_CPU_STATS, and SYS_SCHEDULER_STATS, update winmm timeGetTime to look up high-resolution hardware frequencies via SysGetTickFrequency, integrate 14 native smoke test applications.

This commit is contained in:
maksw committed 2026-06-26 15:18:48 +02:00
1 parent 2c4a68a75f
commit ed3d065abd
156 files changed
+10509 -2643

No files matched your search

+43 -7
View File
@@ -2,8 +2,13 @@
#include "ps2.h"
static KDPC gKeyboardDpc;
static KDPC gMouseDpc;
static volatile bool gKeyboardNextExtended;
static INPUT_KEY_EVENT gKeyboardDpcQueue[KEYBOARD_DPC_QUEUE_SIZE];
static volatile int gKeyboardDpcHead;
static volatile int gKeyboardDpcTail;
static volatile uint8_t gKeyboardDown[256];
static volatile uint8_t gMousePacket[3];
static volatile int gMousePacketIndex;
static PS2_MOUSE_PACKET gMouseDpcQueue[MOUSE_DPC_QUEUE_SIZE];
@@ -121,6 +126,40 @@ static INPUT_KEY Ps2Set1ToKey(uint8_t make, bool extended) {
}
}
// Implements the ps2 Keyboard Dpc Routine operation.
static void Ps2KeyboardDpcRoutine(KDPC* dpc, void* context, void* systemArgument1, void* systemArgument2) {
(void)dpc;
(void)context;
(void)systemArgument1;
(void)systemArgument2;
while (gKeyboardDpcHead != gKeyboardDpcTail) {
INPUT_KEY_EVENT event = gKeyboardDpcQueue[gKeyboardDpcHead];
gKeyboardDpcHead = (gKeyboardDpcHead + 1) & (int)KEYBOARD_DPC_QUEUE_MASK;
KeInputSubmitKey(&event);
}
}
// Implements the ps2 Queue Keyboard Event operation.
static void Ps2QueueKeyboardEvent(INPUT_KEY key, bool pressed) {
if (key >= sizeof(gKeyboardDown))
return;
bool wasDown = gKeyboardDown[key] != 0;
if (pressed == wasDown)
return;
int next = (gKeyboardDpcTail + 1) & (int)KEYBOARD_DPC_QUEUE_MASK;
if (next == gKeyboardDpcHead)
return;
gKeyboardDown[key] = pressed ? 1u : 0u;
gKeyboardDpcQueue[gKeyboardDpcTail].Key = key;
gKeyboardDpcQueue[gKeyboardDpcTail].Pressed = pressed;
gKeyboardDpcTail = next;
KeInsertQueueDpc(&gKeyboardDpc, 0, 0);
}
// Implements the ps2 Keyboard Isr operation.
static void Ps2KeyboardIsr(void) {
uint8_t sc = __inbyte(PS2_DATA);
@@ -137,11 +176,7 @@ static void Ps2KeyboardIsr(void) {
INPUT_KEY key = Ps2Set1ToKey(make, extended);
if (key == INPUT_KEY_NONE) return;
INPUT_KEY_EVENT event = {
.Key = key,
.Pressed = !released,
};
KeInputSubmitKey(&event);
Ps2QueueKeyboardEvent(key, !released);
}
// Implements the ps2 Mouse Dpc Routine operation.
@@ -224,7 +259,7 @@ static void Ps2ControllerEnableInterrupts(void) {
// Implements the ps2 Keyboard Initialize operation.
static void Ps2KeyboardInitialize(void) {
// Enable scanning. If the keyboard is absent, the timeout/ACK failure is
// Enable scanning. If the keyboard is absent, the timeout/ACK failure is
// non-fatal; the IRQ path simply never produces events.
if (!Ps2SendKeyboard(0xF4u))
DbgPrint("ps2: keyboard enable did not ACK\n");
@@ -254,10 +289,11 @@ KSTATUS DriverEntry(const HAL_API* hal) {
KeInputRegisterDevice("ps2-keyboard", 0, &keyboardId);
KeInputRegisterDevice("ps2-mouse", 0, &mouseId);
KeInitializeDpc(&gKeyboardDpc, Ps2KeyboardDpcRoutine, 0);
KeInitializeDpc(&gMouseDpc, Ps2MouseDpcRoutine, 0);
// Keep 8042 IRQ generation disabled while doing polled controller/device
// setup. The old ordering routed IRQ1/IRQ12 first, which let ACK/BAT bytes
// setup. The old ordering routed IRQ1/IRQ12 first, which let ACK/BAT bytes
// race the ISR and get consumed as fake key/mouse input before the polled
// init path could read them.
Ps2ControllerPrepare();