Skip to main content

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/.

SubsystemImplementationRole
Processes and threadsk_process.*, k_thread.*, k_scheduler.*Guest process/thread state and scheduling
Memoryk_memory_manager.*, k_page_table*, k_memory_layout.*Emulated memory layout, mappings, and page management
Kernel objects and handlesk_auto_object.*, k_handle_table.*, k_event.*, k_session.*Guest-visible object lifetime, handles, events, and IPC sessions
Synchronizationk_synchronization_object.*, k_condition_variable.*, k_light_lock.*, k_address_arbiter.*, svc/svc_synchronization.cppWaitable objects, locks, condition variables, address arbitration, and synchronization system calls
System servicesservice/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 areaSource pathScope represented in the emulator
Service managersrc/core/hle/service/sm/Service discovery and registration
Filesystemsrc/core/hle/service/filesystem/Guest filesystem interfaces backed by emulator filesystem implementations
Audiosrc/core/hle/service/audio/Guest audio service interfaces
Inputsrc/core/hle/service/hid/Guest HID and controller interfaces
Networkingsrc/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
Displaysrc/core/hle/service/vi/, nvnflinger/Video-interface and display-layer service interfaces
HLE coverage

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.

Emulation, not host kernel modules

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.