Skip to content

Conversation

Razer6
Copy link
Member

@Razer6 Razer6 commented Oct 17, 2025

The pwrmgr supports to bypass the rom integrity checks when in RMA or TEST_UNLOCKED (lc_dft_en_i, lc_hw_debug_en_i are asserted). Then it should bypass the check on the rom done and rom good signal. While for the good signal, this check is properly implemented, the done signal seems to have an issue:

assign rom_intg_chk_done = mubi4_or_hi(mubi4_and_hi(rom_intg_chk_dis, rom_ctrl_done_i),
                                       rom_ctrl_done_i);

The bypass via rom_intg_chk_dis is only honored if rom_ctrl_done_i is asserted. If so, I don't need a bypass. Thus, this boils down to:

assign rom_intg_chk_done = rom_ctrl_done_i;

With no bypass at all.

This PR fixes that by doing a simple OR between the bypass and the actual done signal, the same way it is done for the good signal.

@Razer6 Razer6 changed the title [hw,pwrmgr,rtl] Correct the rom integrity bypass on rom_good signal [hw,pwrmgr,rtl] Correct the rom integrity bypass on rom_done signal Oct 17, 2025
@Razer6 Razer6 force-pushed the pwrmgr-rom-check-bypass branch from c613e46 to 6bc8156 Compare October 17, 2025 18:13
@Razer6 Razer6 requested a review from rswarbrick October 17, 2025 18:14
@Razer6 Razer6 force-pushed the pwrmgr-rom-check-bypass branch from 6bc8156 to 315f4c4 Compare October 17, 2025 18:46
mubi4_t rom_intg_chk_good;
assign rom_intg_chk_done = mubi4_or_hi(mubi4_and_hi(rom_intg_chk_dis, rom_ctrl_done_i),
rom_ctrl_done_i);
assign rom_intg_chk_done = mubi4_or_hi(rom_intg_chk_dis, rom_ctrl_done_i);
Copy link
Contributor

@a-will a-will Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any risks to releasing the pwrmgr FSM faster? I note that until rom_ctrl is done with the check, the rom_ctrl's internal FSM keeps control of the bus, effectively preventing execution by the CPU.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about the same and you are probably right. Running through the FSM without waiting is maybe also not the right thing to do.

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