semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO
commit35e3f029a966845e090dc8b295312751524df967
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 23 Mar 2021 16:52:53 +0000 (23 16:52 +0000)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 24 Mar 2021 14:25:11 +0000 (24 14:25 +0000)
treea3f773f70a07cf97e68aed13b698a7fde967338b
parent3960ca5b3ef6854ef50ef540fe9cf47d94f27704
semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO

As per the spec:

  the PARAMETER REGISTER contains the address of a pointer to a
  four-field data block.

So we need to follow arg0 and place the results of SYS_HEAPINFO there.

Fixes: 3c37cfe0b1 ("semihosting: Change internal common-semi interfaces to use CPUState *")
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Cc: Bug 1915925 <1915925@bugs.launchpad.net>
Cc: Keith Packard <keithp@keithp.com>
Bug: https://bugs.launchpad.net/bugs/1915925
Message-Id: <20210323165308.15244-8-alex.bennee@linaro.org>
semihosting/arm-compat-semi.c