aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Kung <kong1191@gmail.com>2015-01-09 19:05:47 +0800
committerJames Kung <kong1191@gmail.com>2015-01-09 19:08:04 +0800
commitce433275edfd055a5ebc4085642b44813ee573e7 (patch)
tree4d886f348ce9304e4e012bf2e7f41849d3bf64eb
parentace7ec696e3f6709902ac05c5523ab60ba00ecd6 (diff)
Add linux kernel patch and revert to use original version of arm trusted firmware
-rw-r--r--linux_patch/0001-enable_phycnt.patch27
-rwxr-xr-xscript/setup_fvp_optee.sh25
2 files changed, 39 insertions, 13 deletions
diff --git a/linux_patch/0001-enable_phycnt.patch b/linux_patch/0001-enable_phycnt.patch
new file mode 100644
index 0000000..906690c
--- /dev/null
+++ b/linux_patch/0001-enable_phycnt.patch
@@ -0,0 +1,27 @@
+From 366e23c82dc00189853d7ea869d1aef583bca383 Mon Sep 17 00:00:00 2001
+From: James Kung <kong1191@gmail.com>
+Date: Fri, 9 Jan 2015 18:55:35 +0800
+Subject: [PATCH] Enable user access to the physical counter for performance
+ measurement
+
+---
+ drivers/clocksource/arm_arch_timer.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
+index 2133f9d..3cb6d01 100644
+--- a/drivers/clocksource/arm_arch_timer.c
++++ b/drivers/clocksource/arm_arch_timer.c
+@@ -338,6 +338,9 @@ static void arch_counter_set_user_access(void)
+ | ARCH_TIMER_VIRT_EVT_EN
+ | ARCH_TIMER_USR_PCT_ACCESS_EN);
+
++ /* Enable user access to the physical counter */
++ cntkctl |= ARCH_TIMER_USR_PCT_ACCESS_EN;
++
+ /* Enable user access to the virtual counter */
+ cntkctl |= ARCH_TIMER_USR_VCT_ACCESS_EN;
+
+--
+1.9.3
+
diff --git a/script/setup_fvp_optee.sh b/script/setup_fvp_optee.sh
index 2b02865..f4efbb8 100755
--- a/script/setup_fvp_optee.sh
+++ b/script/setup_fvp_optee.sh
@@ -3,7 +3,7 @@
# EDIT so these match your credentials #
################################################################################
DEV_PATH=$HOME/devel/fvp_optee_benchmark
-SRC_FVP=
+SRC_FVP=1
# You only need to set these variables if you have access to the OPTEE_TEST
# (requires a Linaro account and access to the git called optee_test.git)
@@ -27,9 +27,9 @@ fi
# Until something official ARM-TF supports loading a partitioned OP-TEE
# SRC_ARM_TF=https://github.com/ARM-software/arm-trusted-firmware.git
-SRC_ARM_TF=https://github.com/kong1191/arm-trusted-firmware.git
+SRC_ARM_TF=https://github.com/jenswi-linaro/arm-trusted-firmware.git
DST_ARM_TF=$DEV_PATH/arm-trusted-firmware
-STABLE_ARM_TF_COMMIT=640e3639868207b245552a415277d106c4068bdd
+STABLE_ARM_TF_COMMIT=db4b9efe59b4f76e9680836a443158fde0f12e40
SRC_KERNEL=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
DST_KERNEL=$DEV_PATH/linux
@@ -44,7 +44,6 @@ STABLE_CLIENT_COMMIT=2893f86b0925bc6be358a6913a07773b2b909ee3
SRC_OPTEE_LK=https://github.com/kong1191/optee_linuxdriver.git
DST_OPTEE_LK=$DEV_PATH/optee_linuxdriver
-STABLE_LK_COMMIT=a6026e5c41abe32fc973d8fa5e0fe281bf01a8f3
SRC_OPTEE_TEST=ssh://$LINARO_USERNAME@linaro-private.git.linaro.org/srv/linaro-private.git.linaro.org/swg/optee_test.git
DST_OPTEE_TEST=$DEV_PATH/optee_test
@@ -79,6 +78,12 @@ DST_AARCH32_GCC=$DEV_PATH/toolchains/$AARCH32_GCC
################################################################################
# Cloning all needed repositories #
################################################################################
+if [ ! -d "$DST_OPTEE_BENCHMARK" ]; then
+ git clone $SRC_OPTEE_BENCHMARK $DST_OPTEE_BENCHMARK
+else
+ echo " `basename $DST_OPTEE_BENCHMARK` already exist, not cloning"
+fi
+
cd $DEV_PATH
if [ ! -d "$DST_ARM_TF" ]; then
git clone $SRC_ARM_TF && cd $DST_ARM_TF && git reset --hard $STABLE_ARM_TF_COMMIT
@@ -88,7 +93,7 @@ fi
cd $DEV_PATH
if [ ! -d "$DST_KERNEL" ]; then
- git clone $SRC_KERNEL && cd $DST_KERNEL && git reset --hard $STABLE_KERNEL_COMMIT
+ git clone $SRC_KERNEL && cd $DST_KERNEL && git reset --hard $STABLE_KERNEL_COMMIT && git am $DST_OPTEE_BENCHMARK/linux_patch/*
else
echo " `basename $DST_KERNEL` already exist, not cloning"
fi
@@ -109,7 +114,7 @@ fi
cd $DEV_PATH
if [ ! -d "$DST_OPTEE_LK" ]; then
- git clone $SRC_OPTEE_LK && cd $DST_OPTEE_LK && git reset --hard $STABLE_LK_COMMIT
+ git clone $SRC_OPTEE_LK
else
echo " `basename $DST_OPTEE_LK` already exist, not cloning"
fi
@@ -121,12 +126,6 @@ else
echo " `basename $DST_OPTEE_TEST` already exist (or no access), not cloning"
fi
-if [ ! -d "$DST_OPTEE_BENCHMARK" ]; then
- git clone $SRC_OPTEE_BENCHMARK $DST_OPTEE_BENCHMARK
-else
- echo " `basename $DST_OPTEE_BENCHMARK` already exist, not cloning"
-fi
-
cd $DEV_PATH
if [ ! -d "$DST_GEN_ROOTFS" ]; then
git clone $SRC_GEN_ROOTFS && cd $DST_GEN_ROOTFS && git reset --hard $STABLE_GEN_ROOTFS_COMMIT
@@ -318,7 +317,7 @@ export BL33=$DST_EDK2/Build/ArmVExpress-FVP-AArch64/RELEASE_GCC49/FV/FVP_AARCH64
cd $DST_ARM_TF
make -j\`getconf _NPROCESSORS_ONLN\` \\
- DEBUG=$DEBUG \\
+ DEBUG= \\
FVP_TSP_RAM_LOCATION=tdram \\
FVP_SHARED_DATA_LOCATION=tdram \\
PLAT=fvp \\