summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Washburn <development@efficientek.com>2022-01-18 15:52:23 -0600
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-01-27 15:24:45 +0000
commite2d6176ce9ea1a09453f42d7e8eaf24b5ee4cede (patch)
treead895279e140e07e3ab3a4a765e7aa08524b85ce
parent04dfc984ac0ad70e2d1f58d1121e3b7670901124 (diff)
downloadqemu-openbios-e2d6176ce9ea1a09453f42d7e8eaf24b5ee4cede.tar.gz
cuda: fix get-time word
An extra byte is written after the CUDA_GET_TIME command causing the command to return an incorrect time. Running QEMU with CUDA debug messages on yields these messages: 1177318@1642469573.070752:cuda_packet_receive length 3 1177318@1642469573.070768:cuda_packet_receive_data [0] 0x01 1177318@1642469573.070771:cuda_packet_receive_data [1] 0x03 1177318@1642469573.070773:cuda_packet_receive_data [2] 0xfb 1177318@1642469573.070776:cuda_receive_packet_cmd handling command GET_TIME CUDA: GET_TIME: wrong parameters 2 Fix the outgoing command length to remove the extra byte. Signed-off-by: Glenn Washburn <development@efficientek.com> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--drivers/cuda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cuda.c b/drivers/cuda.c
index c89b174f..86d2ddb0 100644
--- a/drivers/cuda.c
+++ b/drivers/cuda.c
@@ -234,7 +234,7 @@ static inline int is_leap(int year)
static void
rtc_get_time(int *idx)
{
- uint8_t cmdbuf[2], obuf[64];
+ uint8_t cmdbuf[1], obuf[64];
ucell second, minute, hour, day, month, year;
uint32_t now;
int current;