Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*~
__pycache__
/build
build/
install/
log_build.txt
/.sconsign.dblite

tools/gap-configs/.sconsign.dblite
6 changes: 4 additions & 2 deletions rtos/pulpos/common/include/pos/data/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#ifndef LANGUAGE_ASSEMBLY

// We cannot use tiny attribute if we use a generic riscv toolchain or LLVM or we there is fc specific memeory (TCDM or L2)
#if (defined(ARCHI_HAS_FC_TCDM) || defined(ARCHI_HAS_L2_ALIAS)) && !defined(__LLVM__) && !defined(__RISCV_GENERIC__)
#if (defined(ARCHI_HAS_FC_TCDM) || defined(ARCHI_HAS_L2_ALIAS)) && !defined(__LLVM__) && !defined(__RISCV_GENERIC__) && defined(CONFIG_NO_STD_RELOC)
#define POS_FC_TINY_ATTRIBUTE __attribute__ ((tiny))
#else
#define POS_FC_TINY_ATTRIBUTE
Expand All @@ -53,8 +53,10 @@

#define PI_L2 __attribute__((section(".l2_data")))

#if defined(ARCHI_HAS_L1_ALIAS)
#if defined(ARCHI_HAS_L1_ALIAS) && defined(CONFIG_NO_STD_RELOC)
#define PI_CL_L1_TINY __attribute__ ((tiny)) __attribute__((section(".data_tiny_l1")))
#else
#define PI_CL_L1_TINY __attribute__((section(".data_tiny_l1")))
#endif

#define PI_CL_L1 __attribute__((section(".data_l1")))
Expand Down
17 changes: 17 additions & 0 deletions rtos/pulpos/common/kernel/soc_event_v2_itc.S
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,15 @@

#else

#ifdef CONFIG_NO_STD_RELOC
lw x12, %tiny(pos_soc_event_callback)(x11)
lw x11, %tiny(pos_soc_event_callback_arg)(x11)
#else
la t0, pos_soc_event_callback
p.lw x12, t0(x11)
la t0, pos_soc_event_callback_arg
p.lw x11, t0(x11)
#endif
la x9, pos_soc_event_handler_end_asm
j pos_irq_call_external_c_function

Expand All @@ -89,12 +96,22 @@ pos_soc_event_store_asm:
# If the event is not handled, store it in the soc event status mask
srli x11, x10, 5
slli x11, x11, 2
#ifdef CONFIG_NO_STD_RELOC
lw x12, %tiny(pos_soc_event_status)(x11)
#else
la t0, pos_soc_event_status
p.lw x12, t0(x11)
#endif
andi x10, x10, 0x1f

p.bsetr x12, x12, x10

#ifdef CONFIG_NO_STD_RELOC
sw x12, %tiny(pos_soc_event_status)(x11)
#else
la t0, pos_soc_event_status
p.sw x12, t0(x11)
#endif



Expand Down
18 changes: 18 additions & 0 deletions rtos/pulpos/common/kernel/task_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,36 @@ pos_task_push_asm:
// x11/a1: the task
// x12/a2: temporary register

#ifdef CONFIG_NO_STD_RELOC
lw x12, %tiny(pos_sched_first)(x0)
#else
la t0, pos_sched_first
lw x12, 0(t0)
#endif
sw x0, PI_TASK_T_NEXT(x11)
beqz x12, __rt_no_first
#ifdef CONFIG_NO_STD_RELOC
lw x12, %tiny(pos_sched_last)(x0)
#else
la t0, pos_sched_last
lw x12, 0(t0)
#endif
sw x11, PI_TASK_T_NEXT(x12)
j __rt_common

__rt_no_first:
#ifdef CONFIG_NO_STD_RELOC
sw x11, %tiny(pos_sched_first)(x0)
#else
sw x11, pos_sched_first, t0
#endif

__rt_common:
#ifdef CONFIG_NO_STD_RELOC
sw x11, %tiny(pos_sched_last)(x0)
#else
sw x11, pos_sched_last, t0
#endif

enqueue_end:
jr x9
Expand Down
1 change: 1 addition & 0 deletions rtos/pulpos/common/rules/pulpos/configs/default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CONFIG_KERNEL=1
CONFIG_LDSCRIPT=1
CONFIG_LIBC_MINIMAL=1
#CONFIG_USE_ASM_OPTIM=1
#CONFIG_NO_STD_RELOC=1
CONFIG_IO_UART_ITF=0
CONFIG_IO_UART_BAUDRATE=115200
CONFIG_IO_UART=0
Expand Down
4 changes: 4 additions & 0 deletions rtos/pulpos/pulp/drivers/cluster/pe-eu-v3.S
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ pos_master_loop_exec_task:

add sp, sp, t1

#ifdef CONFIG_NO_STD_RELOC
sw t6, %tiny(pos_cluster_nb_active_pe)(x0)
#else
sw t6, pos_cluster_nb_active_pe, t3
#endif

pos_no_stack_check:
// Whatever the number of cores, we need to setup the barrier as the master code is compiled to use it
Expand Down