HOS Kernel
Eglantine implements the Horizon OS (HOS) kernel and system-service interfaces in software. This is an HLE (high-level emulation) implementation: it models guest-visible behavior rather than running Nintendo's original kernel or system modules.
Architecture
The kernel implementation is centered on KernelCore in src/core/hle/kernel/. It manages emulated processes and threads, per-core schedulers, memory, kernel objects, handles, and execution resources. Guest system calls are implemented in src/core/hle/kernel/svc/.
System services are separate from kernel objects. They expose guest IPC interfaces and are registered and run through the service infrastructure under src/core/hle/service/.
| Subsystem | Implementation | Role |
|---|---|---|
| Processes and threads | k_process.*, k_thread.*, k_scheduler.* | Guest process/thread state and scheduling |
| Memory | k_memory_manager.*, k_page_table*, k_memory_layout.* | Emulated memory layout, mappings, and page management |
| Kernel objects and handles | k_auto_object.*, k_handle_table.*, k_event.*, k_session.* | Guest-visible object lifetime, handles, events, and IPC sessions |
| Synchronization | k_synchronization_object.*, k_condition_variable.*, k_light_lock.*, k_address_arbiter.*, svc/svc_synchronization.cpp | Waitable objects, locks, condition variables, address arbitration, and synchronization system calls |
| System services | service/services.cpp, service/server_manager.*, service/hle_ipc.* | Service registration, server execution, and IPC dispatch |
Services
src/core/hle/service/services.cpp starts service processes including sm (service manager), FS, audio, hid, nvservices, nvnflinger, vi, nifm, bsdsocket, and many others. The implementation is organized by service under src/core/hle/service/.
| Service area | Source path | Scope represented in the emulator |
|---|---|---|
| Service manager | src/core/hle/service/sm/ | Service discovery and registration |
| Filesystem | src/core/hle/service/filesystem/ | Guest filesystem interfaces backed by emulator filesystem implementations |
| Audio | src/core/hle/service/audio/ | Guest audio service interfaces |
| Input | src/core/hle/service/hid/ | Guest HID and controller interfaces |
| Networking | src/core/hle/service/nifm/, src/core/hle/service/sockets/, src/core/hle/service/wlan/, src/core/hle/service/ldn/ | Guest network-management, socket, WLAN, and local-network interfaces |
| Display | src/core/hle/service/vi/, nvnflinger/ | Video-interface and display-layer service interfaces |
Having a service directory or registered service does not mean every command is fully implemented. Some commands are partial or stubbed, and behavior can differ from a Switch. Check the relevant implementation and logs for the specific interface you are investigating.
Synchronization
The kernel models synchronization through kernel objects and SVC implementations. The source includes synchronization objects, events, condition variables, light locks, address arbiters, and system calls for waiting and signaling. Service IPC uses kernel session and event objects where required.
These are emulator-side implementations of guest-visible HOS behavior. Eglantine does not provide host Linux kernel modules corresponding to guest graphics, network, input, or audio drivers.