Skip to content

Commit 7a5257b

Browse files
committed
SoC/evalsoc: Enable L2 Cache by default when it present
Signed-off-by: Huaqi Fang <578567190@qq.com>
1 parent a20c60d commit 7a5257b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

SoC/evalsoc/Common/Source/system_evalsoc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ void __sync_harts(void)
13361336
// pre-condition: interrupt must be disabled, this is done before calling this function
13371337
// BOOT_HARTID is defined <Device.h>
13381338
if (hartid == BOOT_HARTID) { // boot hart
1339-
// Enaable L2, disable cluster local memory
1339+
// Enable L2, disable cluster local memory
13401340
if (SMP_CTRLREG(smp_base, 0x4) & 0x1) {
13411341
SMP_CTRLREG(smp_base, 0x10) |= 0x1;
13421342
SMP_CTRLREG(smp_base, 0xd8) = 0x0;
@@ -1520,9 +1520,8 @@ void _premain_init(void)
15201520
}
15211521
#endif
15221522

1523-
#if defined(RUNMODE_L2_EN)
15241523
if ( (hartid == BOOT_HARTID) && ((mcfginfo & (0x1 << 11)) && (SMP_CTRLREG(__SMPCC_BASEADDR, 0x4) & 0x1)) ) { // L2 Cache present
1525-
#if RUNMODE_L2_EN == 1
1524+
#if !(defined(RUNMODE_L2_EN) && RUNMODE_L2_EN == 0)
15261525
// Enable L2, disable cluster local memory
15271526
SMP_CTRLREG(__SMPCC_BASEADDR, 0x10) |= 0x1;
15281527
SMP_CTRLREG(__SMPCC_BASEADDR, 0xd8) = 0x0;
@@ -1535,7 +1534,6 @@ void _premain_init(void)
15351534
__SMP_RWMB();
15361535
#endif
15371536
}
1538-
#endif
15391537

15401538
/* Enable prefetch overall */
15411539
IINFO_EnablePrefetchOverall();

doc/source/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ This is release version of ``0.9.0`` of Nuclei SDK, which is still under develop
147147
- Enhance evalsoc build system modularization with improved flexibility and reduced customer porting effort, see :ref:`design_soc_evalsoc_build_modularization` for details
148148
- Add ``eclic_hwctx`` hidden configuration option in evalsoc Common ``npk.yml`` to control ECLIC v2 hardware context auto-save/restore feature with conditional compilation flag ``ECLIC_HW_CTX_AUTO``
149149
- Update ``cpufeature.h`` to use a more systematic approach for defining CPU features based on ``XLCFG_xxx`` variables, with clear distinction between features enabled by default versus those disabled by default
150+
- Enable L2 Cache for evalsoc when L2 Cache present by default now, previous it is only enabled when ``SMP >= 2``
150151

151152
* Documentation
152153

0 commit comments

Comments
 (0)