From 5ef7ff315716e7caa1291b727aa280f31bd67a54 Mon Sep 17 00:00:00 2001 From: Germain Haugou Date: Mon, 20 Jan 2020 21:24:53 +0100 Subject: [PATCH] Few fixes to be able to use runtime without FC on pulp-open --- include/archi/chips/pulp/properties.h | 2 ++ include/pulp.h | 2 ++ kernel/cluster.c | 18 ++++++++++++++++-- kernel/crt0.S | 4 ++++ kernel/init.c | 7 +++++++ lib/libc/minimal/io.c | 14 ++++++++++++-- rules/pulpos/default_rules.mk | 4 ++++ 7 files changed, 47 insertions(+), 4 deletions(-) diff --git a/include/archi/chips/pulp/properties.h b/include/archi/chips/pulp/properties.h index c4de13b..35bcb96 100644 --- a/include/archi/chips/pulp/properties.h +++ b/include/archi/chips/pulp/properties.h @@ -95,9 +95,11 @@ * FC */ +#ifndef ARCHI_NO_FC #define ARCHI_FC_CID 31 #define ARCHI_HAS_FC_ITC 1 #define ARCHI_HAS_FC 1 +#endif /* diff --git a/include/pulp.h b/include/pulp.h index bf97959..a3b8038 100755 --- a/include/pulp.h +++ b/include/pulp.h @@ -36,6 +36,8 @@ typedef enum { void cluster_start(int cid, int (*entry)()); +void cluster_entry_stub(); + int cluster_wait(int cid); void _start(); diff --git a/kernel/cluster.c b/kernel/cluster.c index ff02de2..70906a2 100644 --- a/kernel/cluster.c +++ b/kernel/cluster.c @@ -36,11 +36,14 @@ static void pos_wait_forever() -void cluster_entry_stub() +static void cluster_core_init() { eu_evt_maskSet((1<=3 + eu_evt_maskClr(0xffffffff); + eu_evt_wait(); +#endif + } #elif defined(EU_VERSION) && EU_VERSION >=3 eu_evt_maskClr(0xffffffff); eu_evt_wait(); diff --git a/rules/pulpos/default_rules.mk b/rules/pulpos/default_rules.mk index 1e4c986..b3e60bc 100644 --- a/rules/pulpos/default_rules.mk +++ b/rules/pulpos/default_rules.mk @@ -71,6 +71,10 @@ ifdef CONFIG_NB_PE PULP_CFLAGS += -DARCHI_CLUSTER_NB_PE=$(CONFIG_NB_PE) endif +ifdef CONFIG_NO_FC +PULP_CFLAGS += -DARCHI_NO_FC=1 +endif + ifdef CONFIG_IO_UART PULP_CFLAGS += -DCONFIG_IO_UART=$(CONFIG_IO_UART) endif