System configuration protection may be bypassed during debug mode.
Device configuration controls are commonly programmed after a device power reset by a trusted firmware or software module (e.g., BIOS/bootloader) and then locked from any further modification. This is commonly implemented using a trusted lock bit, which when set, disables writes to a protected set of registers or address regions. The lock protection is intended to prevent modification of certain system configuration (e.g., memory/memory protection unit configuration). If debug features supported by hardware or internal modes/system states are supported in the hardware design, modification of the lock protection may be allowed allowing access and modification of configuration information.
Impact: Bypass Protection Mechanism
Bypass of lock bit allows access and modification of system configuration even when the lock bit is set.
Effectiveness: High
module Locked_register_example ( input [15:0] Data_in, input Clk, input resetn, input write, input Lock, input scan_mode, input debug_unlocked, output reg [15:0] Data_out );
reg lock_status;
always @(posedge Clk or negedge resetn)
verilogEither remove the debug and scan mode overrides or protect enabling of these modes so that only trusted and authorized users may enable these modes.
... always @(posedge clk_i)
verilog
if(~(rst_ni && ~jtag_unlock && ~rst_9))**
verilog
...
... always @(posedge clk_i)
verilog
if(~(rst_ni && ~rst_9))**
verilog
...