Skip to content

Conversation

@miczyg1
Copy link
Contributor

@miczyg1 miczyg1 commented Jan 26, 2026

The tertiary directories (formally known as ISH structures) and combo directories contain PSP IDs that PSP checks to match the silicon supported by given directory. Extract the PSP IDs from the ISH structures and determine the Zen generation from the PSP ID. This change adds mainly the PSP IDs for AM5 platforms.

The code determining Zen generation has been moved to the directory class sources to let the tool determine it on directory creation happening in multiple places in the tool. The printed directories are now extended with the Zen generations and PSP IDs the directory supports. It has been noticed on AM5 BIOS images, that certain directory pointers in ISH structures may point to the same L2 directory, but have a different PSP ID only. Thus it is necessary to recursively update the Zen generation and supported PSP IDs to all directories underneath the one being detected and parsed.

TEST=Parse MSI PRO B850-P WIFI BIOS 7E56v2A75 and see the PSP IDs and Zen generation supported by L2 directories.

The tertiary directories (formally known as ISH structures)
and combo directories contain PSP IDs that PSP checks to match
the silicon supported by given directory. Extract the PSP IDs
from the ISH structures and determine the Zen generation from
the PSP ID. This change adds mainly the PSP IDs for AM5 platforms.

The code determining Zen generation has been moved to the directory
class sources to let the tool determine it on directory creation
happening in multiple places in the tool. The printed directories
are now extended with the Zen generations and PSP IDs the directory
supports. It has been noticed on AM5 BIOS images, that certain
directory pointers in ISH structures may point to the same L2
directory, but have a different PSP ID only. Thus it is necessary to
recursively update the Zen generation and supported PSP IDs to all
directories underneath the one being detected and parsed.

TEST=Parse MSI PRO B850-P WIFI BIOS 7E56v2A75 and see the PSP IDs
and Zen generation supported by L2 directories.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
@github-actions
Copy link

Metrics

psptool command line interface metrics

Metric Value
Files Processed 68
Stdout Lines 14,913
Stderr Lines 144
Total Lines 15,057
Error Ratio 0.96%

PSPTool python library metrics

Status Count Percentage
✓ Successful 68 100.0%
✗ Failed 0 0.0%
Total 68 100%

All files parsed successfully!

@miczyg1
Copy link
Contributor Author

miczyg1 commented Jan 26, 2026

More about ISH structure can be found here: https://github.com/coreboot/coreboot/blob/main/util/amdfwtool/amdfwtool.h#L339

Before the change: https://paste.dasharo.com/?4b79a6e778c6b460#82xPk8VLi3xohkT5uZ6DJLpV7joVeqtb7JR6aj96Zxbi
After the change: https://paste.dasharo.com/?cfc503213c013d9c#A8fN3BxAH8DL7kyZvzGyPfX2pNJ3aynjQcspQgcs59CP

The main rationale here was to identify which directories support which families of processors, because it was hard to find out otherwise (unless manually parsing hexdumps...). I had no better idea how to expose it, so I preserved the Zen X naming but appended the PSP ID as well. It can prove useful later to add new PSP IDs and match it agains Zen generations.

@cwerling cwerling merged commit 8940412 into PSPReverse:master Jan 27, 2026
1 check passed
@cwerling
Copy link
Member

Oh, I didn't spot that the tests don't success. If you find the time to fix the issue before I do, I'm grateful: https://github.com/PSPReverse/PSPTool/actions/runs/21401532497/job/61613651611

I also enabled the Python tests (with access to the private fixtures repo) now for all PRs actually, so we should be able to spot these kinds of bugs before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants