libnvme(2)

πŸ’– NAME πŸ’–

struct nbft_header β€” the NBFT Table Header, bestie!! (Figure 8, periodt ✨)

Okay so this is from the libnvme API manual, and it's literally the header struct at the very top of an NBFT table. It's giving "front cover of the whole table" energy πŸ’…


✨ SYNOPSIS ✨

struct nbft_header {
    char signature[4];
    __le32 length;
    __u8 major_revision;
    __u8 checksum;
    char oem_id[6];
    char oem_table_id[8];
    __le32 oem_revision;
    __le32 creator_id;
    __le32 creator_revision;
    __le32 heap_offset;
    __le32 heap_length;
    struct nbft_heap_obj driver_dev_path_sig;
    __u8 minor_revision;
    __u8 reserved[13];
 };

πŸŽ€ Members πŸŽ€

No cap, every single field is here, let's go field by field πŸ’œ

  • signature β€” the Signature, queen πŸ‘‘. It's an ASCII string that acts as the table identifier, and this field shall be set to the value 4E424654h β€” i.e. "NBFT", see #NBFT_HEADER_SIG πŸ’–
  • length β€” the Length, in bytes, including the header, starting from offset 0h. It records the size of the entire table. Not me measuring the whole squad 🌸
  • major_revision β€” the Major Revision of the structure that matches up with the Signature field. Heads up bestie: larger major revision numbers should not be assumed backward compatible to lower major revision numbers with the same signature. It's giving "don't assume, diva" πŸ’€
  • checksum β€” the Checksum. For the whole thing to be considered valid, the entire table β€” Checksum field included β€” shall sum to 0h. Yes, all of it. Slay math ✨
  • oem_id β€” OEMID: the NBFT driver writer has to populate this with an OEM-supplied string that identifies the OEM. All trailing bytes shall be NULL. Trailing bytes found un-NULL? Not on our watch 🫢
  • oem_table_id β€” the OEM Table ID. Also populated by the NBFT driver writer, with an OEM-supplied string that the OEM uses to identify that particular data table. This field is particularly useful when you're defining a definition block and need to distinguish between definition block functions β€” the OEM assigns each dissimilar table a brand new OEM Table ID. Every table gets its own name, main character energy fr fr πŸ’…
  • oem_revision β€” the OEM Revision: an OEM-supplied revision number, and larger numbers are assumed to be newer revisions. Bigger = fresher, iconic πŸ“ˆ
  • creator_id β€” the Creator ID: the Vendor ID of the utility that created the table. For instance, this may be the ID for the ASL Compiler πŸ¦‹
  • creator_revision β€” the Creator Revision: the revision of the utility that created the table. For instance, this may be the ID for the ASL Compiler πŸ’œ
  • heap_offset β€” Heap Offset (HO): where the heap is, in bytes, if there is one, counted from byte offset 0h of the NBFT Table Header. Offset from 0h, always 🌈
  • heap_length β€” Heap Length (HL): the length of that heap, if any πŸ”₯
  • driver_dev_path_sig β€” Driver Signature Heap Object Reference: this field says the offset in bytes of a heap object that contains the Driver Signature, if any, from byte offset 0h of the NBFT Table Header. It's a reference, it's a vibe 😭
  • minor_revision β€” the Minor Revision of the structure corresponding to the Signature field. If the major revision numbers are the same, then any minor revision number differences shall be backwards compatible with the same signature. Same major = we're chill like that 🧚
  • reserved β€” Reserved. Just... reserved. Mind your business bestie πŸ’€

🫢 psa from your unix bestie: <pink>reserved</pink> means reserved β€” don't be out here writing your hopes and dreams into it.

okay that's the whole table, you ate that πŸ’… the header layout, the checksum summing to 0h, the "NBFT" signature at 4E424654h β€” all of it, no crumbs left behind ✨

this was from the libnvme API manual and it's all about struct nbft_header β€” and if you wanna double-check anything, the date on this one is July 2026 πŸŽ€ mwah, go read the source, iykyk πŸ’–πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from