Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-2…
Browse files Browse the repository at this point in the history
…6-2019' into staging

MIPS queue for June 2016th, 2019

# gpg: Signature made Wed 26 Jun 2019 12:38:58 BST
# gpg:                using RSA key D4972A8967F75A65
# gpg: Good signature from "Aleksandar Markovic <[email protected]>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65

* remotes/amarkovic/tags/mips-queue-jun-26-2019:
  target/mips: Fix big endian host behavior for interleave MSA instructions
  tests/tcg: target/mips: Fix some test cases for pack MSA instructions
  tests/tcg: target/mips: Add support for MSA MIPS32R6 testings
  tests/tcg: target/mips: Add support for MSA big-endian target testings
  tests/tcg: target/mips: Amend tests for MSA int multiply instructions
  tests/tcg: target/mips: Amend tests for MSA int dot product instructions
  tests/tcg: target/mips: Add tests for MSA move instructions
  tests/tcg: target/mips: Add tests for MSA bit move instructions
  dma/rc4030: Minor code style cleanup
  dma/rc4030: Fix off-by-one error in specified memory region size
  hw/mips/gt64xxx_pci: Align the pci0-mem size
  hw/mips/gt64xxx_pci: Convert debug printf()s to trace events
  hw/mips/gt64xxx_pci: Use qemu_log_mask() instead of debug printf()
  hw/mips/gt64xxx_pci: Fix 'spaces' coding style issues
  hw/mips/gt64xxx_pci: Fix 'braces' coding style issues
  hw/mips/gt64xxx_pci: Fix 'tabs' coding style issues
  hw/mips/gt64xxx_pci: Fix multiline comment syntax

Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
pm215 committed Jul 1, 2019
2 parents 39d1b92 + 5a6a1fa commit 8351ef7
Show file tree
Hide file tree
Showing 59 changed files with 11,201 additions and 1,210 deletions.
1 change: 1 addition & 0 deletions Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ trace-events-subdirs += hw/input
trace-events-subdirs += hw/intc
trace-events-subdirs += hw/isa
trace-events-subdirs += hw/mem
trace-events-subdirs += hw/mips
trace-events-subdirs += hw/misc
trace-events-subdirs += hw/misc/macio
trace-events-subdirs += hw/net
Expand Down
21 changes: 13 additions & 8 deletions hw/dma/rc4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/

#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/mips/mips.h"
#include "hw/sysbus.h"
Expand Down Expand Up @@ -57,8 +58,8 @@ typedef struct dma_pagetable_entry {

#define TYPE_RC4030_IOMMU_MEMORY_REGION "rc4030-iommu-memory-region"

typedef struct rc4030State
{
typedef struct rc4030State {

SysBusDevice parent;

uint32_t config; /* 0x0000: RC4030 config register */
Expand Down Expand Up @@ -151,8 +152,9 @@ static uint64_t rc4030_read(void *opaque, hwaddr addr, unsigned int size)
case 0x0058:
val = s->cache_bmask;
/* HACK */
if (s->cache_bmask == (uint32_t)-1)
if (s->cache_bmask == (uint32_t)-1) {
s->cache_bmask = 0;
}
break;
/* Remote Speed Registers */
case 0x0070:
Expand Down Expand Up @@ -537,8 +539,9 @@ static void rc4030_reset(DeviceState *dev)

s->memory_refresh_rate = 0x18186;
s->nvram_protect = 7;
for (i = 0; i < 15; i++)
for (i = 0; i < 15; i++) {
s->rem_speed[i] = 7;
}
s->imr_jazz = 0x10; /* XXX: required by firmware, but why? */
s->isr_jazz = 0;

Expand All @@ -550,7 +553,7 @@ static void rc4030_reset(DeviceState *dev)

static int rc4030_post_load(void *opaque, int version_id)
{
rc4030State* s = opaque;
rc4030State *s = opaque;

set_next_tick(s);
update_jazz_irq(s);
Expand Down Expand Up @@ -590,7 +593,8 @@ static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_wri
hwaddr dma_addr;
int dev_to_mem;

s->dma_regs[n][DMA_REG_ENABLE] &= ~(DMA_FLAG_TC_INTR | DMA_FLAG_MEM_INTR | DMA_FLAG_ADDR_INTR);
s->dma_regs[n][DMA_REG_ENABLE] &=
~(DMA_FLAG_TC_INTR | DMA_FLAG_MEM_INTR | DMA_FLAG_ADDR_INTR);

/* Check DMA channel consistency */
dev_to_mem = (s->dma_regs[n][DMA_REG_ENABLE] & DMA_FLAG_MEM_TO_DEV) ? 0 : 1;
Expand All @@ -602,8 +606,9 @@ static void rc4030_do_dma(void *opaque, int n, uint8_t *buf, int len, int is_wri
}

/* Get start address and len */
if (len > s->dma_regs[n][DMA_REG_COUNT])
if (len > s->dma_regs[n][DMA_REG_COUNT]) {
len = s->dma_regs[n][DMA_REG_COUNT];
}
dma_addr = s->dma_regs[n][DMA_REG_ADDRESS];

/* Read/write data at right place */
Expand Down Expand Up @@ -678,7 +683,7 @@ static void rc4030_realize(DeviceState *dev, Error **errp)

memory_region_init_iommu(&s->dma_mr, sizeof(s->dma_mr),
TYPE_RC4030_IOMMU_MEMORY_REGION,
o, "rc4030.dma", UINT32_MAX);
o, "rc4030.dma", 4 * GiB);
address_space_init(&s->dma_as, MEMORY_REGION(&s->dma_mr), "rc4030-dma");
}

Expand Down
Loading

0 comments on commit 8351ef7

Please sign in to comment.