Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #544 from sifive/add-l2lim
Browse files Browse the repository at this point in the history
Add support for L2 LIM. Update BSP files.
  • Loading branch information
nategraff-sifive authored Sep 24, 2020
2 parents 5a2f019 + 5358731 commit c840632
Show file tree
Hide file tree
Showing 43 changed files with 752 additions and 40 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@
[submodule "software/example-l2pf"]
path = software/example-l2pf
url = https://github.com/sifive/example-l2pf.git
[submodule "software/example-lim"]
path = software/example-lim
url = https://github.com/sifive/example-lim.git
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ operating systems to RISC-V.
- Demonstrates usage of Sifive L2 performance monitor counter APIs to capture L2 cache event logs.
- example-l2pf
- Example for usage and measuring effectiveness of SiFive L2 Prefetcher.
- example-lim
- Demonstrates how to designate a function to be linked into the LIM (Loosely-Integrated Memory).
- example-freertos-minimal
- A simple FreeRTOS skeleton to build your FreeRTOS application.
- example-freertos-blinky
Expand Down
21 changes: 20 additions & 1 deletion bsp/freedom-e310-arty/metal.default.lds
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -179,10 +180,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/freedom-e310-arty/metal.freertos.lds
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -190,10 +191,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/freedom-e310-arty/metal.ramrodata.lds
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -172,10 +173,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/freedom-e310-arty/metal.scratchpad.lds
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -172,10 +173,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>ram :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/qemu-sifive-e31/metal.default.lds
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -178,10 +179,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/qemu-sifive-e31/metal.freertos.lds
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -189,10 +190,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/qemu-sifive-e31/metal.ramrodata.lds
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -171,10 +172,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/qemu-sifive-e31/metal.scratchpad.lds
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -171,10 +172,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>ram :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/qemu-sifive-s51/metal.default.lds
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -178,10 +179,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
21 changes: 20 additions & 1 deletion bsp/qemu-sifive-s51/metal.freertos.lds
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PHDRS
ram PT_LOAD;
itim_init PT_LOAD;
text PT_LOAD;
lim_init PT_LOAD;
}

SECTIONS
Expand Down Expand Up @@ -189,10 +190,28 @@ SECTIONS
PROVIDE( metal_segment_itim_target_start = ADDR(.itim) );
PROVIDE( metal_segment_itim_target_end = ADDR(.itim) + SIZEOF(.itim) );

/* LIM SECTION
*
* The following sections contain data which is copied from read-only
* memory into a loosely integrated memory (LIM), which is shared with L2
* cache, during pre-main program initialization.
*
* Generally, the data copied into the LIM should be performance-critical
* functions which benefit from low instruction-fetch latency.
*/

.lim : ALIGN(8) {
*(.lim .lim.*)
} >ram AT>rom :lim_init

PROVIDE( metal_segment_lim_source_start = LOADADDR(.lim) );
PROVIDE( metal_segment_lim_target_start = ADDR(.lim) );
PROVIDE( metal_segment_lim_target_end = ADDR(.lim) + SIZEOF(.lim) );

/* TEXT SECTION
*
* The following section contains the code of the program, excluding
* everything that's been allocated into the ITIM already
* everything that's been allocated into the ITIM/LIM already
*/

.text : {
Expand Down
Loading

0 comments on commit c840632

Please sign in to comment.