As per the spec:
the PARAMETER REGISTER contains the address of a pointer to a four-field data block.
So we need to follow the pointer and place the results of SYS_HEAPINFO there.
Bug: https://bugs.launchpad.net/bugs/1915925 Cc: Bug 1915925 <email address hidden> Cc: Keith Packard <email address hidden> Signed-off-by: Alex Bennée <email address hidden> --- semihosting/arm-compat-semi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 733eea1e2d..2ac9226d29 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -1210,6 +1210,8 @@ target_ulong do_common_semihosting(CPUState *cs) retvals[2] = rambase + limit; /* Stack base */ retvals[3] = rambase; /* Stack limit. */ #endif + /* The result array is pointed to by arg0 */ + args = arg0;
for (i = 0; i < ARRAY_SIZE(retvals); i++) { bool fail; -- 2.20.1
As per the spec:
the PARAMETER REGISTER contains the address of a pointer to a
four-field data block.
So we need to follow the pointer and place the results of SYS_HEAPINFO
there.
Bug: https:/ /bugs.launchpad .net/bugs/ 1915925 arm-compat- semi.c | 2 ++
Cc: Bug 1915925 <email address hidden>
Cc: Keith Packard <email address hidden>
Signed-off-by: Alex Bennée <email address hidden>
---
semihosting/
1 file changed, 2 insertions(+)
diff --git a/semihosting/ arm-compat- semi.c b/semihosting/ arm-compat- semi.c .2ac9226d29 100644 arm-compat- semi.c arm-compat- semi.c semihosting( CPUState *cs)
retvals[ 2] = rambase + limit; /* Stack base */
retvals[ 3] = rambase; /* Stack limit. */
index 733eea1e2d.
--- a/semihosting/
+++ b/semihosting/
@@ -1210,6 +1210,8 @@ target_ulong do_common_
#endif
+ /* The result array is pointed to by arg0 */
+ args = arg0;
for (i = 0; i < ARRAY_SIZE( retvals) ; i++) {
bool fail;
--
2.20.1