1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
Commit Graph

98 Commits

Author SHA1 Message Date
Marc Bonnici
ba0cd7f842 fw/target/info: Bump target info version
Due to mismatches in WA and devlib versions this previous upgrade method
could have been trigger before it was needed and would not be called a
second time. Now we can be sure that WA and devlib are updated together
bump the version number again to ensure the upgrade method is called a
second time to ensure the POD is upgraded correctly.
2019-03-04 10:37:39 +00:00
Marc Bonnici
4a9a2ad105 fw/target/info: Fix for KernelConfig refactor
The Devlib KernelConfig object was refactored in commit
f65130b7c7
therefore update the way KernelConfig objects are deserialized to reflect the new
implementation and provide a conversion for PODs.
2019-01-31 09:44:30 +00:00
Marc Bonnici
6b03653227 fw/rt_config: Update tunables parameter to match other formats
Update RT param `governor_tunables` to `gov_tunables` to match the style
of the other paramters e.g. `big_gov_tunables`.
2018-12-14 07:44:44 +00:00
Marc Bonnici
a9e254742a fw/rt_param_manager: Add support for aliased parameters
Additionally check for aliases when matching runtime parameters to their
corresponding cfg points.
2018-12-14 07:44:44 +00:00
Marc Bonnici
92cf132cf2 fw/target/info: Implement TargetInfo structures as Podable
Ensure that the various data structures used to store target information
now have a serialization versions.
2018-12-07 08:46:12 +00:00
Marc Bonnici
88f708abf5 target/descriptor: Update default sudo command format
Due to changes introduced in devlib https://github.com/ARM-software/devlib/pull/339
the command placeholder should no longer be in quote so remove them from
the default value.
2018-11-21 15:07:25 +00:00
Sergei Trofimov
ce94638436 fw/target: record page size as part of TargetInfo
Record target.page_size_kb as part of target info.
2018-11-02 12:11:00 +00:00
Sergei Trofimov
d1fba957b3 fw/target: add versioning to TargetInfo
Add format_version class attribute to TargetInfo to track format
changes. This is checked when deserializing from POD to catch format
changes between cached and obtained TargetInfo's.
2018-11-02 12:11:00 +00:00
Marc Bonnici
a7d0b6fdbd target/descriptor: Do not convert the module list to strings
Change the type of the `modules` to `list` so that additional
configuration can be supplied to individual modules as a dict of values.
2018-09-21 15:06:30 +01:00
Marc Bonnici
7d01258bce fw/target/manager: Do no finalize target if not instantiated
In the case of an error occurring during target initialization do not
try and check for disconnecting upon finalizing.
2018-09-21 15:06:30 +01:00
Sergei Trofimov
e8f545861d fw: cache target info
Cache target info after pulling it from the device. Attempt to retrieve
from cache before querying target.
2018-07-13 15:53:01 +01:00
Sergei Trofimov
dacb350992 fw/target: add system_id to TargetInfo
Add target's system_id to TargetInfo. This ID is intended to be unique
of the combination of hardware and software on the target.
2018-07-13 13:28:50 +01:00
Marc Bonnici
5714c8e6a1 wa: Additional pylint fixes 2018-07-10 12:56:51 +01:00
Marc Bonnici
925bc8b719 wa: pep8 fixes 2018-07-06 14:39:41 +01:00
Sergei Trofimov
03eafe6b33 framework: pep8 fixes
Fix issues reported by flake8.
2018-07-06 14:39:41 +01:00
Sergei Trofimov
f74b7ae78c framework: fix pylint issues
Fix/disable checks for issues reported by pylint under wa/framework.
2018-07-06 14:39:41 +01:00
Sergei Trofimov
8878cc20d4 Update copyright headers.
- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
  existing headers.
2018-07-04 16:33:31 +01:00
Sergei Trofimov
8da911e9d5 fw/target: add initialize() to TargetManger
Add explicit initialization to TargetManger in order to separate the
creation of the TargetManger form connection to the target.
2018-06-22 18:04:16 +01:00
Sergei Trofimov
9f06950fb1 fw/target: account for platform_target_defaults
When iterating over PLATFORMS tuples, account for the
platform_target_defaults introduced by 7470fb5ee.

Also, correct the tuple description in the comments.
2018-06-19 11:23:12 +01:00
Waleed El-Geresy
7470fb5ee9 Add target-params to Platform Tuple
Added support for specifying target parameters in the Platform tuple.
2018-06-14 12:06:33 +01:00
Sergei Trofimov
2f99137ad5 fw/target: fix signals reboot on unresponsive
- Add "hard" parameter to TargetManager's reboot().
- Pass in context to TargetManager's reboot() and
  verify_target_responsive() -- this is needed for signal dispatch.
- Call self.reboot() instead of self.target.reboot() when attempting a
  reset for unresponsive targets inside TargetManager, in order to
  ensure that appropriate signals are dispatched.
2018-06-12 16:07:53 +01:00
Sergei Trofimov
b3de85455a Add support for Python 3
Add support for running under Python 3, while maintaining compatibility
with Python 2.

See http://python-future.org/compatible_idioms.html for more details
behind these changes.
2018-06-07 14:48:40 +01:00
Marc Bonnici
2cd355195f fw/rt_config: Fix validation checks
Remove unnecessary validation checks and fix remaining so they don't fail
under certain combinations of parameters.
2018-06-01 15:33:10 +01:00
Marc Bonnici
9035c654bd fw/rt_config: Allow for auto determine 'max' and 'min' for other freqs
Allow users to specify 'max' and 'min' for the maximum and minimum
frequencies to be set for a cpu as well as the current frequency.
2018-06-01 15:33:10 +01:00
Marc Bonnici
e1518e8c5d fw/rt_config: Refactor and fix method calls to resolve 'max'/'min'
Previously incorrect method calls were used to try and convert 'max' and
'min' into their corresponding frequencies, now call the correct methods
and refactor the conversion into a separate method.
2018-06-01 15:33:10 +01:00
Sergei Trofimov
43d047eeb5 fw: implement reboot signals
- Wire up reboot signals via the TargetManager
- Add instrument mappings for the same.
2018-05-29 11:56:39 +01:00
Marc Bonnici
dc41af1f3f framework/tm: Ensure RebootPolicy is respected with unresponsive target
Expose the RebootPolicy as an attribute of the ExectionContext and ensure
that that the target is not automatically rebooted if the reboot
policy is set to "Never".
2018-05-23 10:14:34 +01:00
Marc Bonnici
a61bca1a54 target/info: Fix typo 2018-05-14 16:34:10 +01:00
Sergei Trofimov
629abb1afc fw/target: add hostname to TargetInfo
Would especially be useful for Linux targets.
2018-05-10 11:51:24 +01:00
Sergei Trofimov
30eb98b275 fw/target: add hostid to TargetInfo
Add hostid entry, as reported by busybox's hostid applet, to TargetInfo.
This is intended to be a "unique 32-bit identifier for the current
machine". In practice, it may not be set, or may be generated from
something like an IP address, so may not be unique. However, if set, it
is still likely to be more unique than kernel/os version so may be worth
recording.
2018-05-10 11:51:24 +01:00
sergei Trofimov
181862b7ff fw/target: add sched_features to TargetInfo
Attempt to read scheduler features (debugfs might not be mounted) and
add them to TargetInfo.
2018-05-10 11:51:24 +01:00
sergei Trofimov
84fba8617d fw/target: enhanced cpu info
Replace Target.cpuinfo, which contained parsed contents of
/proc/cpuinfo, with a list of more comprehensive CpuInfo objects which
include cpufreq and cpuidle information as well.
2018-05-10 11:51:24 +01:00
sergei Trofimov
2d39e5699f fw/target: make TargetInfo more POD-like
Split out the loading of the TargetInfo from a target into a separate
function, leaving TargetInfo as a simple container.
2018-05-10 11:51:24 +01:00
Marc Bonnici
85d5d4f7df target/chromeosassistant: Fix missing disable_selinux parameter
Adds missing `disable_selinux` parameter to the chromeos assistant and
pass it to the android assistant if applicable.
2018-03-29 16:22:21 +01:00
Sergei Trofimov
10f79c37c2 fw/target/descriptor: add usability functions
- Add SimpleTargetDescriptor that simply returns a global list of target
  descriptions.
- Add create_target_description function to populate that list with a
  description crated from the specified components.
- Add add_description_for_target helper function to create a description
  for the specified target class, and specified components. For
  components that are not explicitly specified, attempt to guess
  sensible defaults based on the target class' bases.
2018-03-08 11:18:12 +00:00
Sergei Trofimov
9303c70727 fw/target/descriptor: fixes
- fix TargetDescription._set to set lists rather than dicts for params
  to be consistent with how params are set after creation (should
  probably get rid of this entirely...)
- fix the comment describing the structure of TARGETS
2018-03-08 11:18:12 +00:00
Sergei Trofimov
6fe31d6cad fw/execution: Handle unresponsive targets
If a target error occurs, check whether the target is unresponsive. If
it is, attempt to hard reset it if possible, or gracefully terminate
execution if not.
2018-03-08 11:18:12 +00:00
Sergei Trofimov
fdb872d9cd fw/target/manager: Add verify_target_responsive()
Add a method to check that the target is still responsive, and cache
the value so that the target does not need to be repeatedly probed
during various stages of wrapping up execution.
2018-03-08 11:18:12 +00:00
Sergei Trofimov
0728f35cbe framwork/target: parameterize disabling of SELinux
Add a parameter to optionally not attempt to disable SELinux as that can
cause problems on some platforms.
2018-02-22 11:20:35 +00:00
Marc Bonnici
52dca17fef target/descriptor: Fix generate target default config
Was previously expecting a dictionary of parameter attributes however the
actual type is a list.
2018-02-15 13:42:48 +00:00
Marc Bonnici
22a2ccf7d6 target/logcatpoller: Make capitalisation consistent 2018-02-07 10:01:12 +00:00
Marc Bonnici
728057dbba target/androidassistant: Fix Logcat poller creation
Threads cannot be restarted therfore we need to create a new polling
thread for each time the poller is started.
2018-02-07 10:01:12 +00:00
Marc Bonnici
36309a4cf2 target/assistant: Fix logcat poller
Rename the `start` method to `run` as this is what is what is called
by the threading module's `start` method, otherwise this causes the
polling to be done in the main thread blocking execution.
2018-02-07 10:01:12 +00:00
Marc Bonnici
1101c358d0 framework/rt_config: Add support for chromeos for some AndroidRTConfig
Allows setting of select android runtime configuration for devices running
chromeos and which support android. Currently only 'brightness' is functioning
correctly therefore the other parameters are only enable for standard android devices.
2018-01-25 06:32:37 +00:00
Marc Bonnici
b4d6017dd4 framework/descriptor: Add ChromeOsTarget 2018-01-25 06:32:37 +00:00
Marc Bonnici
a7bf5c2df9 ChromeOsAssistant: Add assistant for ChromeOS 2018-01-25 06:32:37 +00:00
Marc Bonnici
776a4d850b framework/rt_config: Remove over cautious error checking.
Previously when validating cpufreq runtime parameters it would check too
early whether the cpu was online, not allowing for the fact that the cpu
might be being onlined before the parameter was committed to the device.
2018-01-18 16:16:45 +00:00
Marc Bonnici
3cf789e352 framework/rt_config: Fix not being able to turn off all cpus in cluster
Add missing equality sign in constraint for runtime parameters.
2018-01-18 16:16:45 +00:00
Marc Bonnici
60c16c802f framework/rt_config: Fix typo in hotplug big.LITTLE RT Params 2018-01-18 16:16:45 +00:00
Sergei Trofimov
fbb1a125fd framework/target: fix caseless runtime params
Fix the setting of runtime parameters when the casing of the parameter in
the agenda does not match the "canonical" casing.

To make the writing of agendas easier, the casing of the parameters is
supposed to be ignored. To achieve this, parameter names are converted to
caseless_string type before they are looked up.

caseless_string's do not work with dicts. Both __contains__ (used for
the "in" operator) and __getitem__ (used for the [] operator) implement
hash-based look up, and it is not possible to have a caseless_string
match against multiple hashes to cover the different casing
possibilities.

So instead, iterate over the items in parameters dict, comparing the
caseless_string name to the key, and returning the value if it matches.
2018-01-11 11:04:25 +00:00