From 23d7925628f60a16ff46f9a2920c63e38a15961d Mon Sep 17 00:00:00 2001 From: Henrik Akira Karlsson Date: Thu, 9 Nov 2023 10:27:01 +0100 Subject: [PATCH] Fixes a bug in syscall mon_reg_write mon_reg_read --- common/src/s3k/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/s3k/syscall.c b/common/src/s3k/syscall.c index 6d4cdbb6..867c9547 100644 --- a/common/src/s3k/syscall.c +++ b/common/src/s3k/syscall.c @@ -452,7 +452,7 @@ s3k_err_t s3k_try_mon_reg_read(s3k_cidx_t mon, s3k_pid_t pid, s3k_reg_t reg, .mon_reg = {mon, pid, reg} }; s3k_ret_t ret - = do_ecall(S3K_SYS_MON_REG_READ, args, sizeof(args.mon_state)); + = do_ecall(S3K_SYS_MON_REG_READ, args, sizeof(args.mon_reg)); *val = ret.val; return ret.err; } @@ -464,7 +464,7 @@ s3k_err_t s3k_try_mon_reg_write(s3k_cidx_t mon, s3k_pid_t pid, s3k_reg_t reg, .mon_reg = {mon, pid, reg, val} }; s3k_ret_t ret - = do_ecall(S3K_SYS_MON_REG_WRITE, args, sizeof(args.mon_state)); + = do_ecall(S3K_SYS_MON_REG_WRITE, args, sizeof(args.mon_reg)); return ret.err; }