path: root/mk
diff options
authorDavid Hunt <>2018-10-31 11:50:32 +0000
committerThomas Monjalon <>2018-11-04 21:54:04 +0100
commitc12ade20c27658d488439a55f4b6d88a6f0637bf (patch)
tree200949faaa13a3448aaece670a57e81bc1fd5c26 /mk
parenta894d96ee20293af353fc54dc2e801dcaa01e46c (diff)
examples/vm_power: respect maximum CPUs
The vm_power_manager app was not respecting the POWER_MGR_MAX_CPUS during initialisation, so if there were more CPUs than this value (64), it would lead to buffer overruns of there were more then 64 cores in the system. Added in a check during init and un-init to only initialise up to lcore_id 63. This raises the question as to why not simply increase the value of POWER_MGR_MAX_CPUS. Well, it's not that simple, as many of the APIs take a uint64_t as a parameter for the core mask, and this will not work for cores greater than 63. So some work needs to be done in the future to remove this limitation. For now we'll fix the memory corruption. Also, the patch that this fixes says "allow greater than 64 cores" but that's not across the entire application, it's only for the out-of-band monitoring. I'll add a notice for an API change in the next release to clean this up, i.e. depricate any API calls that use masks. Fixes: 6453b9284b64 ("examples/vm_power: allow greater than 64 cores") Cc: Signed-off-by: David Hunt <>
Diffstat (limited to 'mk')
0 files changed, 0 insertions, 0 deletions