summary refs log tree commit diff stats
path: root/hw/sd/sd.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-02-22 15:12:54 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-22 15:12:54 +0000
commit3116280040a7ca898b925651001962167433b084 (patch)
treeabcc71e6dd929afd5b9fc2310fd680e85751ed1a /hw/sd/sd.c
parentd6911486550b794f879584821a0ec4d40e61a47b (diff)
downloadfocaccia-qemu-3116280040a7ca898b925651001962167433b084.tar.gz
focaccia-qemu-3116280040a7ca898b925651001962167433b084.zip
sdcard: warn if host uses an incorrect address for APP CMD (CMD55)
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-15-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/sd/sd.c')
-rw-r--r--hw/sd/sd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index d6dd2b9a15..c8351d4f0b 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1391,6 +1391,11 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
         case sd_identification_state:
         case sd_inactive_state:
             return sd_illegal;
+        case sd_idle_state:
+            if (rca) {
+                qemu_log_mask(LOG_GUEST_ERROR,
+                              "SD: illegal RCA 0x%04x for APP_CMD\n", req.cmd);
+            }
         default:
             break;
         }