mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 12:34:19 +00:00
fix(scmi-msg): base: fix protocol list response size
Corrects the size of the SCMI response payload when querying the list of the supported protocol. This response payload size depends on the number of protocols enumerated by the response. Change-Id: Ib01eb5cec6c6656dfd7d88ccdd5a720c1deee7a3 Reported-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
This commit is contained in:
parent
15e498de74
commit
d323f0cf00
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved.
|
* Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved.
|
||||||
* Copyright (c) 2019-2020, Linaro Limited
|
* Copyright (c) 2019-2022, Linaro Limited
|
||||||
*/
|
*/
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -165,7 +165,7 @@ static void discover_list_protocols(struct scmi_msg *msg)
|
||||||
memcpy(outargs, &p2a, sizeof(p2a));
|
memcpy(outargs, &p2a, sizeof(p2a));
|
||||||
memcpy(outargs + sizeof(p2a), list + a2p->skip, count);
|
memcpy(outargs + sizeof(p2a), list + a2p->skip, count);
|
||||||
|
|
||||||
scmi_write_response(msg, outargs, sizeof(outargs));
|
scmi_write_response(msg, outargs, sizeof(p2a) + round_up(count, sizeof(uint32_t)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const scmi_msg_handler_t scmi_base_handler_table[] = {
|
static const scmi_msg_handler_t scmi_base_handler_table[] = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue