[kmac] Add CFG_REGWEN countermeasure

Signed-off-by: Eunchan Kim <eunchan@opentitan.org>
diff --git a/hw/ip/kmac/data/kmac.hjson b/hw/ip/kmac/data/kmac.hjson
index 0bb7831..68d5121 100644
--- a/hw/ip/kmac/data/kmac.hjson
+++ b/hw/ip/kmac/data/kmac.hjson
@@ -194,6 +194,9 @@
     { name: "CTR.REDUN"
       desc: "Round and hash counter use prim_count for redundancy"
     }
+    { name: "CFG_SHADOWED.CONFIG.REGWEN"
+      desc: "CFG_SHADOWED is protected by REGWEN"
+    }
   ]
   regwidth: "32"
   registers: [
diff --git a/hw/ip/kmac/data/kmac_sec_cm_testplan.hjson b/hw/ip/kmac/data/kmac_sec_cm_testplan.hjson
index e8ec2d0..323fedc 100644
--- a/hw/ip/kmac/data/kmac_sec_cm_testplan.hjson
+++ b/hw/ip/kmac/data/kmac_sec_cm_testplan.hjson
@@ -59,5 +59,11 @@
       milestone: V2S
       tests: []
     }
+    {
+      name: sec_cm_cfg_shadowed_config_regwen
+      desc: "Verify the countermeasure(s) CFG_SHADOWED.CONFIG.REGWEN"
+      milestone: V2S
+      tests: []
+    }
   ]
 }
diff --git a/hw/ip/kmac/rtl/kmac.sv b/hw/ip/kmac/rtl/kmac.sv
index 3cc06d4..511da5e 100644
--- a/hw/ip/kmac/rtl/kmac.sv
+++ b/hw/ip/kmac/rtl/kmac.sv
@@ -452,6 +452,7 @@
   logic engine_stable;
   assign engine_stable = sha3_fsm == sha3_pkg::StIdle;
 
+  // SEC_CM: CFG_SHADOWED.CONFIG.REGWEN
   assign hw2reg.cfg_regwen.d = engine_stable;
 
   // Secret Key