Skip to content
reinauerPublic

About

Tools for dealing with DPTF

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Intel DPTF DataVault Editor

A Python utility to read, edit, and rebuild Intel DPTF (Dynamic Platform and Thermal Framework) DataVault (.dv) files. Export a DPTF.dv file to editable XML, change its configuration, and convert the edited XML back into a DPTF.dv file.

This tool replaces Intel's DPTF tooling for this DataVault export, edit, and rebuild workflow.

Overview

Intel DPTF uses DataVault files to store configuration data for thermal management policies. These binary files contain key-value pairs that define thermal zones, passive cooling policies, power limits, and other platform-specific thermal parameters.

The XML workflow lets you edit configuration data in a text editor and rebuild the binary file with updated payload sizes and SHA-256 hashes. Text, CSV, and JSON output are also available for inspection and analysis.

Features

  • Exports DataVault (.dv) files to XML and rebuilds .dv files from edited XML
  • Reads DataVault V2 headers and key-value records, including multiple segments
  • Decodes ESIF data types including integers, strings, GUIDs, temperatures, and binary tables
  • Exposes PSVT and PPCC tables as editable XML rows with named fields
  • Recalculates payload sizes and SHA-256 hashes when rebuilding
  • Provides direct commands to change PSVT temperatures and PPCC power limits
  • Displays temperatures in Celsius alongside their raw decikelvin values
  • Outputs in text, CSV, JSON, or XML format

Requirements

  • Python 3.7+
  • No external dependencies (uses only standard library)

Usage

Edit a DPTF.dv file through XML

Export the binary configuration to XML:

./dv_parser.py dump-xml DPTF.dv DPTF.xml

Open DPTF.xml in a text editor and change the desired values. Then rebuild the binary file:

./dv_parser.py build-xml DPTF.xml DPTF-edited.dv

The output path determines the rebuilt file's name; use DPTF.dv as the output path to write it under that name. The example uses a separate file so you can compare it with the original:

./dv_parser.py dump DPTF-edited.dv

In the exported XML:

  • PSVT and PPCC entries contain a <table> with <row> and <field> elements. Edit each field's value attribute. These tables take precedence over the entry's base64 <raw> data when rebuilding.
  • Temperature field values use decikelvin: value = (Celsius + 273.15) * 10, rounded to an integer. The celsius and display attributes are for reference; changing them does not change the rebuilt value.
  • Entries without a <table> are rebuilt from their base64 <raw> data. Any decoded <variants> elements are for inspection only.
  • Payload sizes and hashes are recalculated automatically.

The XML editing workflow supports key-value (KEYS) segments. Non-KEYS payloads and extra header bytes are not preserved by XML export and rebuild.

Commands

./dv_parser.py <command> [options]
Command Description
dump <file(s)> Inspect one or more DataVault files
dump-xml <input.dv> [output.xml] Export editable XML; omit the output or use - for stdout
build-xml <input.xml> <output.dv> Rebuild a DataVault file from edited XML
set-psvt-temp <input.dv> <output.dv> Change a PSVT row's passive temperature
set-ppcc <input.dv> <output.dv> Change a PPCC power-limit row

Use ./dv_parser.py <command> --help for command-specific options. The original ./dv_parser.py [options] <file(s)> syntax remains available for inspection.

Inspection options

Option Description
-v, --verbose Enable debug output showing parsing details
-f, --format Output format: text (default), csv, json, or xml

Examples

Parse a single file:

./dv_parser.py DPTF.dv

Parse with verbose debug output:

./dv_parser.py -v dptf.dv

Export to JSON:

./dv_parser.py -f json dptf.dv > output.json

Export multiple files to CSV:

./dv_parser.py -f csv *.dv > output.csv

Output Formats

XML

Editable configuration for the export/edit/rebuild workflow above. XML includes segment metadata, entry keys and types, raw entry data, and structured PSVT and PPCC tables. Use build-xml to convert it back to a binary DataVault file.

Text (default)

Human-readable output with decoded values and field names for known table types:

[0] Key: /shared/tables/psvt/PSVT
    Size: 156 bytes
    Table: PSVT (revision=2, rows=1)
      Source: TCPU
      Target: TCPU
      PassiveTemp(dK): 3630 (89.9°C)
      ...

JSON

Structured output suitable for programmatic processing:

The top-level object contains segments (header metadata and hash status) and entries (keys, types, flags, sizes, and decoded values). JSON and CSV are inspection formats; use XML to rebuild a DataVault file.

CSV

Tabular output for spreadsheet import:

key,type,flags,size,value
"/shared/tables/psvt/PSVT",BINARY,1,156,"..."

Supported Data Types

Type Description
UINT8/16/32/64 Unsigned integers
INT8/16/32/64 Signed integers
STRING Null-terminated strings
BINARY/BLOB Raw binary data
GUID 128-bit GUIDs (formatted)
TEMPERATURE DeciKelvin values (converted to Celsius)
TABLE Structured table data
JSON/XML Text markup

DPTF Table Decoding

The parser recognizes and formats common DPTF table types:

PSVT (Passive Policy Table)

Defines passive cooling relationships between thermal sources and targets:

  • Source/Target device names
  • Sample period and temperature thresholds
  • Hysteresis and step limits

PPCC (Participant Power Control Capabilities)

Defines power limit parameters:

  • Min/Max power limits
  • Time windows
  • Step sizes

File Format

The current implementation reads DataVault V2 segments with:

  • 2-byte signature (0x1FE5)
  • Header containing version, flags, segment ID, and comment
  • Payload size, class, and SHA-256 hash
  • Key-value payload with typed entries for KEYS segments

License

BSD 2-Clause License. See LICENSE for details.

References

  • Intel DPTF Source Code - esif_lib_datavault.h, esif_lib_datarepo.h
  • Intel ESIF (Eco-System Independent Framework) SDK

About

Tools for dealing with DPTF

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages