mirror of https://gitee.com/openkylin/qemu.git
OHCI address decoding fix
Ignore high address bits when PCI memory window is not mapped on a page boundary. Signed-off-by: Paul Brook <paul@codesourcery.com>
This commit is contained in:
parent
11165820d1
commit
09564574b8
|
@ -1415,6 +1415,8 @@ static uint32_t ohci_mem_read(void *ptr, target_phys_addr_t addr)
|
||||||
OHCIState *ohci = ptr;
|
OHCIState *ohci = ptr;
|
||||||
uint32_t retval;
|
uint32_t retval;
|
||||||
|
|
||||||
|
addr &= 0xff;
|
||||||
|
|
||||||
/* Only aligned reads are allowed on OHCI */
|
/* Only aligned reads are allowed on OHCI */
|
||||||
if (addr & 3) {
|
if (addr & 3) {
|
||||||
fprintf(stderr, "usb-ohci: Mis-aligned read\n");
|
fprintf(stderr, "usb-ohci: Mis-aligned read\n");
|
||||||
|
@ -1538,6 +1540,8 @@ static void ohci_mem_write(void *ptr, target_phys_addr_t addr, uint32_t val)
|
||||||
{
|
{
|
||||||
OHCIState *ohci = ptr;
|
OHCIState *ohci = ptr;
|
||||||
|
|
||||||
|
addr &= 0xff;
|
||||||
|
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
#ifdef TARGET_WORDS_BIGENDIAN
|
||||||
val = bswap32(val);
|
val = bswap32(val);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue