forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARC: boards: nSIM: memory layout overhaul
Currently we use incorrect memory layout for SMP boards as we put data (which need do be accessible from all cores) to DCCM which is private for each CPU core. This works for nSIM which doesn't simulate CCMs (as we don't pass corresponding nSIM options for SMP configurations) however it won't work if we run that code on real HW (we want to achieve that nSIM configurations are also runnable on HAPS - FPGA platform). Let's fix that issue by using DDR instead of CCMs for SMP configurations (nsim_hs_smp and nsim_hs6x_smp). While I'm at it - switch UP HS6x configuration (nsim_hs6x) for DDR usage instead of CCMs - to make that configuration closer to the HAPS config we have. Signed-off-by: Eugeniy Paltsev <[email protected]> Signed-off-by: Evgeniy Paltsev <[email protected]>
- Loading branch information
1 parent
3f6be01
commit 38c24cd
Showing
13 changed files
with
79 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2022, Synopsys, Inc. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "skeleton.dtsi" | ||
#include <mem.h> | ||
|
||
#ifndef ICCM_ADDR | ||
#define ICCM_ADDR 0 | ||
#endif | ||
|
||
#ifndef ICCM_SIZE | ||
#define ICCM_SIZE DT_SIZE_M(1) | ||
#endif | ||
|
||
#ifndef DCCM_ADDR | ||
#define DCCM_ADDR 80000000 | ||
#endif | ||
|
||
#ifndef DCCM_SIZE | ||
#define DCCM_SIZE DT_SIZE_M(1) | ||
#endif | ||
|
||
/ { | ||
iccm0: iccm@ICCM_ADDR { | ||
compatible = "arc,iccm"; | ||
reg = <DT_ADDR(ICCM_ADDR) ICCM_SIZE>; | ||
}; | ||
|
||
dccm0: dccm@DCCM_ADDR { | ||
compatible = "arc,dccm"; | ||
reg = <DT_ADDR(DCCM_ADDR) DCCM_SIZE>; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &dccm0; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright (c) 2022, Synopsys, Inc. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "skeleton.dtsi" | ||
#include <mem.h> | ||
|
||
#ifndef DDR_ADDR | ||
#define DDR_ADDR 80000000 | ||
#endif | ||
|
||
#ifndef DDR_SIZE | ||
#define DDR_SIZE DT_SIZE_M(1) | ||
#endif | ||
|
||
/ { | ||
ddr0: memory@DDR_ADDR { | ||
device_type = "memory"; | ||
reg = <DT_ADDR(DDR_ADDR) DDR_SIZE>; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &ddr0; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/dts-v1/; | ||
|
||
#include "nsim.dtsi" | ||
#include "nsim-ccm-mem.dtsi" | ||
|
||
/ { | ||
cpus { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/dts-v1/; | ||
|
||
#include "nsim.dtsi" | ||
#include "nsim-ccm-mem.dtsi" | ||
|
||
/ { | ||
model = "snps,nsim_hs"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/dts-v1/; | ||
|
||
#include "nsim.dtsi" | ||
#include "nsim-flat-mem.dtsi" | ||
|
||
/ { | ||
model = "snps,nsim_hs"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/dts-v1/; | ||
|
||
#include "nsim.dtsi" | ||
#include "nsim-flat-mem.dtsi" | ||
|
||
/ { | ||
model = "snps,nsim_hs"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/dts-v1/; | ||
|
||
#include "nsim.dtsi" | ||
#include "nsim-ccm-mem.dtsi" | ||
|
||
/ { | ||
model = "snps,nsim_hs"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
/dts-v1/; | ||
|
||
#include "nsim.dtsi" | ||
#include "nsim-flat-mem.dtsi" | ||
|
||
/ { | ||
model = "snps,nsim_hs"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters