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
@@ -112,6 +112,37 @@ static KSTATUS RssrvConsoleWrite(RSSRV_CONSOLE_STATE* console,
|
||||
return status;
|
||||
}
|
||||
|
||||
// Writes one positioned status line, retaining the console cursor under the
|
||||
// same RSSRV session lock so ordinary writers keep their cursor position.
|
||||
static KSTATUS RssrvConsoleWriteAt(RSSRV_CONSOLE_STATE* console,
|
||||
int32_t x, int32_t y, const char* data,
|
||||
uint32_t length, uint32_t* writtenOut) {
|
||||
if (writtenOut) *writtenOut = 0;
|
||||
if (!console || !data || x < 0 || y < 0 || length > NTL_CONSOLE_WRITE_MAX - 8u)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
for (uint32_t i = 0; i < length; ++i)
|
||||
if ((uint8_t)data[i] > 0x7fu || (uint8_t)data[i] < 0x20u)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
KSTATUS status = RssrvConsoleLock(console);
|
||||
if (!KSUCCESS(status)) return status;
|
||||
SYS_CONSOLE_INFO original;
|
||||
memset(&original, 0, sizeof(original));
|
||||
status = RssrvDisplayQueryConsoleInfo(console->Display, &original);
|
||||
if (KSUCCESS(status))
|
||||
status = RssrvDisplaySetConsoleCursor(console->Display, x, y);
|
||||
if (KSUCCESS(status)) {
|
||||
status = RssrvDisplayWriteConsole(console->Display, data, length);
|
||||
if (KSUCCESS(status) && length) RssrvConsoleChangedLocked(console);
|
||||
KSTATUS restore = RssrvDisplaySetConsoleCursor(console->Display,
|
||||
(int32_t)original.CursorX,
|
||||
(int32_t)original.CursorY);
|
||||
if (KSUCCESS(status)) status = restore;
|
||||
}
|
||||
RssrvConsoleUnlock(console);
|
||||
if (KSUCCESS(status) && writtenOut) *writtenOut = length;
|
||||
return status;
|
||||
}
|
||||
|
||||
// Queries dimensions from the backing display and snapshots RSSRV's console generation.
|
||||
static KSTATUS RssrvConsoleQueryInfo(RSSRV_CONSOLE_STATE* console, NTL_CONSOLE_INFO* infoOut) {
|
||||
if (!console || !infoOut) return NTLSTATUS_INVALID_PARAMETER;
|
||||
@@ -297,6 +328,18 @@ static void RssrvConsoleSessionThread(uintptr_t argument) {
|
||||
(void)RssrvConsoleReply(endpoint, info.MessageId, request.Operation,
|
||||
status, written, 0, 0);
|
||||
break;
|
||||
case NTL_CONSOLE_OP_WRITE_AT:
|
||||
if (request.Data.WriteAt.Length > NTL_CONSOLE_WRITE_MAX - 8u) {
|
||||
status = NTLSTATUS_INVALID_PARAMETER;
|
||||
} else {
|
||||
status = RssrvConsoleWriteAt(console, request.Data.WriteAt.X,
|
||||
request.Data.WriteAt.Y,
|
||||
request.Data.WriteAt.Data,
|
||||
request.Data.WriteAt.Length, &written);
|
||||
}
|
||||
(void)RssrvConsoleReply(endpoint, info.MessageId, request.Operation,
|
||||
status, written, 0, 0);
|
||||
break;
|
||||
case NTL_CONSOLE_OP_QUERY_INFO:
|
||||
status = RssrvConsoleQueryInfo(console, &consoleInfo);
|
||||
(void)RssrvConsoleReply(endpoint, info.MessageId, request.Operation,
|
||||
|
||||
Reference in new issue
Block a user