From d5b9f39572c3f3b0297d303dc896169cf49b525e Mon Sep 17 00:00:00 2001 From: Nandkumar Joshi Date: Thu, 24 Sep 2020 23:19:39 +0530 Subject: [PATCH 1/3] Remove ecc scrub memory labels from linker scripts. --- templates/base.lds | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/templates/base.lds b/templates/base.lds index 7bba3f0..992253e 100644 --- a/templates/base.lds +++ b/templates/base.lds @@ -87,24 +87,10 @@ SECTIONS * certain core features */ PROVIDE(__metal_chicken_bit = {{ chicken_bit|default(0) }}); -{% if eccscrub_en %} /* The memory_ecc_scrub bit is used by _entry code to enable/disable * memories scrubbing to zero */ PROVIDE(__metal_eccscrub_bit = {{ eccscrub_bit|default(0) }}); - /* The RAM memories map for ECC scrubbing */ -{% for memory in ram_memories %} - {% if '0x10000' in memory["length_hex"]: %} - /* Default zero-scrub to at most 64KB, for limiting RTL simulation run time. */ - /* User is recommended to enable the full size for manual RTL simulation run! */ - {% endif %} - PROVIDE( metal_{{ memory.name }}_memory_start = {{ memory.base_hex }} ); - PROVIDE( metal_{{ memory.name }}_memory_end = {{ memory.base_hex }} + {{ memory.length_hex }} ); -{% endfor %} -{% else %} - PROVIDE(__metal_eccscrub_bit = 0); -{% endif %} - /* ROM SECTION * * The following sections contain data which lives in read-only memory, if From 006c2000857cf07835ac710078ec99cdd843ba10 Mon Sep 17 00:00:00 2001 From: Nick Knight Date: Mon, 28 Sep 2020 12:58:41 -0700 Subject: [PATCH 2/3] Remove other scrubbing-related debt --- templates/default.lds | 1 - templates/freertos.lds | 1 - templates/ramrodata.lds | 1 - templates/scratchpad.lds | 1 - 4 files changed, 4 deletions(-) diff --git a/templates/default.lds b/templates/default.lds index bf9b576..8f65bc8 100644 --- a/templates/default.lds +++ b/templates/default.lds @@ -11,4 +11,3 @@ # Set layout options #} {% set ramrodata = False %} -{% set eccscrub_en = True %} diff --git a/templates/freertos.lds b/templates/freertos.lds index 6ff2fb1..df90c93 100644 --- a/templates/freertos.lds +++ b/templates/freertos.lds @@ -15,7 +15,6 @@ #} {% set ramrodata = False %} {% set privilege_en = True %} -{% set eccscrub_en = True %} {% block privileged_function_section %} .privileged_functions : ALIGN (32) { diff --git a/templates/ramrodata.lds b/templates/ramrodata.lds index f01d563..80d18c7 100644 --- a/templates/ramrodata.lds +++ b/templates/ramrodata.lds @@ -15,7 +15,6 @@ # Set layout options #} {% set ramrodata = True %} -{% set eccscrub_en = True %} {% block force_itim %} {% if text_in_itim %} diff --git a/templates/scratchpad.lds b/templates/scratchpad.lds index dfb4cc0..b57b922 100644 --- a/templates/scratchpad.lds +++ b/templates/scratchpad.lds @@ -12,4 +12,3 @@ # Set layout options #} {% set ramrodata = False %} -{% set eccscrub_en = False %} From b93d782115b39e9ce3ac774869f40bf6b5e50cdd Mon Sep 17 00:00:00 2001 From: Nandkumar Joshi <52951157+NandkumarJoshi@users.noreply.github.com> Date: Tue, 29 Sep 2020 09:41:59 +0530 Subject: [PATCH 3/3] Conditionally emit __metal_eccscrub_bit symbol. Co-authored-by: Nick Knight --- templates/base.lds | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/base.lds b/templates/base.lds index 992253e..6a9f61b 100644 --- a/templates/base.lds +++ b/templates/base.lds @@ -87,9 +87,11 @@ SECTIONS * certain core features */ PROVIDE(__metal_chicken_bit = {{ chicken_bit|default(0) }}); +{% if eccscrub_bit != 0 %} /* The memory_ecc_scrub bit is used by _entry code to enable/disable * memories scrubbing to zero */ - PROVIDE(__metal_eccscrub_bit = {{ eccscrub_bit|default(0) }}); + PROVIDE(__metal_eccscrub_bit = {{ eccscrub_bit }}); +{% endif %} /* ROM SECTION *