mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 22:35:42 +00:00
fix(mhuv2): provide only the usable size of memory
The function mhu_get_max_message_size() for MHUv2 should return only the available memory for use after considering all the overheads for its own use. Signed-off-by: Sathyam Panda <sathyam.panda@arm.com> Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com> Change-Id: I14ad16e8f4b781e396bca6173077513db74157d5
This commit is contained in:
parent
fb7f6a4422
commit
5cd10848be
1 changed files with 6 additions and 1 deletions
|
@ -308,5 +308,10 @@ size_t mhu_get_max_message_size(void)
|
|||
|
||||
assert(num_channels != 0);
|
||||
|
||||
return num_channels * sizeof(uint32_t);
|
||||
/*
|
||||
* Returns only usable size of memory. As one channel is specifically
|
||||
* used to inform about the size of payload, discard it from avialable
|
||||
* memory size.
|
||||
*/
|
||||
return (num_channels - 1) * sizeof(uint32_t);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue