Skip to content

Commit 8b45004

Browse files
committed
Rearrange Linux memory to make the computer fit in a 64x64 square
1 parent 444c5f9 commit 8b45004

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed
0 Bytes
Binary file not shown.

linux/buildroot/board/mlogv32/dts/mlogv32.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
memory@80000000 {
3333
device_type = "memory";
3434
// the last 256K are reserved for OpenSBI
35-
reg = <0x80000000 (16*1024*1024 - 256*1024)>;
35+
reg = <0x80000000 (14*1024*1024 - 256*1024)>;
3636
};
3737

3838
cpus {

linux/buildroot/board/mlogv32/zsbl/zsbl.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#define FAST_ROM y
2+
13
.set UART0_BASE, 0xf0000010
24

35
.macro log message
@@ -64,8 +66,10 @@ do_print:
6466
2:
6567
ret
6668

69+
#ifndef FAST_ROM
6770
.section .loader, "ax", @progbits
6871
.balign 4
72+
#endif
6973
loader:
7074
// copy kernel to RAM
7175
// we do this here so the copy operation can be covered by the icache

linux/buildroot/board/mlogv32/zsbl/zsbl.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ENTRY(_start)
33

44
/* memory size definitions */
55
__ROM = 16M;
6-
__RAM = 16M;
6+
__RAM = 14M;
77

88
MEMORY {
99
/* ROM */

src/config/configs.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ configs:
3636

3737
linux:
3838
MEMORY_X_OFFSET: -9
39-
MEMORY_Y_OFFSET: !py!sum [[-16, -0, -16, -16, -16]]
39+
MEMORY_Y_OFFSET: !py!sum [[-16, -0, -16, -14, -14]]
4040
MEMORY_WIDTH: 64
41-
PROGRAM_ROM_ROWS: 0
42-
DATA_ROM_ROWS: 16
43-
RAM_ROWS: 16
44-
ICACHE_ROWS: 16
41+
PROGRAM_ROM_ROWS: 8
42+
DATA_ROM_ROWS: 8
43+
RAM_ROWS: 14
44+
ICACHE_ROWS: 14

0 commit comments

Comments
 (0)