summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_phys_vbios.h
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-01 07:22:09 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-01 07:22:09 -0400
commite7c068e2e831c6c85e233578767fffe591876a88 (patch)
treea413806c189a53f76a88f621ecc2464bb8931733 /kernel/gsp_phys_vbios.h
parent1e5f46e8a3d48a69a95025d375871bed87874587 (diff)
downloadopen-iov-e7c068e2e831c6c85e233578767fffe591876a88.tar.gz
open-iov-e7c068e2e831c6c85e233578767fffe591876a88.zip
gsp-phys: read-only FWSEC dry-run mode; match the 6-byte BIT token decode
Diffstat (limited to 'kernel/gsp_phys_vbios.h')
-rw-r--r--kernel/gsp_phys_vbios.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/kernel/gsp_phys_vbios.h b/kernel/gsp_phys_vbios.h
index 5fc6e85..2d8e87f 100644
--- a/kernel/gsp_phys_vbios.h
+++ b/kernel/gsp_phys_vbios.h
@@ -29,11 +29,22 @@
#define GSP_PHYS_FWSEC_APPID_DEBUG 0x45
#define GSP_PHYS_FWSEC_APPID_PROD 0x85
+/*
+ * BIT token types: 6-byte tokens are "2b2w" (16-bit DataPtr at offset 4),
+ * 8-byte tokens are "2b1w1d" (32-bit DataPtr).
+ */
+#define GSP_PHYS_BIT_TOKEN_SIZE_6 6
+#define GSP_PHYS_BIT_TOKEN_SIZE_8 8
+
struct gsp_phys_vbios {
u8 *data; /* copied VBIOS image (host memory) */
size_t size; /* usable image size in bytes */
u32 pci_offset; /* image start offset of the base ROM */
u32 expansion_rom_offset; /* expansion ROM base, from image start */
+ u32 ifr_version; /* image-format-record version, 0 if none */
+ u32 bit_addr; /* BIT header offset, set by the parser */
+ u32 bit_token_size; /* BIT token type/stride (6 or 8 bytes) */
+ u32 bit_token_entries; /* BIT tokens walked by the parser */
u64 version; /* (binary version << 8) | OEM, 0 if absent */
};
@@ -64,7 +75,7 @@ int gsp_phys_vbios_read(struct gsp_phys_vbios *img, struct pci_dev *pdev,
void __iomem *bar0);
void gsp_phys_vbios_free(struct gsp_phys_vbios *img);
-int gsp_phys_vbios_parse_fwsec(const struct gsp_phys_vbios *img,
+int gsp_phys_vbios_parse_fwsec(struct gsp_phys_vbios *img,
bool use_debug_app,
struct gsp_phys_fwsec_desc *desc);