smuc_rs
smuc_rs copied to clipboard
Unknown PSP entry signature: <invalid> (0xffffffff)
BIOS images for HP ProDesk 405 G6 https://support.hp.com/us-en/drivers/hp-prodesk-405-g6-desktop-mini-pc/38255713
S25 is parsed normally But S27 causes the error
(S25 is used for Ryzen 3xxx, and S27 for Ryzen 4xxx, see SMU version)
S25 size is 0x1024560 S27 size is 0x2024560
The FirmwareEntryTable is located: In S25 at 0x200320 In S27 at 0xFA0320
The problem is at "addr - 0x20000" https://github.com/LeagueRaINi/smuc_rs/blob/21eae3e851cd4047b2b1d83932b9e3c016b1d15a/src/main.rs#L66
So, doing "-0x20000" is incorrect for S27
My suggestion to fix this once and for all:
- Ask the user what the firmware size should be (4 MiB, 8 MiB, 16 MiB, etc.) -> FWSize
- Find the end of the last UEFI volume -> FWEnd.
- Calculate "FWEnd - FWSize" -> FWBeg.
- Use FWBeg as offset instead of "addr - 0x20000".
For example — S27: FWSize is 32 MiB FWEnd is 0x2000320 Then FWBeg is 0x2000320 - 32MiB = 0x320 Replace the offset with this value and the program will show no errors.
But it stops at "INFO smuc_rs > [00FA0320] FirmwareEntryTable" message, and doesn't output anything anymore