diff --git a/base-foc/lib/mk/arm/base.mk b/base-foc/lib/mk/arm/base.mk new file mode 100644 index 000000000..5d2889686 --- /dev/null +++ b/base-foc/lib/mk/arm/base.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base.inc + +SRC_CC += thread/thread_context_area.cc diff --git a/base-foc/lib/mk/base.mk b/base-foc/lib/mk/base.inc similarity index 86% rename from base-foc/lib/mk/base.mk rename to base-foc/lib/mk/base.inc index 915c86331..8f0a09bb4 100644 --- a/base-foc/lib/mk/base.mk +++ b/base-foc/lib/mk/base.inc @@ -9,7 +9,7 @@ LIBS += base-common SRC_CC += console/log_console.cc SRC_CC += env/env.cc env/context_area.cc env/reload_parent_cap.cc \ env/cap_map_remove.cc env/cap_alloc.cc -SRC_CC += thread/thread_start.cc thread/thread_context_area.cc +SRC_CC += thread/thread_start.cc INC_DIR += $(BASE_DIR)/src/base/env diff --git a/base-foc/lib/mk/exynos5/base.mk b/base-foc/lib/mk/exynos5/base.mk new file mode 100644 index 000000000..5de464872 --- /dev/null +++ b/base-foc/lib/mk/exynos5/base.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base.inc + +SRC_CC += thread/arndale/thread_context_area.cc diff --git a/base-foc/lib/mk/x86/base.mk b/base-foc/lib/mk/x86/base.mk new file mode 100644 index 000000000..5d2889686 --- /dev/null +++ b/base-foc/lib/mk/x86/base.mk @@ -0,0 +1,3 @@ +include $(REP_DIR)/lib/mk/base.inc + +SRC_CC += thread/thread_context_area.cc diff --git a/base-foc/src/core/arndale/thread_context_area.cc b/base-foc/src/base/thread/arndale/thread_context_area.cc similarity index 70% rename from base-foc/src/core/arndale/thread_context_area.cc rename to base-foc/src/base/thread/arndale/thread_context_area.cc index b9c7c2772..9764793d7 100644 --- a/base-foc/src/core/arndale/thread_context_area.cc +++ b/base-foc/src/base/thread/arndale/thread_context_area.cc @@ -6,6 +6,10 @@ * We need to place the context area within core outside the physical memory. * Sigma0 maps physical to core-local memory always 1:1 when using * SIGMA0_REQ_FPAGE_ANY. Those mappings would interfere with the context area. + * + * Because the UTCB area of a task resides at the end of the context area and + * its address gets calculated by core, the context area in other tasks needs + * to be at the same address as in core. */ #include diff --git a/base-foc/src/core/arndale/target.mk b/base-foc/src/core/arndale/target.mk index 51858401f..4290ec929 100644 --- a/base-foc/src/core/arndale/target.mk +++ b/base-foc/src/core/arndale/target.mk @@ -1,5 +1,5 @@ # override default location of thread context area within core -vpath thread_context_area.cc $(PRG_DIR) +vpath thread_context_area.cc $(REP_DIR)/src/base/thread/arndale include $(PRG_DIR)/../target.inc