Skip to content
jc-rs
GitHub

proc-mtrr

--proc-mtrrv1.0.0

Converts `/proc/mtrr` file to JSON

Linuxfileslurpable
$ jc-rs /proc/mtrr

A real pair

From the reference corpus (linux-proc/mtrr.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

/proc/mtrrlinux-proc
reg00: base=0x000000000 (    0MB), size= 2048MB, count=1: write-back
reg01: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x100000000 ( 4096MB), size= 4096MB, count=1: write-back
reg03: base=0x200000000 ( 8192MB), size= 8192MB, count=1: write-back
reg04: base=0x400000000 (16384MB), size=16384MB, count=1: write-back
reg05: base=0x800000000 (32768MB), size=32768MB, count=1: write-back
reg06: base=0x1000000000 (65536MB), size=65536MB, count=1: write-back
reg07: base=0x00000000 (   0MB), size= 256MB: write-back, count=1
reg08: base=0xe8000000 (3712MB), size=  32MB: write-combining, count=1
reg09: base=0x00000000 (   0MB), size=  64MB: write-back, count=1
reg10: base=0xfb000000 (4016MB), size=  16MB: write-combining, count=1
reg11: base=0xfb000000 (4016MB), size=   4kB: uncachable, count=1
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "register": "reg00",
    "type": "write-back",
    "base": "0x000000000",
    "base_mb": 0,
    "size": 2048,
    "count": 1
  },
  {
    "register": "reg01",
    "type": "write-back",
    "base": "0x080000000",
    "base_mb": 2048,
    "size": 1024,
    "count": 1
  },
  {
    "register": "reg02",
    "type": "write-back",
    "base": "0x100000000",
    "base_mb": 4096,
    "size": 4096,
    "count": 1
  },
  {
    "register": "reg03",
    "type": "write-back",
    "base": "0x200000000",
    "base_mb": 8192,
    "size": 8192,
    "count": 1
  },
  {
    "register": "reg04",
    "type": "write-back",
    "base": "0x400000000",
    "base_mb": 16384,
    "size": 16384,
    "count": 1
  },
  {
    "register": "reg05",
    "type": "write-back",
    "base": "0x800000000",
    "base_mb": 32768,
    "size": 32768,
    "count": 1
  },
  {
    "register": "reg06",
    "type": "write-back",
    "base": "0x1000000000",
    "base_mb": 65536,
    "size": 65536,
    "count": 1
  },
  {
    "register": "reg07",
    "type": "write-back",
    "base": "0x00000000",
    "base_mb": 0,
    "size": 256,
    "count": 1
  },
  {
    "register": "reg08",
    "type": "write-combining",
    "base": "0xe8000000",
    "base_mb": 3712,
    "size": 32,
    "count": 1
  },
  {
    "register": "reg09",
    "type": "write-back",
    "base": "0x00000000",
    "base_mb": 0,
    "size": 64,
    "count": 1
  },
  {
    "register": "reg10",
    "type": "write-combining",
    "base": "0xfb000000",
    "base_mb": 4016,
    "size": 16,
    "count": 1
  },
  {
    "register": "reg11",
    "type": "uncachable",
    "base": "0xfb000000",
    "base_mb": 4016,
    "size": 4,
    "count": 1
  }
]

Fixture coverage

1/1oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs /proc/mtrrjc-rs reads this kernel-interface file directly and dispatches it through the matching /proc parser.

Source: crates/jc-rs-parsers/src/proc/proc_mtrr.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare