From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:NPDM" |
|---|
| claim | "Bit fields of the kernel capability descriptors (bit numbers above the trailing-ones tag plus its terminating 0): core/priority: lowest priority bits 4-9, highest priority 10-15, min core 16-23, max core 24-31; syscall mask: 24-bit mask at bits 5-28, index at 29-31; map range: 24-bit page address at 7-30, read-only bit 31, followed by a size descriptor (20-bit pages at 7-26, normal-memory bit 31); map IO page: 24-bit address at 8-31; interrupt pair: two 10-bit ids at 12-21 and 22-31 (0x3FF is padding); program type: 3 bits at 14-16; kernel version: minor 4 bits at 15-18, major 13 bits at 19-31; handle table size: 10 bits at 16-25; debug flags: allow debug bit 17, force debug prod bit 18, force debug bit 19." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:NPDM" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "kernel parses each capability descriptor of a process" |
|---|
| effect | "descriptor type from trailing ones; fields extracted with the bit ranges in the claim" |
|---|
| condition | "bit positions derived from the Field<index,count> declarations (each field starts after the previous one; the id field is n+1 bits wide)" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct CorePriority, SyscallMask, MapRange, MapRangeSize, MapIoPage, MapRegion (three 6-bit region types with a read-only bit each, from bit 11), InterruptPair, ProgramType, KernelVersion, HandleTable, DebugFlags with their DEFINE_FIELD widths; bit positions are my own sums of those widths. MapRegion RegionType values: 0 NoMapping, 1 KernelTraceBuffer, 2 OnMemoryBootImage, 3 DTB (lines 118-123)." |
|---|
| repo | "Atmosphere-NX/Atmosphere" |
|---|
| commit | "6b0c077b4c608a3a2ee712b8dc35fee87ceb62e8" |
|---|
| path | "libraries/libmesosphere/include/mesosphere/kern_k_capabilities.hpp" |
|---|
| lines | "69-175" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Kernel capability descriptor fields" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T01:20:25.778Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T04:13:46.531Z" |
|---|
| result | "confirmed" |
|---|
| method | "Recomputed all bit ranges from the CapabilityType enum values and DEFINE_FIELD widths in kern_k_capabilities.hpp at the cited commit; all match. Under MESOSPHERE_ENABLE_LARGE_PHYSICAL_ADDRESS_CAPABILITIES bits 27-30 of the size descriptor are AddressHigh, otherwise reserved." |
|---|
|
|
|---|