]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/misc/aspeed_scu: Handle AST2600 protection key registers correctly
authorTan Siewert <tan@siewert.io>
Thu, 19 Jun 2025 08:53:27 +0000 (10:53 +0200)
committerCédric Le Goater <clg@redhat.com>
Thu, 3 Jul 2025 11:41:57 +0000 (13:41 +0200)
commit10d1b6231b7fdbeb9c601af35f73c6353cbfe6c8
treefd61fa34c22a984953c2024f9637877ceba51804
parent8e076a3f1b1ed0fc009ee25796e45c44b4cf74f9
hw/misc/aspeed_scu: Handle AST2600 protection key registers correctly

The AST2600 SCU has two protection key registers (0x00 and 0x10) that
both need to be unlocked. (Un-)locking 0x00 modifies both protection key
registers, while modifying 0x10 only modifies itself.

This commit updates the SCU write logic to reject writes unless both
protection key registers are unlocked, matching the behaviour of
real hardware.

Signed-off-by: Tan Siewert <tan@siewert.io>
Reviewed-by: Jamin Lin <jamin_lin@aspeedtech.com>
Link: https://lore.kernel.org/qemu-devel/20250619085329.42125-1-tan@siewert.io
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/misc/aspeed_scu.c