Postmortem and lessons learned for Linaro's release 2012.09
https://wiki.linaro.org/Cycles/1209/Release/Review
Highlights and Key Successes
============================
The 12.09 release cycle saw some early work on minimal ARMv8
bootstrap, with a very minimal rootfs to help other developers that
want to get involved with porting. This work is critical for the
future of Linux on ARMv8, as the major GNU/Linux distributions can use
it as base to bootstrap and support this new architechture.
Registration (http://connect.linaro.org/wp-login.php?redirect_to=/register-connect/)
is open for Linaro Connect (LCE 12 Copenhagen) which will be held from
29 Oct to 2 Nov at the Bella Center in Copenhagen, Demark. In
addition to the regular track sessions, LCE 12 will host three mini
summits: an ARMv8 (64-bit) mini-summit on the Tuesday, an Android
mini-summit on the Wednesday and a big.LITTLE mini-summit on the
Thursday.
Postmortem and Lessons Learned
==============================
Development and delivery planning continues to be a high priority as
Linaro continues to grow. The platform team has instituted a release
week standup meeting to coordinate development and release planning
for the upcoming cycle and consolidate QA status for the cycle.
As Linaro expands we will be reviewing our processes to determine the
best and most effiecient way to move forward.
Blueprints
=========
The number of high or essential priority blueprints that missed the cycle:
Android 3 out of 12
Developer Platform 4 out of 6
Infrastructure 1 out of 5
Lava 0 out of 2
QA 1 out of 3
Total 9 out of 28
32% of high or essential priority blueprints scheduled for this cycle
were not delivered.
Total blueprints: 22 out of 53 missed the cycle.
High priority missed blueprints recap:
12.05: 19 out of 48, 39%
12.06: 13 out of 31, 42%
12.07: 14 out of 31, 45%
12.08: 6 out of 26, 23%
12.09: 9 out of 28, 32%
* Not included is data from working groups and landing teams
Source: https://docs.google.com/spreadsheet/ccc?key=0AjEaTwrvj1bidGVXTlFYQUJJcnMxa1…
--
David Zinman
Linaro Release Manager | Project Manager
Linaro.org | Open source software for ARM SoCs
Calendar Week 40: Here is test result summary for Linaro ubuntu image on
following boards:
1) ARM Versatile Express A9;
2) Samsung Origen;
3) TI Panda Board 4430;
4) TI Panda Board 4460.
Synopsis: No change on feature status for vexpress A9 & Samsung Origen
boards. For Panda board, both 4430 & 4460 failed on display, neither HDMI
nor DVI-D works. More details can be found in bug 1060032.
1. vexpress A9 + ubuntu (Column AC):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdFNmV…
Features' status is exactly same as previous week. There are 2 major issues
there, 480p video playback & device tree. For device tree, it's blocked by
a UEFI defect, which Ryan is working on that. For 480p video playback, it
has been unavailable for 12 weeks, hopefully someone will take a look at
it.
2. Origen + ubuntu (Column X):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEowN…
Command "dd" doesn't work for SD card flashing this week, and Linaro Image
Tools finally works after a quick fix on bug 1059501. For features, they
remain the same status as previous week. Perhaps it's time to start work on
those important unavailable features, such like WiFi, Bluetooth, video
playback and HDMI.
3. Panda 4430 + ubuntu (Column Z):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
Display failed, neither HDMI nor DVI-D works. This problem blocks all tests
related to system UI. Also, system crashes at the second time to run power
management test command "# lava-test run pwrmgmt".
4. Panda 4460 + ubuntu (Column Y):
https://docs.google.com/a/linaro.org/spreadsheet/ccc?key=0AroPySpr4FnEdEwwZ…
Display failed, same as Panda 4430, neither HDMI nor DVI-D works. The
different thing is power management works well on this board, not like what
happened on Panda 4430. All command line based test works well.
For the previous week (Calendar week 39 - Linaro 12.09 Release) summary,
please refer to attachment.
Thank you.
Best Regards
Botao Sun
Hi Pawel,
Is there a way to skip the motherboard BIOS too? I know there is a way
to autoboot from
bootmon, which is well described here:
https://wiki.linaro.org/PawelMoll/BootingVEMadeEasy
But, i am looking for something, which can even run the "reboot"
command on BIOS.
--
viresh
> On 4 October 2012 18:06, MyungJoo Ham <myungjoo.ham(a)samsung.com> wrote:
> >> This patchset updates devfreq core to add support for devices
> >> which can idle. When device idleness is detected perhaps
> >> through runtime-pm, need some mechanism to suspend devfreq
> >> load monitoring and resume when device is back online.
> >>
> >> patch 1 introduce core design changes - per device work, decouple
> >> delayed work from core and event based interaction.
> >> patch 2 add devfreq suspend and resume apis.
> >> patch 3 add new sysfs attribute for governor predicted next target
> >> frequency and callback for current device frequency.
> >>
> >> The existing devfreq apis are kept intact. Two new apis
> >> devfreq_suspend_device() and devfreq_resume_device() are
> >> added to support suspend/resume of device devfreq.
> >
> > Could you please tell me which version you have rebased?
> >
> > It seems that the patchset has issues on applying over 3.6.
> > (tried at a0d271cbfed1dd50278c6b06bead3d00ba0a88f9)
>
> These patches are rebased against Linus tree.
>
> The 203b42f7317494ae5e5efc7be6fb7f29c927f102 commit, which
> renames INIT_DELAYED_WORK_DEFERRABLE to
> INIT_DEFERRABLE_WORK could be the reason for patchset
> not applying over 3.6.
Ok, I'll try and test over Linus' latest.
>
> >
> >
> >>
> >> Changes since v1:
> >> - revised locking mechanism
> >> - added kerneldoc comments for load monitoring helper functions
> >> - fixed minor review comments
> >>
> >> Changes since v2:
> >> - added new helper function for polling interval update
> >> - handled work suspend/resume contention between devfreq driver
> >> and sysfs
> >>
> >> Changes since v3:
> >> - added additonal checks in suspend/resume to avoid invalid usage of apis
> >> - added check in devfreq_monitor_start, not to start monitoring when
> >> polling_ms is set to zero.
> >>
> >> --
> >> Rajagopal Venkat (3):
> >> devfreq: Core updates to support devices which can idle
> >> devfreq: Add suspend and resume apis
> >> devfreq: Add current freq callback in device profile
> >>
> >> Documentation/ABI/testing/sysfs-class-devfreq | 15 +-
> >> drivers/devfreq/devfreq.c | 481 ++++++++++++--------------
> >> drivers/devfreq/governor.h | 13 +
> >> drivers/devfreq/governor_performance.c | 16 +-
> >> drivers/devfreq/governor_powersave.c | 16 +-
> >> drivers/devfreq/governor_simpleondemand.c | 33 ++
> >> drivers/devfreq/governor_userspace.c | 23 +-
> >> include/linux/devfreq.h | 49 +--
> >> 8 files changed, 353 insertions(+), 293 deletions(-)
> >>
> >> --
> >> 1.7.11.3
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
>
>
>
> --
> Regards,
> Rajagopal
>
>
>
>
>
>
>
> This patchset updates devfreq core to add support for devices
> which can idle. When device idleness is detected perhaps
> through runtime-pm, need some mechanism to suspend devfreq
> load monitoring and resume when device is back online.
>
> patch 1 introduce core design changes - per device work, decouple
> delayed work from core and event based interaction.
> patch 2 add devfreq suspend and resume apis.
> patch 3 add new sysfs attribute for governor predicted next target
> frequency and callback for current device frequency.
>
> The existing devfreq apis are kept intact. Two new apis
> devfreq_suspend_device() and devfreq_resume_device() are
> added to support suspend/resume of device devfreq.
Could you please tell me which version you have rebased?
It seems that the patchset has issues on applying over 3.6.
(tried at a0d271cbfed1dd50278c6b06bead3d00ba0a88f9)
>
> Changes since v1:
> - revised locking mechanism
> - added kerneldoc comments for load monitoring helper functions
> - fixed minor review comments
>
> Changes since v2:
> - added new helper function for polling interval update
> - handled work suspend/resume contention between devfreq driver
> and sysfs
>
> Changes since v3:
> - added additonal checks in suspend/resume to avoid invalid usage of apis
> - added check in devfreq_monitor_start, not to start monitoring when
> polling_ms is set to zero.
>
> --
> Rajagopal Venkat (3):
> devfreq: Core updates to support devices which can idle
> devfreq: Add suspend and resume apis
> devfreq: Add current freq callback in device profile
>
> Documentation/ABI/testing/sysfs-class-devfreq | 15 +-
> drivers/devfreq/devfreq.c | 481 ++++++++++++--------------
> drivers/devfreq/governor.h | 13 +
> drivers/devfreq/governor_performance.c | 16 +-
> drivers/devfreq/governor_powersave.c | 16 +-
> drivers/devfreq/governor_simpleondemand.c | 33 ++
> drivers/devfreq/governor_userspace.c | 23 +-
> include/linux/devfreq.h | 49 +--
> 8 files changed, 353 insertions(+), 293 deletions(-)
>
> --
> 1.7.11.3
>
>
>
>
>
>
>
>
When I try to build the Linux kernel version 3.6 with the gcc-4.7
nightly build Linaro toolchains,
$ arm-eabi-gcc --version
arm-eabi-gcc (Linaro GCC 4.7-2012.09-1~dev) 4.7.2 20120910 (prerelease)
$ arm-eabi-as --version
GNU assembler (Linux/GNU Binutils) 2.23.51.0.3.20120918
I get a compiler error (actually, assembler error):
AS arch/arm/lib/copy_from_user.o
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S: Assembler messages:
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:100: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:118: Error: selected processor does not support ARM mode `ldralt r3,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:119: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:120: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:121: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:122: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:123: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:124: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:173: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:243: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:245: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r4,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r5,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r6,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r7,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r8,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt r9,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt ip,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
/a/home/tbird/work/auto-reduce/lto-test/linux-3/arch/arm/lib/copy_template.S:247: Error: selected processor does not support ARM mode `ldralt lr,[r1],#4'
make[2]: *** [arch/arm/lib/copy_from_user.o] Error 1
make[1]: *** [arch/arm/lib] Error 2
make[1]: *** Waiting for unfinished jobs....
This appears to be related to the following bug report for binutils:
http://sourceware.org/ml/binutils/2012-09/msg00128.html
I'm compiling the kernel for PandaBoard
Any ideas for work-arounds or fixes for this? Note that the ldralt instruction
doesn't actually appear in copy_template.S (maybe it's coming from a macro?)
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================
Hi Andrey,
Please PULL b.L MP V9 branch from my tree.
Updates:
-----------
- Based on v3.6
- Stats:
- Total Patches: 63
- New Patches: 0
- Merged Patches: 3
- f319da0 sched: Fix load avg vs cpu-hotplug
- 641f145 hwmon: (coretemp) Use get_online_cpus to avoid races
involving CPU hotplug
- 1ec3ddf hwmon: (via-cputemp) Use get_online_cpus to avoid races
involving CPU hotplug
- Dropped Patches: 0
NOTE: Below pull request is generated against v3.6 instead of linux-linaro.
------------------------8<------------------------------------------------
The following changes since commit a0d271cbfed1dd50278c6b06bead3d00ba0a88f9:
Linux 3.6 (2012-09-30 16:47:46 -0700)
are available in the git repository at:
git://git.linaro.org/arm/big.LITTLE/mp.git big-LITTLE-MP-v9
for you to fetch changes up to 619245dc532b1d1b59cd414ae4d87e9b3ae42c65:
Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v2', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1', 'rcu-hotplug-v1',
'arm-multi_pmu_v1', 'scheduler-misc-v1' and 'config-fragments' into
big-LITTLE-MP-v9 (2012-10-03 16:29:42 +0530)
----------------------------------------------------------------
Axel Lin (1):
ARM: ux500: Fix build error due to missing include of asm/pmu.h
in cpu-db8500.c
Ben Segall (1):
sched: maintain per-rq runnable averages
Jon Hunter (1):
ARM: PMU: Add runtime PM Support
Jon Medhurst (5):
configs: Initial core configs
configs: Make CONFIG_MODULES part of linaro-base
configs: Replace CONFIG_PERF_COUNTERS with CONFIG_PERF_EVENTS
configs: android: Enable FB_EARLYSUSPEND
configs: android: Enable CONFIG_INPUT_UINPUT to get aidb working
Lorenzo Pieralisi (1):
ARM: kernel: provide cluster to logical cpu mask mapping API
Morten Rasmussen (10):
sched: entity load-tracking load_avg_ratio
sched: Task placement for heterogeneous systems based on task
load-tracking
sched: Forced task migration on heterogeneous systems
sched: Introduce priority-based task migration filter
ARM: Add HMP scheduling support for ARM architecture
ARM: sched: Use device-tree to provide fast/slow CPU list for HMP
ARM: sched: Setup SCHED_HMP domains
sched: Add ftrace events for entity load-tracking
sched: Add HMP task migration ftrace event
sched: SCHED_HMP multi-domain task migration control
Paul E. McKenney (4):
rcu: Use smp_hotplug_thread facility for RCUs per-CPU kthread
hotplug: Fix UP bug in smpboot hotplug code
rcu: Remove _rcu_barrier() dependency on __stop_machine()
rcu: Disallow callback registry on offline CPUs
Paul Turner (15):
sched: track the runnable average on a per-task entitiy basis
sched: aggregate load contributed by task entities on parenting cfs_rq
sched: maintain the load contribution of blocked entities
sched: add an rq migration call-back to sched_class
sched: account for blocked load waking back up
sched: aggregate total task_group load
sched: compute load contribution by a group entity
sched: normalize tg load contributions against runnable time
sched: maintain runnable averages across throttled periods
sched: replace update_shares weight distribution with per-entity
computation
sched: refactor update_shares_cpu() -> update_blocked_avgs()
sched: update_cfs_shares at period edge
sched: make __update_entity_runnable_avg() fast
sched: implement usage tracking
sched: introduce temporary FAIR_GROUP_SCHED dependency for load-tracking
Ricardo Salveti de Araujo (7):
configs: moving previous ubuntu.conf as ubuntu-minimal and
creating a full ubuntu one
configs: ubuntu: be compatible with the enforce script
configs: ubuntu: disabling CODA_FS, seems to be broken atm
configs: ubuntu: disabling CGROUPS as default
configs: ubuntu: updating configs for 3.5
configs: ubuntu: disabling CONFIG_MTD_NAND_NANDSIM=m, breaking build
config: ubuntu: ATH6KL should be platform dependent
Silas Boyd-Wickizer (4):
Use get_online_cpus to avoid races involving CPU hotplug
Use get_online_cpus to avoid races involving CPU hotplug
Use get_online_cpus to avoid races involving CPU hotplug
Use get_online_cpus to avoid races involving CPU hotplug
Sudeep KarkadaNagesha (9):
ARM: pmu: remove arm_pmu_type enumeration
ARM: perf: move irq registration into pmu implementation
ARM: perf: allocation of cpu_pmu at init time
ARM: perf: change multiple arm_pmu function parameters to struct
perf_event
ARM: perf: rework on armv7_pmnc_counter_valid
ARM: perf: define per-cpu arm_pmu instead of a single global pointer
ARM: perf: register the init functions with the bindings
ARM: perf: add support for per-cluster/multiple PMUs
ARM: perf: save/restore pmu registers in pm notifier
Thomas Gleixner (6):
rcu: Yield simpler
kthread: Implement park/unpark facility
smpboot: Provide infrastructure for percpu hotplug threads
softirq: Use hotplug thread infrastructure
watchdog: Use hotplug thread infrastructure
infiniband: ehca: Use hotplug thread infrastructure
Tushar Behera (1):
linaro/configs: ubuntu: Disable support for generic OHCI platform driver
Vincent Guittot (2):
sched: cpu_power: enable ARCH_POWER
sched: Fix nohz_idle_balance()
Viresh Kumar (4):
configs: Add config fragments for big LITTLE MP
linaro/configs: Update big LITTLE MP fragment for task placement work
config-frag/big-LITTLE: Use device-tree to provide fast/slow CPU
list for HMP
Merge branches 'per-cpu-thread-hotplug-v3-fixed',
'task-placement-v2', 'cpu-hotplug-get_online_cpus-v1',
'arm-asymmetric-support-v3-v3.6-rc1', 'rcu-hotplug-v1',
'arm-multi_pmu_v1', 'scheduler-misc-v1' and 'config-fragments' into
big-LITTLE-MP-v9
Will Deacon (6):
ARM: perf: add devicetree bindings for 11MPcore, A5, A7 and A15 PMUs
ARM: pmu: remove unused reservation mechanism
ARM: perf: remove mysterious compiler barrier
ARM: perf: probe devicetree in preference to current CPU
ARM: perf: prepare for moving CPU PMU code into separate file
ARM: perf: move CPU-specific PMU handling code into separate file
Currently, the bootwrapper switches unconditionally to NS Hyp mode,
which prevents successful execution of a kernel which expects to
start in the Secure world.
This patch adds a --secure command-line option to enable Secure
world booting.
NS HYP remains the default.
Signed-off-by: Dave Martin <dave.martin(a)linaro.org>
---
Note that this is just an RFC -- I've not tested it yet.
With some additional CCI and CPU reset related hacks, I hope to get the
in-kernel switcher kernel booting with this.
boot.S | 36 ++++++++++++++++++++++++++++--------
boot.h | 29 +++++++++++++++++++++++++++++
semi_loader.c | 11 +++++++++++
3 files changed, 68 insertions(+), 8 deletions(-)
create mode 100644 boot.h
diff --git a/boot.S b/boot.S
index 727119a..64cd0fa 100644
--- a/boot.S
+++ b/boot.S
@@ -7,18 +7,28 @@
* found in the LICENSE.txt file.
*/
+#include "boot.h"
+
.syntax unified
.arch_extension sec
.arch_extension virt
.text
-.macro enter_hyp
- @ We assume we're entered in Secure Supervisor mode. To
- @ get to Hyp mode we have to pass through Monitor mode
- @ and NS-Supervisor mode. Note that there is no way to
- @ return to the Secure world once we've done this.
- @
+.macro enter_kernel_state
@ This will trash r10 and r11.
+ @ We assume we're entered in Secure Supervisor mode.
+
+ @ If requested, stay in Secure SVC to enter the kernel:
+
+ ldr r10, =kernel_boot_mode
+ ldr r10, [r10]
+ cmp r10, #BOOT_MODE_S_SVC
+ beq 1f
+
+ @ Otherwise: to get to Hyp mode we have to pass through Monitor
+ @ mode and NS-Supervisor mode. Note that there is no way to
+ @ return to the Secure world once we've done this.
+
ldr r10, =vectors
mcr p15, 0, r10, c12, c0, 1 @ Monitor vector base address
@ Switch to monitor mode, which will set up the HVBAR and
@@ -26,7 +36,9 @@
smc #0
@ Now we're in NS-SVC, make a Hyp call to get into Hyp mode
hvc #0
+
@ We will end up here in NS-Hyp.
+1:
.endm
.align 5
@@ -128,7 +140,7 @@ start:
@
@ Secondary CPUs (following the RealView SMP booting protocol)
@
- enter_hyp
+ enter_kernel_state
ldr r1, =fs_start - 0x100
adr r2, 1f
@@ -198,7 +210,7 @@ __boot_kernel:
stmfd sp!, {r1-r3}
ldmia sp, {r0-r3}
- enter_hyp
+ enter_kernel_state
bx r4
.type __boot_kernel, %function
@@ -214,3 +226,11 @@ kernel_cmd:
.asciz KCMD
#endif
kernel_cmd_end:
+
+
+.bss
+.align 2
+
+.globl kernel_boot_mode
+kernel_boot_mode:
+ .skip 4 @ defaults to BOOT_MODE_NS_HYP (0)
diff --git a/boot.h b/boot.h
new file mode 100644
index 0000000..b80227e
--- /dev/null
+++ b/boot.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012 Linaro Limited
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name of Linaro Limited nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ */
+
+#ifndef BOOT_H
+#define BOOT_H
+
+#define BOOT_MODE_NS_HYP 0
+#define BOOT_MODE_S_SVC 1
+
+#ifndef __ASSEMBLER__
+extern int kernel_boot_mode;
+#endif /* ! __ASSEMBLER__ */
+
+#endif /* BOOT_H */
diff --git a/semi_loader.c b/semi_loader.c
index cbe911c..ef927e7 100644
--- a/semi_loader.c
+++ b/semi_loader.c
@@ -17,6 +17,7 @@
*/
#include <string.h>
+#include "boot.h"
#include "libfdt.h"
#include "semihosting.h"
#include "semi_loader.h"
@@ -49,6 +50,7 @@ static void _print_info(char const **strings)
#define CMDLINE_NOINITRD "--no-initrd"
#define CMDLINE_DTB "--dtb"
#define CMDLINE_FDT "--fdt" /* deprecated */
+#define CMDLINE_SECURE "--secure"
#define CMDLINE_REST "-- "
static void _usage_fatal(void)
@@ -378,6 +380,7 @@ static char *fdt_arg = (void *)0;
static char *dtb_arg = (void *)0;
static char *cmdline_arg = (void *)0;
static char *noinitrd_arg = (void *)0;
+static char *secure_arg = (void *)0;
static const struct {
char const *option_string;
@@ -389,6 +392,7 @@ static const struct {
{ CMDLINE_NOINITRD, &noinitrd_arg, OPT_BOOL },
{ CMDLINE_FDT, &fdt_arg, OPT_ARG },
{ CMDLINE_DTB, &dtb_arg, OPT_ARG },
+ { CMDLINE_SECURE, &secure_arg, OPT_BOOL },
{ CMDLINE_REST, &cmdline_arg, OPT_REST },
};
@@ -476,6 +480,13 @@ args_done:
dtb_arg = fdt_arg;
}
+ info("Kernel will be booted in ");
+ if(secure_arg) {
+ kernel_boot_mode = BOOT_MODE_S_SVC;
+ info("Secure SVC mode.\n");
+ } else
+ info("HYP mode.\n");
+
/*
* Now, proceed to load images and set up ATAGs.
* For simplicity, ATAGs are generated even if there is a DTB
--
1.7.4.1