From e7c068e2e831c6c85e233578767fffe591876a88 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 1 Oct 2026 07:22:09 -0400 Subject: gsp-phys: read-only FWSEC dry-run mode; match the 6-byte BIT token decode --- kernel/gsp_phys_vbios.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'kernel/gsp_phys_vbios.h') 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); -- cgit v1.2.3