feat: rename 'ZenithOS' => 'MontaukOS' and fix build system issues

This commit is contained in:
2026-02-28 12:06:18 +01:00
parent 1809ae55e5
commit 83016847b4
136 changed files with 1669 additions and 51769 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#pragma once
#include <Sched/Scheduler.hpp>
namespace Zenith {
namespace Montauk {
// Find the process that owns the I/O ring buffers for a redirected process.
// If proc owns buffers itself (spawned via spawn_redir), returns proc.
// If proc inherited redirection (spawned via spawn from a redirected parent),
+1 -1
View File
@@ -16,7 +16,7 @@
#include "Syscall.hpp"
namespace Zenith {
namespace Montauk {
static void dl_strcpy(char* dst, const char* src, int max) {
int i = 0;
+1 -1
View File
@@ -13,7 +13,7 @@
#include <Memory/Paging.hpp>
#include <Libraries/Memory.hpp>
namespace Zenith {
namespace Montauk {
static int Sys_Open(const char* path) {
return Fs::Vfs::VfsOpen(path);
}
+1 -1
View File
@@ -16,7 +16,7 @@
#include "Common.hpp"
#include "../Libraries/flanterm/src/flanterm.h"
namespace Zenith {
namespace Montauk {
static void Sys_FbInfo(FbInfo* out) {
if (out == nullptr) return;
+1 -1
View File
@@ -10,7 +10,7 @@
#include <Memory/HHDM.hpp>
#include <Memory/PageFrameAllocator.hpp>
namespace Zenith {
namespace Montauk {
// Per-process heap allocation tracking (separate from Process struct to avoid bloating it)
struct HeapAlloc {
+3 -3
View File
@@ -9,16 +9,16 @@
#include "Syscall.hpp"
namespace Zenith {
namespace Montauk {
static void Sys_GetInfo(SysInfo* outInfo) {
if (outInfo == nullptr) return;
// Copy strings into fixed-size arrays (user-accessible)
const char* name = "ZenithOS";
const char* name = "MontaukOS";
const char* ver = "0.1.0";
for (int i = 0; name[i]; i++) outInfo->osName[i] = name[i];
outInfo->osName[8] = '\0';
outInfo->osName[9] = '\0';
for (int i = 0; ver[i]; i++) outInfo->osVersion[i] = ver[i];
outInfo->osVersion[5] = '\0';
+1 -1
View File
@@ -12,7 +12,7 @@
#include "Syscall.hpp"
#include "Common.hpp"
namespace Zenith {
namespace Montauk {
static int Sys_SpawnRedir(const char* path, const char* args) {
int childPid = Sched::Spawn(path, args);
+1 -1
View File
@@ -10,7 +10,7 @@
#include "Common.hpp"
namespace Zenith {
namespace Montauk {
static bool Sys_IsKeyAvailable() {
auto* proc = Sched::GetCurrentProcessPtr();
if (proc && proc->redirected) {
+1 -1
View File
@@ -9,7 +9,7 @@
#include "Syscall.hpp"
namespace Zenith {
namespace Montauk {
static void Sys_MemStats(MemStats* out) {
if (out == nullptr) return;
+1 -1
View File
@@ -9,7 +9,7 @@
#include "Syscall.hpp"
namespace Zenith {
namespace Montauk {
static void Sys_MouseState(MouseState* out) {
if (out == nullptr) return;
+1 -1
View File
@@ -19,7 +19,7 @@
#include "Syscall.hpp"
namespace Zenith {
namespace Montauk {
static uint16_t g_pingSeq = 0;
static constexpr uint16_t PING_ID = 0x2E01; // "ZE"
+1 -1
View File
@@ -9,7 +9,7 @@
#include <Efi/UEFI.hpp>
#include <Memory/Paging.hpp>
namespace Zenith {
namespace Montauk {
static void Sys_Reset() {
if (Efi::g_ResetSystem) {
+1 -1
View File
@@ -15,7 +15,7 @@
#include "Syscall.hpp"
#include "WinServer.hpp"
namespace Zenith {
namespace Montauk {
static void Sys_Exit(int exitCode) {
(void)exitCode;
Sched::ExitProcess();
+1 -1
View File
@@ -7,7 +7,7 @@
#pragma once
#include <cstdint>
namespace Zenith {
namespace Montauk {
// ---- Random number generation ----
// Uses RDTSC mixed with xorshift64* PRNG for entropy.
+1 -1
View File
@@ -33,7 +33,7 @@
// Assembly entry point
extern "C" void SyscallEntry();
namespace Zenith {
namespace Montauk {
// ---- Dispatch ----
+2 -2
View File
@@ -1,6 +1,6 @@
/*
* Syscall.hpp
* ZenithOS syscall definitions -- shared between kernel and programs
* MontaukOS syscall definitions -- shared between kernel and programs
* Copyright (c) 2025 Daniel Hammer
*/
@@ -8,7 +8,7 @@
#include <cstdint>
#include <cstddef>
namespace Zenith {
namespace Montauk {
// Syscall numbers
+1 -1
View File
@@ -10,7 +10,7 @@
#include "Common.hpp"
namespace Zenith {
namespace Montauk {
static void Sys_Print(const char* text) {
auto* proc = Sched::GetCurrentProcessPtr();
+1 -1
View File
@@ -10,7 +10,7 @@
#include "Syscall.hpp"
namespace Zenith {
namespace Montauk {
static uint64_t Sys_GetTicks() {
return Timekeeping::GetTicks();
}
+5 -5
View File
@@ -98,7 +98,7 @@ namespace WinServer {
return 0;
}
int Poll(int windowId, int callerPid, Zenith::WinEvent* outEvent) {
int Poll(int windowId, int callerPid, Montauk::WinEvent* outEvent) {
if (windowId < 0 || windowId >= MaxWindows) return -1;
WindowSlot& slot = g_slots[windowId];
if (!slot.used || slot.ownerPid != callerPid) return -1;
@@ -110,11 +110,11 @@ namespace WinServer {
return 1;
}
int Enumerate(Zenith::WinInfo* outArray, int maxCount) {
int Enumerate(Montauk::WinInfo* outArray, int maxCount) {
int count = 0;
for (int i = 0; i < MaxWindows && count < maxCount; i++) {
if (!g_slots[i].used) continue;
Zenith::WinInfo& info = outArray[count];
Montauk::WinInfo& info = outArray[count];
info.id = i;
info.ownerPid = g_slots[i].ownerPid;
for (int j = 0; j < 64; j++) info.title[j] = g_slots[i].title[j];
@@ -151,7 +151,7 @@ namespace WinServer {
return userVa;
}
int SendEvent(int windowId, const Zenith::WinEvent* event) {
int SendEvent(int windowId, const Montauk::WinEvent* event) {
if (windowId < 0 || windowId >= MaxWindows) return -1;
WindowSlot& slot = g_slots[windowId];
if (!slot.used) return -1;
@@ -209,7 +209,7 @@ namespace WinServer {
g_uiScale = scale;
// Broadcast scale event to all active windows
Zenith::WinEvent ev;
Montauk::WinEvent ev;
memset(&ev, 0, sizeof(ev));
ev.type = 4;
ev.scale.scale = scale;
+4 -4
View File
@@ -24,7 +24,7 @@ namespace WinServer {
uint64_t ownerVa; // VA in owner's address space
uint64_t desktopVa; // VA in desktop's address space (0 = not yet mapped)
int desktopPid; // PID of the process that mapped it
Zenith::WinEvent events[MaxEvents];
Montauk::WinEvent events[MaxEvents];
int eventHead, eventTail;
bool dirty;
};
@@ -33,10 +33,10 @@ namespace WinServer {
uint64_t& heapNext, uint64_t& outVa);
int Destroy(int windowId, int callerPid);
int Present(int windowId, int callerPid);
int Poll(int windowId, int callerPid, Zenith::WinEvent* outEvent);
int Enumerate(Zenith::WinInfo* outArray, int maxCount);
int Poll(int windowId, int callerPid, Montauk::WinEvent* outEvent);
int Enumerate(Montauk::WinInfo* outArray, int maxCount);
uint64_t Map(int windowId, int callerPid, uint64_t callerPml4, uint64_t& heapNext);
int SendEvent(int windowId, const Zenith::WinEvent* event);
int SendEvent(int windowId, const Montauk::WinEvent* event);
int Resize(int windowId, int callerPid, uint64_t ownerPml4, int newW, int newH,
uint64_t& heapNext, uint64_t& outVa);
void CleanupProcess(int pid);
+1 -1
View File
@@ -12,7 +12,7 @@
#include "Syscall.hpp"
#include "WinServer.hpp"
namespace Zenith {
namespace Montauk {
static int Sys_WinCreate(const char* title, int w, int h, WinCreateResult* result) {
if (result == nullptr || title == nullptr) return -1;
+1 -1
View File
@@ -248,7 +248,7 @@ extern "C" void kmain() {
Fs::Vfs::RegisterDrive(0, &ramdiskDriver);
Hal::LoadTSS();
Zenith::InitializeSyscalls();
Montauk::InitializeSyscalls();
Sched::Initialize();
+1 -1
View File
@@ -124,7 +124,7 @@ namespace Memory {
}
}
void PageFrameAllocator::GetStats(Zenith::MemStats* out) {
void PageFrameAllocator::GetStats(Montauk::MemStats* out) {
if (!out) return;
Lock.Acquire();
uint64_t freeBytes = 0;
+1 -1
View File
@@ -29,7 +29,7 @@ public:
void Free(void* ptr);
void Free(void* ptr, int n);
void GetStats(Zenith::MemStats* out);
void GetStats(Montauk::MemStats* out);
};
extern PageFrameAllocator* g_pfa;
+1 -1
View File
@@ -50,7 +50,7 @@ namespace Sched {
uint8_t* inBuf = nullptr; // 4KB ring: parent writes, child reads (getchar)
uint32_t inHead = 0;
uint32_t inTail = 0;
Zenith::KeyEvent keyBuf[64]; // parent injects, child reads (getkey/iskeyavailable)
Montauk::KeyEvent keyBuf[64]; // parent injects, child reads (getkey/iskeyavailable)
uint32_t keyHead = 0;
uint32_t keyTail = 0;
static constexpr uint32_t IoBufSize = 4096;
+1 -1
View File
@@ -76,7 +76,7 @@ namespace Kt {
bool *glyph = &fbctx->font_bool[c->c * fbctx->font_height * fbctx->font_width];
// Only ROTATE_0 is used in ZenithOS
// Only ROTATE_0 is used in MontaukOS
volatile uint32_t *dest = fbctx->framebuffer + x + y * (fbctx->pitch / 4);
size_t stride = fbctx->pitch / 4;