From 36027b48e680fa3c1edbd2bbd6a8208443b34c55 Mon Sep 17 00:00:00 2001 From: Nemanja Nedeljkovic Date: Wed, 19 Aug 2026 23:40:52 +0200 Subject: [PATCH] fix(pm5): report PM5 in hw status [Model] firmware line The [Model] section only distinguished RDV4 firmware from a "PM3 GENERIC" else branch, so PM5 (AT32) fell through and printed "Firmware... PM3 GENERIC" even though the banner/Target/MCU already report PM5/AT32F437. Add an IfPm5() branch that prints "Firmware... PM5" and the external-flash status. Note: the "[ FPGA ] ... 2s30vq100" line in hw version is separate and comes from the firmware-generated version string (fpga_version_info.c). On PM5 the build reuses the Xilinx fpga_pm3_hf.bit only to generate that version info (see Makefile.hal PM5 TODO), while the real Gowin FPGA is loaded via JTAG, so the reported bitstream name is a placeholder. Fixing that is a firmware/build change, not addressed here. --- CHANGELOG.md | 1 + client/src/cmdhw.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9ae0df0a..d39ca8474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Fixed `hw status` [Model] section reporting "PM3 GENERIC" firmware on Proxmark5 (PM5/AT32); it now reports `PM5` (@nemanjan00) - Added Proxmark5 (PM5/AT32) reporting in `hw version` / `hw status`: correct MCU (AT32F437), flash size and `PM5` target, instead of the AT91-decoded "Unknown / 32 KB / PM3 GENERIC". The device now also reports its on-chip flash size, appended to the `CMD_VERSION` reply in a backward-compatible way (@nemanjan00) - Fixed `hf mf dump` preserving readable sector trailer Key B data instead of overwriting it with values from the supplied key file (@oSPANNERo) - Changed `magic_cards_notes.md` - documented the USCUID-UL helper scripts (`hf_mfu_uscuid` / `hf_mf_uscuid_prog`) and how to set the tag signature, replacing the outdated "No implemented commands" note (@c-barron) diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index 6ee13fc6d..18b132d46 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -2203,7 +2203,10 @@ void pm3_version(bool verbose, bool oneliner) { SendCommandNG(CMD_VERSION, NULL, 0); if (WaitForResponseTimeout(CMD_VERSION, &resp, 1000)) { - if (IfPm3Rdv4Fw()) { + if (IfPm5()) { + PrintAndLogEx(NORMAL, " Firmware.................. " _GREEN_("PM5")); + PrintAndLogEx(NORMAL, " External flash............ %s", IfPm3Flash() ? _GREEN_("present") : _YELLOW_("absent")); + } else if (IfPm3Rdv4Fw()) { // validate signature data rdv40_validation_t mem;