Skip to content

Commit 4589657

Browse files
committed
conf/evalsoc: in order to keep linux sdk consistent, create non-cachable region for rv32 xec, event if xec is not ENABLE. when xec dts node status is changed to okay, rv32 xec can work right now.
Signed-off-by: guibing <guibing@nucleisys.com>
1 parent ba8e3c9 commit 4589657

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

conf/evalsoc/nuclei_rv32imac.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
/* reserve 64KB memroy as non-cachable region */
181181
no-map;
182182
reg = <0x0 0xFD000000 0x0 0x10000>;
183-
status = "disabled";
183+
status = "okay";
184184
};
185185
};
186186

conf/evalsoc/nuclei_rv32imafdc.dts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,19 @@
171171
reg = <0x0 0x80000000 0x0 0x7E000000>;
172172
};
173173

174+
reserved-memory {
175+
#address-cells = <2>;
176+
#size-cells = <2>;
177+
ranges;
178+
179+
noncachable_memory: region@FD000000 {
180+
/* reserve 64KB memroy as non-cachable region */
181+
no-map;
182+
reg = <0x0 0xFD000000 0x0 0x10000>;
183+
status = "okay";
184+
};
185+
};
186+
174187
soc {
175188
#address-cells = <2>;
176189
#size-cells = <2>;
@@ -303,7 +316,7 @@
303316
/*local-mac-address = [00 2b 20 21 03 23];*/
304317
phy-handle = <&rtl8211f>;
305318
phy-mode = "rgmii";
306-
desc_mem = <0x0 0x90000000 0x0 0x10000>;
319+
desc_mem = <&noncachable_memory>;
307320
status = "disabled";
308321
mdio {
309322
compatible = "snps,dwmac-mdio";

conf/evalsoc/opensbi/evalsoc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ static int nuclei_evalsoc_final_init(bool cold_boot,
3232
}
3333

3434
/*
35-
* If arch is rv32 or rv64 without svpbmt feature, you can use mattri to set DLM as non-cachable region.
36-
* xec dts node should contain desc_mem region; which is DLM region used to store xec descriptors.
35+
* If arch is rv32 or rv64 without svpbmt feature, you can use mattri to set ddr base:0xfd000000,size:0x10000 as non-cachable region.
36+
* xec dts node should contain desc_mem region from base:0xfd000000,size:0x10000; which is reserved region used to store xec descriptors.
3737
* if rv64 with svpbmt feature, xec dts node must not contain desc_mem property.
3838
*/
39-
#ifdef NUCLEI_XEC_USING_NONCACHABLE
39+
#if __riscv_xlen == 32
4040
#define mattri1_base 0x7f5
4141
#define mattri1_mask 0x7f6
4242

0 commit comments

Comments
 (0)