Allow writes to NVRAM partition in lockdown mode

NVRAM should be considered mutable in the same way as the VPD
caches are considered mutable.  If NVRAM is to be locked, a different
define to lock out NVRAM should also be set.
parent db538b8e
...@@ -16,10 +16,13 @@ ...@@ -16,10 +16,13 @@
// should be automatically retried on the next IPL // should be automatically retried on the next IPL
`define BLOCK_GUARD_PARTITION_WRITES `define BLOCK_GUARD_PARTITION_WRITES
// Block writes to everything except DJVPD / MVPD / CVPD // Block writes to everything except DJVPD / MVPD / CVPD / NVRAM
// This implicitly blocks GUARD partition writes // This implicitly blocks GUARD partition writes
`define BLOCK_NONESSENTIAL_WRITES `define BLOCK_NONESSENTIAL_WRITES
// Block writes to NVRAM partition
// `define BLOCK_NVRAM_PARTITION_WRITES
`ifdef BLOCK_NONESSENTIAL_WRITES `ifdef BLOCK_NONESSENTIAL_WRITES
`undef BLOCK_GUARD_PARTITION_WRITES `undef BLOCK_GUARD_PARTITION_WRITES
`endif `endif
...@@ -132,6 +135,8 @@ module lpc_bridge_top( ...@@ -132,6 +135,8 @@ module lpc_bridge_top(
`ifdef BLOCK_NONESSENTIAL_WRITES `ifdef BLOCK_NONESSENTIAL_WRITES
parameter VPD_PARTITION_START_ADDRESS = 28'h0e5000; parameter VPD_PARTITION_START_ADDRESS = 28'h0e5000;
parameter VPD_PARTITION_END_ADDRESS = 28'h204fff; parameter VPD_PARTITION_END_ADDRESS = 28'h204fff;
parameter NVRAM_PARTITION_START_ADDRESS = 28'h031000;
parameter NVRAM_PARTITION_END_ADDRESS = 28'h0c0fff;
`endif `endif
// Fully isolate / power down host interfaces on external request // Fully isolate / power down host interfaces on external request
...@@ -1045,8 +1050,13 @@ module lpc_bridge_top( ...@@ -1045,8 +1050,13 @@ module lpc_bridge_top(
|| (ipmi_bt_hiomap_active_window_start_address > GUARD_PARTITION_END_ADDRESS)) || (ipmi_bt_hiomap_active_window_start_address > GUARD_PARTITION_END_ADDRESS))
`endif `endif
`ifdef BLOCK_NONESSENTIAL_WRITES `ifdef BLOCK_NONESSENTIAL_WRITES
&& (((ipmi_bt_hiomap_active_window_start_address + ipmi_bt_hiomap_active_window_size_bytes) >= VPD_PARTITION_START_ADDRESS) && ((((ipmi_bt_hiomap_active_window_start_address + ipmi_bt_hiomap_active_window_size_bytes) >= VPD_PARTITION_START_ADDRESS)
&& ((ipmi_bt_hiomap_active_window_start_address + ipmi_bt_hiomap_active_window_size_bytes) <= VPD_PARTITION_END_ADDRESS)) && ((ipmi_bt_hiomap_active_window_start_address + ipmi_bt_hiomap_active_window_size_bytes) <= VPD_PARTITION_END_ADDRESS))
`ifndef BLOCK_NVRAM_PARTITION_WRITES
|| (((ipmi_bt_hiomap_active_window_start_address + ipmi_bt_hiomap_active_window_size_bytes) >= NVRAM_PARTITION_START_ADDRESS)
&& ((ipmi_bt_hiomap_active_window_start_address + ipmi_bt_hiomap_active_window_size_bytes) <= NVRAM_PARTITION_END_ADDRESS))
`endif
)
`endif `endif
) begin ) begin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment