redo boot around an explicit system volume and fixed kernel/HAL images, redo volumes and filesystem paths around capabilities instead of drive numbers and kernel CWD state, add a capability/security model with derived and revocable handles and security contexts, add port IPC and rssrv to manage the userspace resource namespace and publish the system volume, move process, dll and path loading to userspace and add process builder syscalls, init now supervises rssrv and the session process, redo the syscall ABI around request structs and four arguments, add a volume manager and proper partition arrival/removal handling so FAT and NTFS mount dynamically, clean up the HAL/DDK boundary so drivers don't depend on HAL internals, save fpu state properly now, the serial driver doesn't hang on a missing port, fix AHCI startup races, fix timeout accounting, fix shared mmap writeback, more smoke tests
This commit is contained in:
1 parent
4add6789ba
commit
f882d339fb
232 files changed
+20934
-8898
No files matched your search
@@ -6,6 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <intrin.h>
|
||||
#include <ntlite/syscall.h>
|
||||
#include <ntlite/path.h>
|
||||
|
||||
#include "doom_audio.h"
|
||||
#include "PureDOOM.h"
|
||||
@@ -212,12 +213,12 @@ static DOOM_AUDIO_STATE g_doomAudio;
|
||||
|
||||
// Writes one complete diagnostic line to the process console.
|
||||
static void DoomAudioPrint(const char* text) {
|
||||
SYS_WRITE_CONSOLE_REQUEST request = { SysSvFromCstr(text) };
|
||||
SYS_WRITE_CONSOLE_REQUEST request = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(text) };
|
||||
(void)SysWriteConsole(&request);
|
||||
}
|
||||
|
||||
// Opens the default available native render endpoint.
|
||||
static KSTATUS DoomAudioFindEndpoint(uint64_t* endpointIdOut) {
|
||||
static KSTATUS DoomAudioFindEndpoint(uint32_t* endpointIdOut) {
|
||||
SYS_AUDIO_ENDPOINT_INFO endpoints[SYS_AUDIO_MAX_ENDPOINTS];
|
||||
SYS_AUDIO_ENUMERATE_ENDPOINTS_REQUEST request;
|
||||
uint32_t count = 0;
|
||||
@@ -278,13 +279,9 @@ static KSTATUS DoomAudioMapSoundFont(void** dataOut, uint32_t* sizeOut) {
|
||||
*dataOut = NULL;
|
||||
*sizeOut = 0;
|
||||
|
||||
SYS_OPEN_FILE_REQUEST open = SysMakeOpenFileRequest(
|
||||
SysSvFromCstr(DOOM_AUDIO_SOUNDFONT_PATH),
|
||||
SYS_FILE_ACCESS_QUERY | SYS_FILE_ACCESS_READ,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
&fileHandle);
|
||||
status = SysOpenFile(&open);
|
||||
status = NtlOpenFile(SysSvFromCstr(DOOM_AUDIO_SOUNDFONT_PATH),
|
||||
SYS_FILE_ACCESS_QUERY | SYS_FILE_ACCESS_READ,
|
||||
SYS_FILE_OPEN_EXISTING, SYS_FILE_FLAG_NONE, &fileHandle);
|
||||
if (status != NTLSTATUS_SUCCESS)
|
||||
return status;
|
||||
|
||||
@@ -296,15 +293,21 @@ static KSTATUS DoomAudioMapSoundFont(void** dataOut, uint32_t* sizeOut) {
|
||||
return status == NTLSTATUS_SUCCESS ? NTLSTATUS_INVALID_PARAMETER : status;
|
||||
}
|
||||
|
||||
status = SysCreateFileMapping(fileHandle, SYS_VM_READ, SYS_MAP_FLAG_NONE,
|
||||
fileSize, &mappingHandle);
|
||||
SYS_CREATE_FILE_MAPPING_REQUEST createMapping = {
|
||||
sizeof(SYS_CREATE_FILE_MAPPING_REQUEST), fileHandle, SYS_VM_READ,
|
||||
SYS_MAP_FLAG_NONE, fileSize, &mappingHandle
|
||||
};
|
||||
status = SysCreateFileMapping(&createMapping);
|
||||
if (status != NTLSTATUS_SUCCESS || !mappingHandle) {
|
||||
(void)SysCloseHandle(fileHandle);
|
||||
return status == NTLSTATUS_SUCCESS ? NTLSTATUS_FAILURE : status;
|
||||
}
|
||||
|
||||
status = SysMapFile(mappingHandle, 0, (size_t)fileSize,
|
||||
SYS_MAP_ACCESS_READ, SYS_MAP_FLAG_NONE, &base);
|
||||
SYS_MAP_FILE_REQUEST mapFile = {
|
||||
sizeof(SYS_MAP_FILE_REQUEST), mappingHandle, SYS_MAP_ACCESS_READ,
|
||||
SYS_MAP_FLAG_NONE, 0, (size_t)fileSize, &base
|
||||
};
|
||||
status = SysMapFile(&mapFile);
|
||||
(void)SysCloseHandle(mappingHandle);
|
||||
(void)SysCloseHandle(fileHandle);
|
||||
if (status != NTLSTATUS_SUCCESS || !base)
|
||||
@@ -695,7 +698,7 @@ static void DoomAudioReleaseResources(void) {
|
||||
|
||||
// Starts one process-owned audio stream and its exclusive producer thread.
|
||||
void DoomAudioStart(void) {
|
||||
uint64_t endpointId = 0;
|
||||
uint32_t endpointId = 0;
|
||||
uint32_t streamHandle = 0;
|
||||
KSTATUS status;
|
||||
|
||||
@@ -739,6 +742,7 @@ void DoomAudioStart(void) {
|
||||
|
||||
SYS_CREATE_THREAD_REQUEST thread;
|
||||
memset(&thread, 0, sizeof(thread));
|
||||
thread.Size = sizeof(thread);
|
||||
thread.Entry = (uintptr_t)DoomAudioWorker;
|
||||
thread.Priority = DOOM_AUDIO_WORKER_PRIORITY;
|
||||
thread.ThreadHandleOut = &g_doomAudio.WorkerHandle;
|
||||
|
||||
Reference in new issue
Block a user