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
@@ -9,6 +9,7 @@
|
||||
#include <string.h>
|
||||
#include <intrin.h>
|
||||
#include <ntlite/syscall.h>
|
||||
#include <ntlite/path.h>
|
||||
#include "bink.h"
|
||||
|
||||
#define VIDEO_USAGE "usage: video <file.bk2>\n" \
|
||||
@@ -17,13 +18,13 @@
|
||||
|
||||
static void print_span(const char* s, size_t len) {
|
||||
if (!s || !len) return;
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromParts(s, len) };
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromParts(s, len) };
|
||||
SysWriteConsole(&req);
|
||||
}
|
||||
|
||||
static void print(const char* s) {
|
||||
if (!s) return;
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { SysSvFromCstr(s) };
|
||||
SYS_WRITE_CONSOLE_REQUEST req = { sizeof(SYS_WRITE_CONSOLE_REQUEST), SysSvFromCstr(s) };
|
||||
SysWriteConsole(&req);
|
||||
}
|
||||
|
||||
@@ -158,12 +159,8 @@ static const char* path_to_cstr(SYS_STRING_VIEW path, char* out, size_t outSize)
|
||||
}
|
||||
|
||||
static uint32_t open_file_view(SYS_STRING_VIEW path, uint32_t* handleOut) {
|
||||
SYS_OPEN_FILE_REQUEST req = SysMakeOpenFileRequest(path,
|
||||
SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING,
|
||||
SYS_FILE_FLAG_NONE,
|
||||
handleOut);
|
||||
return SysOpenFile(&req);
|
||||
return NtlOpenFile(path, SYS_FILE_ACCESS_READ | SYS_FILE_ACCESS_QUERY,
|
||||
SYS_FILE_OPEN_EXISTING, SYS_FILE_FLAG_NONE, handleOut);
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
@@ -188,7 +185,7 @@ int main(void) {
|
||||
print("video: failed to open input file: ");
|
||||
print(path_to_cstr(pathView, pathBuf, sizeof(pathBuf)));
|
||||
print("\n");
|
||||
fail_status("SysOpenFile", status);
|
||||
fail_status("NtlOpenFile", status);
|
||||
}
|
||||
|
||||
uint64_t fileSize = 0;
|
||||
@@ -204,15 +201,22 @@ int main(void) {
|
||||
}
|
||||
|
||||
uint32_t mapping = 0;
|
||||
status = SysCreateFileMapping(file, SYS_VM_READ, SYS_MAP_FLAG_NONE, fileSize, &mapping);
|
||||
SYS_CREATE_FILE_MAPPING_REQUEST createMapping = {
|
||||
sizeof(SYS_CREATE_FILE_MAPPING_REQUEST), file, SYS_VM_READ,
|
||||
SYS_MAP_FLAG_NONE, fileSize, &mapping
|
||||
};
|
||||
status = SysCreateFileMapping(&createMapping);
|
||||
if (status != NTLSTATUS_SUCCESS || !mapping) {
|
||||
SysCloseHandle(file);
|
||||
fail_status("SysCreateFileMapping", status);
|
||||
}
|
||||
|
||||
void* buf = 0;
|
||||
status = SysMapFile(mapping, 0, (size_t)fileSize,
|
||||
SYS_MAP_ACCESS_READ, SYS_MAP_FLAG_NONE, &buf);
|
||||
SYS_MAP_FILE_REQUEST mapFile = {
|
||||
sizeof(SYS_MAP_FILE_REQUEST), mapping, SYS_MAP_ACCESS_READ,
|
||||
SYS_MAP_FLAG_NONE, 0, (size_t)fileSize, &buf
|
||||
};
|
||||
status = SysMapFile(&mapFile);
|
||||
if (status != NTLSTATUS_SUCCESS || !buf) {
|
||||
SysCloseHandle(mapping);
|
||||
SysCloseHandle(file);
|
||||
|
||||
Reference in new issue
Block a user