qemu-patch-raspberry4/hw/ide
John Snow e9ebb2f767 ahci: Do not ignore memory access read size
The only guidance the AHCI specification gives on memory access is:
"Register accesses shall have a maximum size of 64-bits; 64-bit access
must not cross an 8-byte alignment boundary."

I interpret this to mean that aligned or unaligned 1, 2 and 4 byte
accesses should work, as well as aligned 8 byte accesses.

In practice, a real Q35/ICH9 responds to 1, 2, 4 and 8 byte reads
regardless of alignment. Windows 7 can be observed making 1 byte
reads to the middle of 32 bit registers to fetch error codes.

Introduce a wrapper to support unaligned accesses to AHCI.
This wrapper will support aligned 8 byte reads, but will make
no effort to support unaligned 8 byte reads, which although they
will work on real hardware, are not guaranteed to work and do
not appear to be used by either Windows or Linux.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1434470575-21625-2-git-send-email-jsnow@redhat.com
2015-07-04 02:06:02 -04:00
..
ahci.c ahci: Do not ignore memory access read size 2015-07-04 02:06:02 -04:00
ahci.h AHCI: Protect cmd register 2015-03-27 15:48:11 -04:00
atapi.c ide: commonize io_buffer_index initialization 2015-03-10 14:02:22 +01:00
cmd646.c Block patches for 2.3 2015-03-10 14:01:22 +00:00
core.c migration: Use normal VMStateDescriptions for Subsections 2015-06-12 06:53:57 +02:00
ich.c ich9/ahci: Enable Migration 2015-05-22 15:58:22 -04:00
internal.h ahci: Migrate IDEStatus 2015-03-10 14:02:23 +01:00
isa.c ide: support PIO restart for the ISA controller 2015-03-10 14:02:23 +01:00
macio.c macio: remove remainder_len DBDMA_io property 2015-06-04 20:25:39 -04:00
Makefile.objs hw: make all of hw/ide/ configurable via default-configs/ 2013-04-08 18:13:12 +02:00
microdrive.c hmp: Remove "info pcmcia" 2014-10-24 12:19:11 +01:00
mmio.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
pci.c migration: Use normal VMStateDescriptions for Subsections 2015-06-12 06:53:57 +02:00
pci.h ide: place initial state of the current request to IDEBus 2015-03-10 14:02:22 +01:00
piix.c Block patches for 2.3 2015-03-10 14:01:22 +00:00
qdev.c BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
via.c Block patches for 2.3 2015-03-10 14:01:22 +00:00