Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:KIP1

From ReverseEngineering.wiki
Format
Vendor Nintendo
Magic 4B 49 50 31 ("KIP1") at offset 0; container "INI1"
Extensions .kip1, .kip
Endianness little
On this wiki Facts · Code · Notes · Topics

Nintendo Switch kernel initial process (KIP1): a 0x100-byte header with the magic KIP1, a 12-byte name, program id, priority, core, flags and three or more LZ4-compressed segments (.text, .rodata, .data) plus the 0x20-entry kernel capability array; the INI1 container packs several KIPs for the boot-time process list.

Overview

A KIP1 is a process that the kernel itself starts at boot (loader, process manager, fs, ncm, sm and similar system modules), before the file system exists, so its loading information is in its own header instead of an Format:NPDM. Several KIP1 files are bundled in an INI1 container (header: magic INI1, total size, process count, 4 reserved bytes, then the KIPs back to back). It is the sibling of Format:NSO: segments are LZ4-compressed and the code is AArch64.

Header

See Fact:KIP1/struct/KIP1 header (0x100 bytes). The flags byte at 0x1F: bits 0-2 mean the text, rodata and data segments are compressed, bit 3 a 64-bit process, bit 4 a 64-bit address space, bit 5 uses secure memory, bit 6 immortal; switch-tools' elf2kip starts from 0x7F and clears bits 5 and 6 only when the JSON says so. See Fact:KIP1/enum/KIP1 flags. The kernel capabilities are 32 descriptors at 0x80; their decoding is on Format:NPDM#ACI0 and ACID and in Fact:NPDM/enum/Kernel capability descriptor types. The file size of a KIP1 is 0x100 plus the three compressed segment sizes (hactool kip1_get_size).

Related

Format:NSO, Format:NPDM, Platform:Nintendo Switch.

Code & repositories

See below.

  • https://github.com/switchbrew/switch-tools @ 22756068dd0ed6ff9734c59cb4f99ebd3f62555b · license: ISC
    switch-tools (ISC): src/npdmtool.c (builds NPDM from JSON), src/elf2nso.c (NSO header and segments), src/elf2kip.c (KIP1 header and capability encoding).
    Tested on: source read, not run · checked 2026-10-19; last activity 2024-10-23
  • https://github.com/Atmosphere-NX/Atmosphere @ 6b0c077b4c608a3a2ee712b8dc35fee87ceb62e8 · license: GPL-2.0
    Atmosphere (GPL-2.0-or-later): libmesosphere kern_k_initial_process_reader.hpp (KIP1 header and flags) and kern_k_capabilities.hpp (capability descriptor encoding).
    Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-16; Note: the latest release ships binaries; the wiki links only the source, never the binaries