Firmware container and ABI
The binary contract between mainline powervr.ko and the firmware is
defined by the public Linux drivers/gpu/drm/imagination/pvr_rogue_fwif*.h
and pvr_fw_info.h headers together with docsClean/BXE-2-32/host-interface and
docsClean/BXE-2-32/memory-model. Every structure in src/include/fwif.h is verified at
compile time via static_assert against the offsets in the public
pvr_rogue_fwif_check.h.
The .fw container (tools/mkfw.py)
offset 0 file end - 4 KiB file end
| firmware ELF | zero padding | device info | header (48 B) | layout table | 0... |
+-------- last 4 KiB block -----------+
Header (pvr_fw_info.h)
info_version = 3header_len = 48layout_entry_num = 6,layout_entry_size = 24bvnc = 36.29.52.182fw_info_size = 4096flags = OPEN_SOURCE, version1.1(FWIFofsrc/Makefile, passed asmkfw.py --fwif; also in the file name), build1device_info_size
Mainline powervr logs this header as FW version v1.1 (build 1 OS),
which the test scripts use to confirm that our clean-room build (and never a
fallback image) was loaded.
Layout table (6 entries)
The host allocates two firmware-heap objects (code and data, both mapped
DEVICE_UNCACHED) and places each section according to the 6-entry layout
table (id, type, base_addr, max_size, alloc_size, alloc_offset).
tools/mkfw.py verifies that every ELF PT_LOAD segment fits inside one
entry:
Section ID |
Host object |
Offset |
MIPS VA |
Size |
|---|---|---|---|---|
|
code |
|
|
|
|
code |
|
|
|
|
code |
|
|
|
|
data |
|
|
|
|
data |
|
|
|
|
data |
|
|
|
The data object is placed at the fixed VA 0xC0ED0000 inside the top MiB
of the firmware heap reserved by the mainline host (alongside osinit at
0xC0FE0000 and sysinit at 0xC0FF0000).
Device info block
Format (bit order in pvr_rogue_fwif_dev_info.h): header
(brn_mask_size=1, ern_mask_size=1, feature_mask_size, feature_param_size),
followed by the BRN mask, ERN mask, boolean feature masks and value-feature
parameters in feature order (docsClean/BXE-2-32/memory-model, answer to Q2).
Device-info entries that directly control host driver behaviour:
Field |
Value |
Effect on |
|---|---|---|
|
Set |
Required. Without it the host never clears
|
|
|
Host leaves DM overlap enabled ( |
|
|
|
|
Set |
Adjusts fragment context-state sizing and selects |
BRN / ERNs |
BRN |
Enables the 36-bit MIPS bus workaround and BXE-2-32 enhancements |
See Architecture for the full list of boolean and value features.