mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200221-1' into staging
target-arm queue: * aspeed/scu: Implement chip ID register * hw/misc/iotkit-secctl: Fix writing to 'PPC Interrupt Clear' register * mainstone: Make providing flash images non-mandatory * z2: Make providing flash images non-mandatory * Fix failures to flush SVE high bits after AdvSIMD INS/ZIP/UZP/TRN/TBL/TBX/EXT * Minor performance improvement: spend less time recalculating hflags values * Code cleanup to isar_feature function tests * Implement ARMv8.1-PMU and ARMv8.4-PMU extensions * Bugfix: correct handling of PMCR_EL0.LC bit * Bugfix: correct definition of PMCRDP * Correctly implement ACTLR2, HACTLR2 * allwinner: Wire up USB ports * Vectorize emulation of USHL, SSHL, PMUL* * xilinx_spips: Correct the number of dummy cycles for the FAST_READ_4 cmd * sh4: Fix PCI ISA IO memory subregion # gpg: Signature made Fri 21 Feb 2020 16:17:37 GMT # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate] # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE * remotes/pmaydell/tags/pull-target-arm-20200221-1: (46 commits) target/arm: Set MVFR0.FPSP for ARMv5 cpus target/arm: Use isar_feature_aa32_simd_r32 more places target/arm: Rename isar_feature_aa32_simd_r32 sh4: Fix PCI ISA IO memory subregion xilinx_spips: Correct the number of dummy cycles for the FAST_READ_4 cmd target/arm: Convert PMULL.8 to gvec target/arm: Convert PMULL.64 to gvec target/arm: Convert PMUL.8 to gvec target/arm: Vectorize USHL and SSHL arm: allwinner: Wire up USB ports hcd-ehci: Introduce "companion-enable" sysbus property hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file target/arm: Correctly implement ACTLR2, HACTLR2 target/arm: Use FIELD_EX32 for testing 32-bit fields target/arm: Use isar_feature function for testing AA32HPD feature target/arm: Test correct register in aa32_pan and aa32_ats1e1 checks target/arm: Correct handling of PMCR_EL0.LC bit target/arm: Correct definition of PMCRDP target/arm: Provide ARMv8.4-PMU in '-cpu max' target/arm: Implement ARMv8.4-PMU extension ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -24,11 +24,15 @@
|
||||
#include "hw/arm/allwinner-a10.h"
|
||||
#include "hw/misc/unimp.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "hw/boards.h"
|
||||
#include "hw/usb/hcd-ohci.h"
|
||||
|
||||
#define AW_A10_PIC_REG_BASE 0x01c20400
|
||||
#define AW_A10_PIT_REG_BASE 0x01c20c00
|
||||
#define AW_A10_UART0_REG_BASE 0x01c28000
|
||||
#define AW_A10_EMAC_BASE 0x01c0b000
|
||||
#define AW_A10_EHCI_BASE 0x01c14000
|
||||
#define AW_A10_OHCI_BASE 0x01c14400
|
||||
#define AW_A10_SATA_BASE 0x01c18000
|
||||
|
||||
static void aw_a10_init(Object *obj)
|
||||
@@ -49,6 +53,17 @@ static void aw_a10_init(Object *obj)
|
||||
|
||||
sysbus_init_child_obj(obj, "sata", &s->sata, sizeof(s->sata),
|
||||
TYPE_ALLWINNER_AHCI);
|
||||
|
||||
if (machine_usb(current_machine)) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < AW_A10_NUM_USB; i++) {
|
||||
sysbus_init_child_obj(obj, "ehci[*]", OBJECT(&s->ehci[i]),
|
||||
sizeof(s->ehci[i]), TYPE_PLATFORM_EHCI);
|
||||
sysbus_init_child_obj(obj, "ohci[*]", OBJECT(&s->ohci[i]),
|
||||
sizeof(s->ohci[i]), TYPE_SYSBUS_OHCI);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aw_a10_realize(DeviceState *dev, Error **errp)
|
||||
@@ -121,6 +136,34 @@ static void aw_a10_realize(DeviceState *dev, Error **errp)
|
||||
serial_mm_init(get_system_memory(), AW_A10_UART0_REG_BASE, 2,
|
||||
qdev_get_gpio_in(dev, 1),
|
||||
115200, serial_hd(0), DEVICE_NATIVE_ENDIAN);
|
||||
|
||||
if (machine_usb(current_machine)) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < AW_A10_NUM_USB; i++) {
|
||||
char bus[16];
|
||||
|
||||
sprintf(bus, "usb-bus.%d", i);
|
||||
|
||||
object_property_set_bool(OBJECT(&s->ehci[i]), true,
|
||||
"companion-enable", &error_fatal);
|
||||
object_property_set_bool(OBJECT(&s->ehci[i]), true, "realized",
|
||||
&error_fatal);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->ehci[i]), 0,
|
||||
AW_A10_EHCI_BASE + i * 0x8000);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->ehci[i]), 0,
|
||||
qdev_get_gpio_in(dev, 39 + i));
|
||||
|
||||
object_property_set_str(OBJECT(&s->ohci[i]), bus, "masterbus",
|
||||
&error_fatal);
|
||||
object_property_set_bool(OBJECT(&s->ohci[i]), true, "realized",
|
||||
&error_fatal);
|
||||
sysbus_mmio_map(SYS_BUS_DEVICE(&s->ohci[i]), 0,
|
||||
AW_A10_OHCI_BASE + i * 0x8000);
|
||||
sysbus_connect_irq(SYS_BUS_DEVICE(&s->ohci[i]), 0,
|
||||
qdev_get_gpio_in(dev, 64 + i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void aw_a10_class_init(ObjectClass *oc, void *data)
|
||||
|
||||
+1
-10
@@ -138,19 +138,10 @@ static void mainstone_common_init(MemoryRegion *address_space_mem,
|
||||
/* There are two 32MiB flash devices on the board */
|
||||
for (i = 0; i < 2; i ++) {
|
||||
dinfo = drive_get(IF_PFLASH, 0, i);
|
||||
if (!dinfo) {
|
||||
if (qtest_enabled()) {
|
||||
break;
|
||||
}
|
||||
error_report("Two flash images must be given with the "
|
||||
"'pflash' parameter");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!pflash_cfi01_register(mainstone_flash_base[i],
|
||||
i ? "mainstone.flash1" : "mainstone.flash0",
|
||||
MAINSTONE_FLASH,
|
||||
blk_by_legacy_dinfo(dinfo),
|
||||
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
|
||||
sector_len, 4, 0, 0, 0, 0, be)) {
|
||||
error_report("Error registering flash memory");
|
||||
exit(1);
|
||||
|
||||
@@ -314,12 +314,6 @@ static void z2_init(MachineState *machine)
|
||||
be = 0;
|
||||
#endif
|
||||
dinfo = drive_get(IF_PFLASH, 0, 0);
|
||||
if (!dinfo && !qtest_enabled()) {
|
||||
error_report("Flash image must be given with the "
|
||||
"'pflash' parameter");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (!pflash_cfi01_register(Z2_FLASH_BASE, "z2.flash0", Z2_FLASH_SIZE,
|
||||
dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
|
||||
sector_len, 4, 0, 0, 0, 0, be)) {
|
||||
|
||||
@@ -1227,17 +1227,17 @@ static uint32_t nvic_readl(NVICState *s, uint32_t offset, MemTxAttrs attrs)
|
||||
case 0xd44: /* PFR1. */
|
||||
return cpu->id_pfr1;
|
||||
case 0xd48: /* DFR0. */
|
||||
return cpu->id_dfr0;
|
||||
return cpu->isar.id_dfr0;
|
||||
case 0xd4c: /* AFR0. */
|
||||
return cpu->id_afr0;
|
||||
case 0xd50: /* MMFR0. */
|
||||
return cpu->id_mmfr0;
|
||||
return cpu->isar.id_mmfr0;
|
||||
case 0xd54: /* MMFR1. */
|
||||
return cpu->id_mmfr1;
|
||||
return cpu->isar.id_mmfr1;
|
||||
case 0xd58: /* MMFR2. */
|
||||
return cpu->id_mmfr2;
|
||||
return cpu->isar.id_mmfr2;
|
||||
case 0xd5c: /* MMFR3. */
|
||||
return cpu->id_mmfr3;
|
||||
return cpu->isar.id_mmfr3;
|
||||
case 0xd60: /* ISAR0. */
|
||||
return cpu->isar.id_isar0;
|
||||
case 0xd64: /* ISAR1. */
|
||||
|
||||
+70
-23
@@ -77,6 +77,8 @@
|
||||
#define CPU2_BASE_SEG4 TO_REG(0x110)
|
||||
#define CPU2_BASE_SEG5 TO_REG(0x114)
|
||||
#define CPU2_CACHE_CTRL TO_REG(0x118)
|
||||
#define CHIP_ID0 TO_REG(0x150)
|
||||
#define CHIP_ID1 TO_REG(0x154)
|
||||
#define UART_HPLL_CLK TO_REG(0x160)
|
||||
#define PCIE_CTRL TO_REG(0x180)
|
||||
#define BMC_MMIO_CTRL TO_REG(0x184)
|
||||
@@ -115,6 +117,8 @@
|
||||
#define AST2600_HW_STRAP2_PROT TO_REG(0x518)
|
||||
#define AST2600_RNG_CTRL TO_REG(0x524)
|
||||
#define AST2600_RNG_DATA TO_REG(0x540)
|
||||
#define AST2600_CHIP_ID0 TO_REG(0x5B0)
|
||||
#define AST2600_CHIP_ID1 TO_REG(0x5B4)
|
||||
|
||||
#define AST2600_CLK TO_REG(0x40)
|
||||
|
||||
@@ -182,6 +186,8 @@ static const uint32_t ast2500_a1_resets[ASPEED_SCU_NR_REGS] = {
|
||||
[CPU2_BASE_SEG1] = 0x80000000U,
|
||||
[CPU2_BASE_SEG4] = 0x1E600000U,
|
||||
[CPU2_BASE_SEG5] = 0xC0000000U,
|
||||
[CHIP_ID0] = 0x1234ABCDU,
|
||||
[CHIP_ID1] = 0x88884444U,
|
||||
[UART_HPLL_CLK] = 0x00001903U,
|
||||
[PCIE_CTRL] = 0x0000007BU,
|
||||
[BMC_DEV_ID] = 0x00002402U
|
||||
@@ -232,8 +238,47 @@ static uint64_t aspeed_scu_read(void *opaque, hwaddr offset, unsigned size)
|
||||
return s->regs[reg];
|
||||
}
|
||||
|
||||
static void aspeed_scu_write(void *opaque, hwaddr offset, uint64_t data,
|
||||
unsigned size)
|
||||
static void aspeed_ast2400_scu_write(void *opaque, hwaddr offset,
|
||||
uint64_t data, unsigned size)
|
||||
{
|
||||
AspeedSCUState *s = ASPEED_SCU(opaque);
|
||||
int reg = TO_REG(offset);
|
||||
|
||||
if (reg >= ASPEED_SCU_NR_REGS) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: Out-of-bounds write at offset 0x%" HWADDR_PRIx "\n",
|
||||
__func__, offset);
|
||||
return;
|
||||
}
|
||||
|
||||
if (reg > PROT_KEY && reg < CPU2_BASE_SEG1 &&
|
||||
!s->regs[PROT_KEY]) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: SCU is locked!\n", __func__);
|
||||
}
|
||||
|
||||
trace_aspeed_scu_write(offset, size, data);
|
||||
|
||||
switch (reg) {
|
||||
case PROT_KEY:
|
||||
s->regs[reg] = (data == ASPEED_SCU_PROT_KEY) ? 1 : 0;
|
||||
return;
|
||||
case SILICON_REV:
|
||||
case FREQ_CNTR_EVAL:
|
||||
case VGA_SCRATCH1 ... VGA_SCRATCH8:
|
||||
case RNG_DATA:
|
||||
case FREE_CNTR4:
|
||||
case FREE_CNTR4_EXT:
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: Write to read-only offset 0x%" HWADDR_PRIx "\n",
|
||||
__func__, offset);
|
||||
return;
|
||||
}
|
||||
|
||||
s->regs[reg] = data;
|
||||
}
|
||||
|
||||
static void aspeed_ast2500_scu_write(void *opaque, hwaddr offset,
|
||||
uint64_t data, unsigned size)
|
||||
{
|
||||
AspeedSCUState *s = ASPEED_SCU(opaque);
|
||||
int reg = TO_REG(offset);
|
||||
@@ -257,31 +302,19 @@ static void aspeed_scu_write(void *opaque, hwaddr offset, uint64_t data,
|
||||
case PROT_KEY:
|
||||
s->regs[reg] = (data == ASPEED_SCU_PROT_KEY) ? 1 : 0;
|
||||
return;
|
||||
case CLK_SEL:
|
||||
s->regs[reg] = data;
|
||||
break;
|
||||
case HW_STRAP1:
|
||||
if (ASPEED_IS_AST2500(s->regs[SILICON_REV])) {
|
||||
s->regs[HW_STRAP1] |= data;
|
||||
return;
|
||||
}
|
||||
/* Jump to assignment below */
|
||||
break;
|
||||
s->regs[HW_STRAP1] |= data;
|
||||
return;
|
||||
case SILICON_REV:
|
||||
if (ASPEED_IS_AST2500(s->regs[SILICON_REV])) {
|
||||
s->regs[HW_STRAP1] &= ~data;
|
||||
} else {
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: Write to read-only offset 0x%" HWADDR_PRIx "\n",
|
||||
__func__, offset);
|
||||
}
|
||||
/* Avoid assignment below, we've handled everything */
|
||||
s->regs[HW_STRAP1] &= ~data;
|
||||
return;
|
||||
case FREQ_CNTR_EVAL:
|
||||
case VGA_SCRATCH1 ... VGA_SCRATCH8:
|
||||
case RNG_DATA:
|
||||
case FREE_CNTR4:
|
||||
case FREE_CNTR4_EXT:
|
||||
case CHIP_ID0:
|
||||
case CHIP_ID1:
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: Write to read-only offset 0x%" HWADDR_PRIx "\n",
|
||||
__func__, offset);
|
||||
@@ -291,9 +324,18 @@ static void aspeed_scu_write(void *opaque, hwaddr offset, uint64_t data,
|
||||
s->regs[reg] = data;
|
||||
}
|
||||
|
||||
static const MemoryRegionOps aspeed_scu_ops = {
|
||||
static const MemoryRegionOps aspeed_ast2400_scu_ops = {
|
||||
.read = aspeed_scu_read,
|
||||
.write = aspeed_scu_write,
|
||||
.write = aspeed_ast2400_scu_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
.valid.min_access_size = 4,
|
||||
.valid.max_access_size = 4,
|
||||
.valid.unaligned = false,
|
||||
};
|
||||
|
||||
static const MemoryRegionOps aspeed_ast2500_scu_ops = {
|
||||
.read = aspeed_scu_read,
|
||||
.write = aspeed_ast2500_scu_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
.valid.min_access_size = 4,
|
||||
.valid.max_access_size = 4,
|
||||
@@ -469,7 +511,7 @@ static void aspeed_2400_scu_class_init(ObjectClass *klass, void *data)
|
||||
asc->calc_hpll = aspeed_2400_scu_calc_hpll;
|
||||
asc->apb_divider = 2;
|
||||
asc->nr_regs = ASPEED_SCU_NR_REGS;
|
||||
asc->ops = &aspeed_scu_ops;
|
||||
asc->ops = &aspeed_ast2400_scu_ops;
|
||||
}
|
||||
|
||||
static const TypeInfo aspeed_2400_scu_info = {
|
||||
@@ -489,7 +531,7 @@ static void aspeed_2500_scu_class_init(ObjectClass *klass, void *data)
|
||||
asc->calc_hpll = aspeed_2500_scu_calc_hpll;
|
||||
asc->apb_divider = 4;
|
||||
asc->nr_regs = ASPEED_SCU_NR_REGS;
|
||||
asc->ops = &aspeed_scu_ops;
|
||||
asc->ops = &aspeed_ast2500_scu_ops;
|
||||
}
|
||||
|
||||
static const TypeInfo aspeed_2500_scu_info = {
|
||||
@@ -586,6 +628,8 @@ static void aspeed_ast2600_scu_write(void *opaque, hwaddr offset,
|
||||
case AST2600_RNG_DATA:
|
||||
case AST2600_SILICON_REV:
|
||||
case AST2600_SILICON_REV2:
|
||||
case AST2600_CHIP_ID0:
|
||||
case AST2600_CHIP_ID1:
|
||||
/* Add read only registers here */
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"%s: Write to read-only offset 0x%" HWADDR_PRIx "\n",
|
||||
@@ -614,6 +658,9 @@ static const uint32_t ast2600_a0_resets[ASPEED_AST2600_SCU_NR_REGS] = {
|
||||
[AST2600_CLK_STOP_CTRL2] = 0xFFF0FFF0,
|
||||
[AST2600_SDRAM_HANDSHAKE] = 0x00000040, /* SoC completed DRAM init */
|
||||
[AST2600_HPLL_PARAM] = 0x1000405F,
|
||||
[AST2600_CHIP_ID0] = 0x1234ABCD,
|
||||
[AST2600_CHIP_ID1] = 0x88884444,
|
||||
|
||||
};
|
||||
|
||||
static void aspeed_ast2600_scu_reset(DeviceState *dev)
|
||||
|
||||
@@ -340,7 +340,7 @@ static MemTxResult iotkit_secctl_s_write(void *opaque, hwaddr addr,
|
||||
qemu_set_irq(s->sec_resp_cfg, s->secrespcfg);
|
||||
break;
|
||||
case A_SECPPCINTCLR:
|
||||
value &= 0x00f000f3;
|
||||
s->secppcintstat &= ~(value & 0x00f000f3);
|
||||
foreach_ppc(s, iotkit_secctl_ppc_update_irq_clear);
|
||||
break;
|
||||
case A_SECPPCINTEN:
|
||||
|
||||
+3
-8
@@ -67,12 +67,8 @@ static void sh_pci_reg_write (void *p, hwaddr addr, uint64_t val,
|
||||
pcic->mbr = val & 0xff000001;
|
||||
break;
|
||||
case 0x1c8:
|
||||
if ((val & 0xfffc0000) != (pcic->iobr & 0xfffc0000)) {
|
||||
memory_region_del_subregion(get_system_memory(), &pcic->isa);
|
||||
pcic->iobr = val & 0xfffc0001;
|
||||
memory_region_add_subregion(get_system_memory(),
|
||||
pcic->iobr & 0xfffc0000, &pcic->isa);
|
||||
}
|
||||
pcic->iobr = val & 0xfffc0001;
|
||||
memory_region_set_alias_offset(&pcic->isa, val & 0xfffc0000);
|
||||
break;
|
||||
case 0x220:
|
||||
pci_data_write(phb->bus, pcic->par, val, 4);
|
||||
@@ -147,8 +143,7 @@ static void sh_pci_device_realize(DeviceState *dev, Error **errp)
|
||||
get_system_io(), 0, 0x40000);
|
||||
sysbus_init_mmio(sbd, &s->memconfig_p4);
|
||||
sysbus_init_mmio(sbd, &s->memconfig_a7);
|
||||
s->iobr = 0xfe240000;
|
||||
memory_region_add_subregion(get_system_memory(), s->iobr, &s->isa);
|
||||
memory_region_add_subregion(get_system_memory(), 0xfe240000, &s->isa);
|
||||
|
||||
s->dev = pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "sh_pci_host");
|
||||
}
|
||||
|
||||
@@ -576,11 +576,11 @@ static int xilinx_spips_num_dummies(XilinxQSPIPS *qs, uint8_t command)
|
||||
case FAST_READ:
|
||||
case DOR:
|
||||
case QOR:
|
||||
case FAST_READ_4:
|
||||
case DOR_4:
|
||||
case QOR_4:
|
||||
return 1;
|
||||
case DIOR:
|
||||
case FAST_READ_4:
|
||||
case DIOR_4:
|
||||
return 2;
|
||||
case QIOR:
|
||||
|
||||
@@ -33,6 +33,8 @@ static const VMStateDescription vmstate_ehci_sysbus = {
|
||||
|
||||
static Property ehci_sysbus_properties[] = {
|
||||
DEFINE_PROP_UINT32("maxframes", EHCISysBusState, ehci.maxframes, 128),
|
||||
DEFINE_PROP_BOOL("companion-enable", EHCISysBusState, ehci.companion_enable,
|
||||
false),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
|
||||
@@ -1870,21 +1870,6 @@ void ohci_sysbus_die(struct OHCIState *ohci)
|
||||
ohci_bus_stop(ohci);
|
||||
}
|
||||
|
||||
#define TYPE_SYSBUS_OHCI "sysbus-ohci"
|
||||
#define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_OHCI)
|
||||
|
||||
typedef struct {
|
||||
/*< private >*/
|
||||
SysBusDevice parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
OHCIState ohci;
|
||||
char *masterbus;
|
||||
uint32_t num_ports;
|
||||
uint32_t firstport;
|
||||
dma_addr_t dma_offset;
|
||||
} OHCISysBusState;
|
||||
|
||||
static void ohci_realize_pxa(DeviceState *dev, Error **errp)
|
||||
{
|
||||
OHCISysBusState *s = SYSBUS_OHCI(dev);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define HCD_OHCI_H
|
||||
|
||||
#include "sysemu/dma.h"
|
||||
#include "hw/usb.h"
|
||||
|
||||
/* Number of Downstream Ports on the root hub: */
|
||||
#define OHCI_MAX_PORTS 15
|
||||
@@ -90,6 +91,21 @@ typedef struct OHCIState {
|
||||
void (*ohci_die)(struct OHCIState *ohci);
|
||||
} OHCIState;
|
||||
|
||||
#define TYPE_SYSBUS_OHCI "sysbus-ohci"
|
||||
#define SYSBUS_OHCI(obj) OBJECT_CHECK(OHCISysBusState, (obj), TYPE_SYSBUS_OHCI)
|
||||
|
||||
typedef struct {
|
||||
/*< private >*/
|
||||
SysBusDevice parent_obj;
|
||||
/*< public >*/
|
||||
|
||||
OHCIState ohci;
|
||||
char *masterbus;
|
||||
uint32_t num_ports;
|
||||
uint32_t firstport;
|
||||
dma_addr_t dma_offset;
|
||||
} OHCISysBusState;
|
||||
|
||||
extern const VMStateDescription vmstate_ohci_state;
|
||||
|
||||
void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports,
|
||||
|
||||
@@ -8,12 +8,16 @@
|
||||
#include "hw/intc/allwinner-a10-pic.h"
|
||||
#include "hw/net/allwinner_emac.h"
|
||||
#include "hw/ide/ahci.h"
|
||||
#include "hw/usb/hcd-ohci.h"
|
||||
#include "hw/usb/hcd-ehci.h"
|
||||
|
||||
#include "target/arm/cpu.h"
|
||||
|
||||
|
||||
#define AW_A10_SDRAM_BASE 0x40000000
|
||||
|
||||
#define AW_A10_NUM_USB 2
|
||||
|
||||
#define TYPE_AW_A10 "allwinner-a10"
|
||||
#define AW_A10(obj) OBJECT_CHECK(AwA10State, (obj), TYPE_AW_A10)
|
||||
|
||||
@@ -28,6 +32,8 @@ typedef struct AwA10State {
|
||||
AwEmacState emac;
|
||||
AllwinnerAHCIState sata;
|
||||
MemoryRegion sram_a;
|
||||
EHCISysBusState ehci[AW_A10_NUM_USB];
|
||||
OHCISysBusState ohci[AW_A10_NUM_USB];
|
||||
} AwA10State;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -475,8 +475,8 @@ static uint32_t get_elf_hwcap(void)
|
||||
GET_FEATURE(ARM_FEATURE_VFP3, ARM_HWCAP_ARM_VFPv3);
|
||||
GET_FEATURE(ARM_FEATURE_V6K, ARM_HWCAP_ARM_TLS);
|
||||
GET_FEATURE(ARM_FEATURE_VFP4, ARM_HWCAP_ARM_VFPv4);
|
||||
GET_FEATURE_ID(arm_div, ARM_HWCAP_ARM_IDIVA);
|
||||
GET_FEATURE_ID(thumb_div, ARM_HWCAP_ARM_IDIVT);
|
||||
GET_FEATURE_ID(aa32_arm_div, ARM_HWCAP_ARM_IDIVA);
|
||||
GET_FEATURE_ID(aa32_thumb_div, ARM_HWCAP_ARM_IDIVT);
|
||||
/* All QEMU's VFPv3 CPUs have 32 registers, see VFP_DREG in translate.c.
|
||||
* Note that the ARM_HWCAP_ARM_VFPv3D16 bit is always the inverse of
|
||||
* ARM_HWCAP_ARM_VFPD32 (and so always clear for QEMU); it is unrelated
|
||||
|
||||
+87
-82
@@ -1009,11 +1009,10 @@ static void arm_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||
|
||||
if (flags & CPU_DUMP_FPU) {
|
||||
int numvfpregs = 0;
|
||||
if (arm_feature(env, ARM_FEATURE_VFP)) {
|
||||
numvfpregs += 16;
|
||||
}
|
||||
if (arm_feature(env, ARM_FEATURE_VFP3)) {
|
||||
numvfpregs += 16;
|
||||
if (cpu_isar_feature(aa32_simd_r32, cpu)) {
|
||||
numvfpregs = 32;
|
||||
} else if (arm_feature(env, ARM_FEATURE_VFP)) {
|
||||
numvfpregs = 16;
|
||||
}
|
||||
for (i = 0; i < numvfpregs; i++) {
|
||||
uint64_t v = *aa32_vfp_dreg(env, i);
|
||||
@@ -1586,7 +1585,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||
* Presence of EL2 itself is ARM_FEATURE_EL2, and of the
|
||||
* Security Extensions is ARM_FEATURE_EL3.
|
||||
*/
|
||||
assert(!tcg_enabled() || no_aa32 || cpu_isar_feature(arm_div, cpu));
|
||||
assert(!tcg_enabled() || no_aa32 ||
|
||||
cpu_isar_feature(aa32_arm_div, cpu));
|
||||
set_feature(env, ARM_FEATURE_LPAE);
|
||||
set_feature(env, ARM_FEATURE_V7);
|
||||
}
|
||||
@@ -1612,7 +1612,8 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||
if (arm_feature(env, ARM_FEATURE_V6)) {
|
||||
set_feature(env, ARM_FEATURE_V5);
|
||||
if (!arm_feature(env, ARM_FEATURE_M)) {
|
||||
assert(!tcg_enabled() || no_aa32 || cpu_isar_feature(jazelle, cpu));
|
||||
assert(!tcg_enabled() || no_aa32 ||
|
||||
cpu_isar_feature(aa32_jazelle, cpu));
|
||||
set_feature(env, ARM_FEATURE_AUXCR);
|
||||
}
|
||||
}
|
||||
@@ -1716,8 +1717,9 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||
cpu);
|
||||
#endif
|
||||
} else {
|
||||
cpu->id_aa64dfr0 &= ~0xf00;
|
||||
cpu->id_dfr0 &= ~(0xf << 24);
|
||||
cpu->isar.id_aa64dfr0 =
|
||||
FIELD_DP64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, PMUVER, 0);
|
||||
cpu->isar.id_dfr0 = FIELD_DP32(cpu->isar.id_dfr0, ID_DFR0, PERFMON, 0);
|
||||
cpu->pmceid0 = 0;
|
||||
cpu->pmceid1 = 0;
|
||||
}
|
||||
@@ -1870,10 +1872,11 @@ static void arm926_initfn(Object *obj)
|
||||
*/
|
||||
cpu->isar.id_isar1 = FIELD_DP32(cpu->isar.id_isar1, ID_ISAR1, JAZELLE, 1);
|
||||
/*
|
||||
* Similarly, we need to set MVFR0 fields to enable double precision
|
||||
* and short vector support even though ARMv5 doesn't have this register.
|
||||
* Similarly, we need to set MVFR0 fields to enable vfp and short vector
|
||||
* support even though ARMv5 doesn't have this register.
|
||||
*/
|
||||
cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1);
|
||||
cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSP, 1);
|
||||
cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPDP, 1);
|
||||
}
|
||||
|
||||
@@ -1912,10 +1915,11 @@ static void arm1026_initfn(Object *obj)
|
||||
*/
|
||||
cpu->isar.id_isar1 = FIELD_DP32(cpu->isar.id_isar1, ID_ISAR1, JAZELLE, 1);
|
||||
/*
|
||||
* Similarly, we need to set MVFR0 fields to enable double precision
|
||||
* and short vector support even though ARMv5 doesn't have this register.
|
||||
* Similarly, we need to set MVFR0 fields to enable vfp and short vector
|
||||
* support even though ARMv5 doesn't have this register.
|
||||
*/
|
||||
cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSHVEC, 1);
|
||||
cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPSP, 1);
|
||||
cpu->isar.mvfr0 = FIELD_DP32(cpu->isar.mvfr0, MVFR0, FPDP, 1);
|
||||
|
||||
{
|
||||
@@ -1955,11 +1959,11 @@ static void arm1136_r2_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00050078;
|
||||
cpu->id_pfr0 = 0x111;
|
||||
cpu->id_pfr1 = 0x1;
|
||||
cpu->id_dfr0 = 0x2;
|
||||
cpu->isar.id_dfr0 = 0x2;
|
||||
cpu->id_afr0 = 0x3;
|
||||
cpu->id_mmfr0 = 0x01130003;
|
||||
cpu->id_mmfr1 = 0x10030302;
|
||||
cpu->id_mmfr2 = 0x01222110;
|
||||
cpu->isar.id_mmfr0 = 0x01130003;
|
||||
cpu->isar.id_mmfr1 = 0x10030302;
|
||||
cpu->isar.id_mmfr2 = 0x01222110;
|
||||
cpu->isar.id_isar0 = 0x00140011;
|
||||
cpu->isar.id_isar1 = 0x12002111;
|
||||
cpu->isar.id_isar2 = 0x11231111;
|
||||
@@ -1987,11 +1991,11 @@ static void arm1136_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00050078;
|
||||
cpu->id_pfr0 = 0x111;
|
||||
cpu->id_pfr1 = 0x1;
|
||||
cpu->id_dfr0 = 0x2;
|
||||
cpu->isar.id_dfr0 = 0x2;
|
||||
cpu->id_afr0 = 0x3;
|
||||
cpu->id_mmfr0 = 0x01130003;
|
||||
cpu->id_mmfr1 = 0x10030302;
|
||||
cpu->id_mmfr2 = 0x01222110;
|
||||
cpu->isar.id_mmfr0 = 0x01130003;
|
||||
cpu->isar.id_mmfr1 = 0x10030302;
|
||||
cpu->isar.id_mmfr2 = 0x01222110;
|
||||
cpu->isar.id_isar0 = 0x00140011;
|
||||
cpu->isar.id_isar1 = 0x12002111;
|
||||
cpu->isar.id_isar2 = 0x11231111;
|
||||
@@ -2020,11 +2024,11 @@ static void arm1176_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00050078;
|
||||
cpu->id_pfr0 = 0x111;
|
||||
cpu->id_pfr1 = 0x11;
|
||||
cpu->id_dfr0 = 0x33;
|
||||
cpu->isar.id_dfr0 = 0x33;
|
||||
cpu->id_afr0 = 0;
|
||||
cpu->id_mmfr0 = 0x01130003;
|
||||
cpu->id_mmfr1 = 0x10030302;
|
||||
cpu->id_mmfr2 = 0x01222100;
|
||||
cpu->isar.id_mmfr0 = 0x01130003;
|
||||
cpu->isar.id_mmfr1 = 0x10030302;
|
||||
cpu->isar.id_mmfr2 = 0x01222100;
|
||||
cpu->isar.id_isar0 = 0x0140011;
|
||||
cpu->isar.id_isar1 = 0x12002111;
|
||||
cpu->isar.id_isar2 = 0x11231121;
|
||||
@@ -2050,11 +2054,11 @@ static void arm11mpcore_initfn(Object *obj)
|
||||
cpu->ctr = 0x1d192992; /* 32K icache 32K dcache */
|
||||
cpu->id_pfr0 = 0x111;
|
||||
cpu->id_pfr1 = 0x1;
|
||||
cpu->id_dfr0 = 0;
|
||||
cpu->isar.id_dfr0 = 0;
|
||||
cpu->id_afr0 = 0x2;
|
||||
cpu->id_mmfr0 = 0x01100103;
|
||||
cpu->id_mmfr1 = 0x10020302;
|
||||
cpu->id_mmfr2 = 0x01222000;
|
||||
cpu->isar.id_mmfr0 = 0x01100103;
|
||||
cpu->isar.id_mmfr1 = 0x10020302;
|
||||
cpu->isar.id_mmfr2 = 0x01222000;
|
||||
cpu->isar.id_isar0 = 0x00100011;
|
||||
cpu->isar.id_isar1 = 0x12002111;
|
||||
cpu->isar.id_isar2 = 0x11221011;
|
||||
@@ -2082,12 +2086,12 @@ static void cortex_m3_initfn(Object *obj)
|
||||
cpu->pmsav7_dregion = 8;
|
||||
cpu->id_pfr0 = 0x00000030;
|
||||
cpu->id_pfr1 = 0x00000200;
|
||||
cpu->id_dfr0 = 0x00100000;
|
||||
cpu->isar.id_dfr0 = 0x00100000;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x00000030;
|
||||
cpu->id_mmfr1 = 0x00000000;
|
||||
cpu->id_mmfr2 = 0x00000000;
|
||||
cpu->id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_mmfr0 = 0x00000030;
|
||||
cpu->isar.id_mmfr1 = 0x00000000;
|
||||
cpu->isar.id_mmfr2 = 0x00000000;
|
||||
cpu->isar.id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_isar0 = 0x01141110;
|
||||
cpu->isar.id_isar1 = 0x02111000;
|
||||
cpu->isar.id_isar2 = 0x21112231;
|
||||
@@ -2113,12 +2117,12 @@ static void cortex_m4_initfn(Object *obj)
|
||||
cpu->isar.mvfr2 = 0x00000000;
|
||||
cpu->id_pfr0 = 0x00000030;
|
||||
cpu->id_pfr1 = 0x00000200;
|
||||
cpu->id_dfr0 = 0x00100000;
|
||||
cpu->isar.id_dfr0 = 0x00100000;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x00000030;
|
||||
cpu->id_mmfr1 = 0x00000000;
|
||||
cpu->id_mmfr2 = 0x00000000;
|
||||
cpu->id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_mmfr0 = 0x00000030;
|
||||
cpu->isar.id_mmfr1 = 0x00000000;
|
||||
cpu->isar.id_mmfr2 = 0x00000000;
|
||||
cpu->isar.id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_isar0 = 0x01141110;
|
||||
cpu->isar.id_isar1 = 0x02111000;
|
||||
cpu->isar.id_isar2 = 0x21112231;
|
||||
@@ -2144,12 +2148,12 @@ static void cortex_m7_initfn(Object *obj)
|
||||
cpu->isar.mvfr2 = 0x00000040;
|
||||
cpu->id_pfr0 = 0x00000030;
|
||||
cpu->id_pfr1 = 0x00000200;
|
||||
cpu->id_dfr0 = 0x00100000;
|
||||
cpu->isar.id_dfr0 = 0x00100000;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x00100030;
|
||||
cpu->id_mmfr1 = 0x00000000;
|
||||
cpu->id_mmfr2 = 0x01000000;
|
||||
cpu->id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_mmfr0 = 0x00100030;
|
||||
cpu->isar.id_mmfr1 = 0x00000000;
|
||||
cpu->isar.id_mmfr2 = 0x01000000;
|
||||
cpu->isar.id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_isar0 = 0x01101110;
|
||||
cpu->isar.id_isar1 = 0x02112000;
|
||||
cpu->isar.id_isar2 = 0x20232231;
|
||||
@@ -2177,12 +2181,12 @@ static void cortex_m33_initfn(Object *obj)
|
||||
cpu->isar.mvfr2 = 0x00000040;
|
||||
cpu->id_pfr0 = 0x00000030;
|
||||
cpu->id_pfr1 = 0x00000210;
|
||||
cpu->id_dfr0 = 0x00200000;
|
||||
cpu->isar.id_dfr0 = 0x00200000;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x00101F40;
|
||||
cpu->id_mmfr1 = 0x00000000;
|
||||
cpu->id_mmfr2 = 0x01000000;
|
||||
cpu->id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_mmfr0 = 0x00101F40;
|
||||
cpu->isar.id_mmfr1 = 0x00000000;
|
||||
cpu->isar.id_mmfr2 = 0x01000000;
|
||||
cpu->isar.id_mmfr3 = 0x00000000;
|
||||
cpu->isar.id_isar0 = 0x01101110;
|
||||
cpu->isar.id_isar1 = 0x02212000;
|
||||
cpu->isar.id_isar2 = 0x20232232;
|
||||
@@ -2229,12 +2233,12 @@ static void cortex_r5_initfn(Object *obj)
|
||||
cpu->midr = 0x411fc153; /* r1p3 */
|
||||
cpu->id_pfr0 = 0x0131;
|
||||
cpu->id_pfr1 = 0x001;
|
||||
cpu->id_dfr0 = 0x010400;
|
||||
cpu->isar.id_dfr0 = 0x010400;
|
||||
cpu->id_afr0 = 0x0;
|
||||
cpu->id_mmfr0 = 0x0210030;
|
||||
cpu->id_mmfr1 = 0x00000000;
|
||||
cpu->id_mmfr2 = 0x01200000;
|
||||
cpu->id_mmfr3 = 0x0211;
|
||||
cpu->isar.id_mmfr0 = 0x0210030;
|
||||
cpu->isar.id_mmfr1 = 0x00000000;
|
||||
cpu->isar.id_mmfr2 = 0x01200000;
|
||||
cpu->isar.id_mmfr3 = 0x0211;
|
||||
cpu->isar.id_isar0 = 0x02101111;
|
||||
cpu->isar.id_isar1 = 0x13112111;
|
||||
cpu->isar.id_isar2 = 0x21232141;
|
||||
@@ -2284,18 +2288,18 @@ static void cortex_a8_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50078;
|
||||
cpu->id_pfr0 = 0x1031;
|
||||
cpu->id_pfr1 = 0x11;
|
||||
cpu->id_dfr0 = 0x400;
|
||||
cpu->isar.id_dfr0 = 0x400;
|
||||
cpu->id_afr0 = 0;
|
||||
cpu->id_mmfr0 = 0x31100003;
|
||||
cpu->id_mmfr1 = 0x20000000;
|
||||
cpu->id_mmfr2 = 0x01202000;
|
||||
cpu->id_mmfr3 = 0x11;
|
||||
cpu->isar.id_mmfr0 = 0x31100003;
|
||||
cpu->isar.id_mmfr1 = 0x20000000;
|
||||
cpu->isar.id_mmfr2 = 0x01202000;
|
||||
cpu->isar.id_mmfr3 = 0x11;
|
||||
cpu->isar.id_isar0 = 0x00101111;
|
||||
cpu->isar.id_isar1 = 0x12112111;
|
||||
cpu->isar.id_isar2 = 0x21232031;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x00111142;
|
||||
cpu->dbgdidr = 0x15141000;
|
||||
cpu->isar.dbgdidr = 0x15141000;
|
||||
cpu->clidr = (1 << 27) | (2 << 24) | 3;
|
||||
cpu->ccsidr[0] = 0xe007e01a; /* 16k L1 dcache. */
|
||||
cpu->ccsidr[1] = 0x2007e01a; /* 16k L1 icache. */
|
||||
@@ -2357,18 +2361,18 @@ static void cortex_a9_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50078;
|
||||
cpu->id_pfr0 = 0x1031;
|
||||
cpu->id_pfr1 = 0x11;
|
||||
cpu->id_dfr0 = 0x000;
|
||||
cpu->isar.id_dfr0 = 0x000;
|
||||
cpu->id_afr0 = 0;
|
||||
cpu->id_mmfr0 = 0x00100103;
|
||||
cpu->id_mmfr1 = 0x20000000;
|
||||
cpu->id_mmfr2 = 0x01230000;
|
||||
cpu->id_mmfr3 = 0x00002111;
|
||||
cpu->isar.id_mmfr0 = 0x00100103;
|
||||
cpu->isar.id_mmfr1 = 0x20000000;
|
||||
cpu->isar.id_mmfr2 = 0x01230000;
|
||||
cpu->isar.id_mmfr3 = 0x00002111;
|
||||
cpu->isar.id_isar0 = 0x00101111;
|
||||
cpu->isar.id_isar1 = 0x13112111;
|
||||
cpu->isar.id_isar2 = 0x21232041;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x00111142;
|
||||
cpu->dbgdidr = 0x35141000;
|
||||
cpu->isar.dbgdidr = 0x35141000;
|
||||
cpu->clidr = (1 << 27) | (1 << 24) | 3;
|
||||
cpu->ccsidr[0] = 0xe00fe019; /* 16k L1 dcache. */
|
||||
cpu->ccsidr[1] = 0x200fe019; /* 16k L1 icache. */
|
||||
@@ -2422,12 +2426,12 @@ static void cortex_a7_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50078;
|
||||
cpu->id_pfr0 = 0x00001131;
|
||||
cpu->id_pfr1 = 0x00011011;
|
||||
cpu->id_dfr0 = 0x02010555;
|
||||
cpu->isar.id_dfr0 = 0x02010555;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x10101105;
|
||||
cpu->id_mmfr1 = 0x40000000;
|
||||
cpu->id_mmfr2 = 0x01240000;
|
||||
cpu->id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_mmfr0 = 0x10101105;
|
||||
cpu->isar.id_mmfr1 = 0x40000000;
|
||||
cpu->isar.id_mmfr2 = 0x01240000;
|
||||
cpu->isar.id_mmfr3 = 0x02102211;
|
||||
/* a7_mpcore_r0p5_trm, page 4-4 gives 0x01101110; but
|
||||
* table 4-41 gives 0x02101110, which includes the arm div insns.
|
||||
*/
|
||||
@@ -2436,7 +2440,7 @@ static void cortex_a7_initfn(Object *obj)
|
||||
cpu->isar.id_isar2 = 0x21232041;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x10011142;
|
||||
cpu->dbgdidr = 0x3515f005;
|
||||
cpu->isar.dbgdidr = 0x3515f005;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32K L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe00a; /* 32K L1 icache */
|
||||
@@ -2468,18 +2472,18 @@ static void cortex_a15_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50078;
|
||||
cpu->id_pfr0 = 0x00001131;
|
||||
cpu->id_pfr1 = 0x00011011;
|
||||
cpu->id_dfr0 = 0x02010555;
|
||||
cpu->isar.id_dfr0 = 0x02010555;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x10201105;
|
||||
cpu->id_mmfr1 = 0x20000000;
|
||||
cpu->id_mmfr2 = 0x01240000;
|
||||
cpu->id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_mmfr0 = 0x10201105;
|
||||
cpu->isar.id_mmfr1 = 0x20000000;
|
||||
cpu->isar.id_mmfr2 = 0x01240000;
|
||||
cpu->isar.id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_isar0 = 0x02101110;
|
||||
cpu->isar.id_isar1 = 0x13112111;
|
||||
cpu->isar.id_isar2 = 0x21232041;
|
||||
cpu->isar.id_isar3 = 0x11112131;
|
||||
cpu->isar.id_isar4 = 0x10011142;
|
||||
cpu->dbgdidr = 0x3515f021;
|
||||
cpu->isar.dbgdidr = 0x3515f021;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32K L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe00a; /* 32K L1 icache */
|
||||
@@ -2709,13 +2713,14 @@ static void arm_max_initfn(Object *obj)
|
||||
t = FIELD_DP32(t, MVFR2, FPMISC, 4); /* FP MaxNum */
|
||||
cpu->isar.mvfr2 = t;
|
||||
|
||||
t = cpu->id_mmfr3;
|
||||
t = cpu->isar.id_mmfr3;
|
||||
t = FIELD_DP32(t, ID_MMFR3, PAN, 2); /* ATS1E1 */
|
||||
cpu->id_mmfr3 = t;
|
||||
cpu->isar.id_mmfr3 = t;
|
||||
|
||||
t = cpu->id_mmfr4;
|
||||
t = cpu->isar.id_mmfr4;
|
||||
t = FIELD_DP32(t, ID_MMFR4, HPDS, 1); /* AA32HPD */
|
||||
cpu->id_mmfr4 = t;
|
||||
t = FIELD_DP32(t, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
|
||||
cpu->isar.id_mmfr4 = t;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+121
-24
@@ -853,6 +853,11 @@ struct ARMCPU {
|
||||
* prefix means a constant register.
|
||||
* Some of these registers are split out into a substructure that
|
||||
* is shared with the translators to control the ISA.
|
||||
*
|
||||
* Note that if you add an ID register to the ARMISARegisters struct
|
||||
* you need to also update the 32-bit and 64-bit versions of the
|
||||
* kvm_arm_get_host_cpu_features() function to correctly populate the
|
||||
* field by reading the value from the KVM vCPU.
|
||||
*/
|
||||
struct ARMISARegisters {
|
||||
uint32_t id_isar0;
|
||||
@@ -862,9 +867,16 @@ struct ARMCPU {
|
||||
uint32_t id_isar4;
|
||||
uint32_t id_isar5;
|
||||
uint32_t id_isar6;
|
||||
uint32_t id_mmfr0;
|
||||
uint32_t id_mmfr1;
|
||||
uint32_t id_mmfr2;
|
||||
uint32_t id_mmfr3;
|
||||
uint32_t id_mmfr4;
|
||||
uint32_t mvfr0;
|
||||
uint32_t mvfr1;
|
||||
uint32_t mvfr2;
|
||||
uint32_t id_dfr0;
|
||||
uint32_t dbgdidr;
|
||||
uint64_t id_aa64isar0;
|
||||
uint64_t id_aa64isar1;
|
||||
uint64_t id_aa64pfr0;
|
||||
@@ -872,6 +884,8 @@ struct ARMCPU {
|
||||
uint64_t id_aa64mmfr0;
|
||||
uint64_t id_aa64mmfr1;
|
||||
uint64_t id_aa64mmfr2;
|
||||
uint64_t id_aa64dfr0;
|
||||
uint64_t id_aa64dfr1;
|
||||
} isar;
|
||||
uint32_t midr;
|
||||
uint32_t revidr;
|
||||
@@ -880,20 +894,11 @@ struct ARMCPU {
|
||||
uint32_t reset_sctlr;
|
||||
uint32_t id_pfr0;
|
||||
uint32_t id_pfr1;
|
||||
uint32_t id_dfr0;
|
||||
uint64_t pmceid0;
|
||||
uint64_t pmceid1;
|
||||
uint32_t id_afr0;
|
||||
uint32_t id_mmfr0;
|
||||
uint32_t id_mmfr1;
|
||||
uint32_t id_mmfr2;
|
||||
uint32_t id_mmfr3;
|
||||
uint32_t id_mmfr4;
|
||||
uint64_t id_aa64dfr0;
|
||||
uint64_t id_aa64dfr1;
|
||||
uint64_t id_aa64afr0;
|
||||
uint64_t id_aa64afr1;
|
||||
uint32_t dbgdidr;
|
||||
uint32_t clidr;
|
||||
uint64_t mp_affinity; /* MP ID without feature bits */
|
||||
/* The elements of this array are the CCSIDR values for each cache,
|
||||
@@ -1821,6 +1826,16 @@ FIELD(ID_AA64MMFR2, BBM, 52, 4)
|
||||
FIELD(ID_AA64MMFR2, EVT, 56, 4)
|
||||
FIELD(ID_AA64MMFR2, E0PD, 60, 4)
|
||||
|
||||
FIELD(ID_AA64DFR0, DEBUGVER, 0, 4)
|
||||
FIELD(ID_AA64DFR0, TRACEVER, 4, 4)
|
||||
FIELD(ID_AA64DFR0, PMUVER, 8, 4)
|
||||
FIELD(ID_AA64DFR0, BRPS, 12, 4)
|
||||
FIELD(ID_AA64DFR0, WRPS, 20, 4)
|
||||
FIELD(ID_AA64DFR0, CTX_CMPS, 28, 4)
|
||||
FIELD(ID_AA64DFR0, PMSVER, 32, 4)
|
||||
FIELD(ID_AA64DFR0, DOUBLELOCK, 36, 4)
|
||||
FIELD(ID_AA64DFR0, TRACEFILT, 40, 4)
|
||||
|
||||
FIELD(ID_DFR0, COPDBG, 0, 4)
|
||||
FIELD(ID_DFR0, COPSDBG, 4, 4)
|
||||
FIELD(ID_DFR0, MMAPDBG, 8, 4)
|
||||
@@ -1830,6 +1845,13 @@ FIELD(ID_DFR0, MPROFDBG, 20, 4)
|
||||
FIELD(ID_DFR0, PERFMON, 24, 4)
|
||||
FIELD(ID_DFR0, TRACEFILT, 28, 4)
|
||||
|
||||
FIELD(DBGDIDR, SE_IMP, 12, 1)
|
||||
FIELD(DBGDIDR, NSUHD_IMP, 14, 1)
|
||||
FIELD(DBGDIDR, VERSION, 16, 4)
|
||||
FIELD(DBGDIDR, CTX_CMPS, 20, 4)
|
||||
FIELD(DBGDIDR, BRPS, 24, 4)
|
||||
FIELD(DBGDIDR, WRPS, 28, 4)
|
||||
|
||||
FIELD(MVFR0, SIMDREG, 0, 4)
|
||||
FIELD(MVFR0, FPSP, 4, 4)
|
||||
FIELD(MVFR0, FPDP, 8, 4)
|
||||
@@ -3324,20 +3346,36 @@ static inline uint64_t *aa64_vfp_qreg(CPUARMState *env, unsigned regno)
|
||||
/* Shared between translate-sve.c and sve_helper.c. */
|
||||
extern const uint64_t pred_esz_masks[4];
|
||||
|
||||
/*
|
||||
* Naming convention for isar_feature functions:
|
||||
* Functions which test 32-bit ID registers should have _aa32_ in
|
||||
* their name. Functions which test 64-bit ID registers should have
|
||||
* _aa64_ in their name. These must only be used in code where we
|
||||
* know for certain that the CPU has AArch32 or AArch64 respectively
|
||||
* or where the correct answer for a CPU which doesn't implement that
|
||||
* CPU state is "false" (eg when generating A32 or A64 code, if adding
|
||||
* system registers that are specific to that CPU state, for "should
|
||||
* we let this system register bit be set" tests where the 32-bit
|
||||
* flavour of the register doesn't have the bit, and so on).
|
||||
* Functions which simply ask "does this feature exist at all" have
|
||||
* _any_ in their name, and always return the logical OR of the _aa64_
|
||||
* and the _aa32_ function.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 32-bit feature tests via id registers.
|
||||
*/
|
||||
static inline bool isar_feature_thumb_div(const ARMISARegisters *id)
|
||||
static inline bool isar_feature_aa32_thumb_div(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX32(id->id_isar0, ID_ISAR0, DIVIDE) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_arm_div(const ARMISARegisters *id)
|
||||
static inline bool isar_feature_aa32_arm_div(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX32(id->id_isar0, ID_ISAR0, DIVIDE) > 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_jazelle(const ARMISARegisters *id)
|
||||
static inline bool isar_feature_aa32_jazelle(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX32(id->id_isar1, ID_ISAR1, JAZELLE) != 0;
|
||||
}
|
||||
@@ -3412,21 +3450,21 @@ static inline bool isar_feature_aa32_fp16_arith(const ARMISARegisters *id)
|
||||
return FIELD_EX64(id->id_aa64pfr0, ID_AA64PFR0, FP) == 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_fp_d32(const ARMISARegisters *id)
|
||||
static inline bool isar_feature_aa32_simd_r32(const ARMISARegisters *id)
|
||||
{
|
||||
/* Return true if D16-D31 are implemented */
|
||||
return FIELD_EX64(id->mvfr0, MVFR0, SIMDREG) >= 2;
|
||||
return FIELD_EX32(id->mvfr0, MVFR0, SIMDREG) >= 2;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_fpshvec(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr0, MVFR0, FPSHVEC) > 0;
|
||||
return FIELD_EX32(id->mvfr0, MVFR0, FPSHVEC) > 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_fpdp(const ARMISARegisters *id)
|
||||
{
|
||||
/* Return true if CPU supports double precision floating point */
|
||||
return FIELD_EX64(id->mvfr0, MVFR0, FPDP) > 0;
|
||||
return FIELD_EX32(id->mvfr0, MVFR0, FPDP) > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3436,42 +3474,66 @@ static inline bool isar_feature_aa32_fpdp(const ARMISARegisters *id)
|
||||
*/
|
||||
static inline bool isar_feature_aa32_fp16_spconv(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr1, MVFR1, FPHP) > 0;
|
||||
return FIELD_EX32(id->mvfr1, MVFR1, FPHP) > 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_fp16_dpconv(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr1, MVFR1, FPHP) > 1;
|
||||
return FIELD_EX32(id->mvfr1, MVFR1, FPHP) > 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_vsel(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr2, MVFR2, FPMISC) >= 1;
|
||||
return FIELD_EX32(id->mvfr2, MVFR2, FPMISC) >= 1;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_vcvt_dr(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr2, MVFR2, FPMISC) >= 2;
|
||||
return FIELD_EX32(id->mvfr2, MVFR2, FPMISC) >= 2;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_vrint(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr2, MVFR2, FPMISC) >= 3;
|
||||
return FIELD_EX32(id->mvfr2, MVFR2, FPMISC) >= 3;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_vminmaxnm(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr2, MVFR2, FPMISC) >= 4;
|
||||
return FIELD_EX32(id->mvfr2, MVFR2, FPMISC) >= 4;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_pan(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr0, ID_MMFR3, PAN) != 0;
|
||||
return FIELD_EX32(id->id_mmfr3, ID_MMFR3, PAN) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_ats1e1(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->mvfr0, ID_MMFR3, PAN) >= 2;
|
||||
return FIELD_EX32(id->id_mmfr3, ID_MMFR3, PAN) >= 2;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_pmu_8_1(const ARMISARegisters *id)
|
||||
{
|
||||
/* 0xf means "non-standard IMPDEF PMU" */
|
||||
return FIELD_EX32(id->id_dfr0, ID_DFR0, PERFMON) >= 4 &&
|
||||
FIELD_EX32(id->id_dfr0, ID_DFR0, PERFMON) != 0xf;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_pmu_8_4(const ARMISARegisters *id)
|
||||
{
|
||||
/* 0xf means "non-standard IMPDEF PMU" */
|
||||
return FIELD_EX32(id->id_dfr0, ID_DFR0, PERFMON) >= 5 &&
|
||||
FIELD_EX32(id->id_dfr0, ID_DFR0, PERFMON) != 0xf;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_hpd(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX32(id->id_mmfr4, ID_MMFR4, HPDS) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa32_ac2(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX32(id->id_mmfr4, ID_MMFR4, AC2) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3653,6 +3715,41 @@ static inline bool isar_feature_aa64_bti(const ARMISARegisters *id)
|
||||
return FIELD_EX64(id->id_aa64pfr1, ID_AA64PFR1, BT) != 0;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_pmu_8_1(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX64(id->id_aa64dfr0, ID_AA64DFR0, PMUVER) >= 4 &&
|
||||
FIELD_EX64(id->id_aa64dfr0, ID_AA64DFR0, PMUVER) != 0xf;
|
||||
}
|
||||
|
||||
static inline bool isar_feature_aa64_pmu_8_4(const ARMISARegisters *id)
|
||||
{
|
||||
return FIELD_EX32(id->id_aa64dfr0, ID_AA64DFR0, PMUVER) >= 5 &&
|
||||
FIELD_EX32(id->id_aa64dfr0, ID_AA64DFR0, PMUVER) != 0xf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Feature tests for "does this exist in either 32-bit or 64-bit?"
|
||||
*/
|
||||
static inline bool isar_feature_any_fp16(const ARMISARegisters *id)
|
||||
{
|
||||
return isar_feature_aa64_fp16(id) || isar_feature_aa32_fp16_arith(id);
|
||||
}
|
||||
|
||||
static inline bool isar_feature_any_predinv(const ARMISARegisters *id)
|
||||
{
|
||||
return isar_feature_aa64_predinv(id) || isar_feature_aa32_predinv(id);
|
||||
}
|
||||
|
||||
static inline bool isar_feature_any_pmu_8_1(const ARMISARegisters *id)
|
||||
{
|
||||
return isar_feature_aa64_pmu_8_1(id) || isar_feature_aa32_pmu_8_1(id);
|
||||
}
|
||||
|
||||
static inline bool isar_feature_any_pmu_8_4(const ARMISARegisters *id)
|
||||
{
|
||||
return isar_feature_aa64_pmu_8_4(id) || isar_feature_aa32_pmu_8_4(id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Forward to the above feature tests given an ARMCPU pointer.
|
||||
*/
|
||||
|
||||
+35
-23
@@ -121,12 +121,12 @@ static void aarch64_a57_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50838;
|
||||
cpu->id_pfr0 = 0x00000131;
|
||||
cpu->id_pfr1 = 0x00011011;
|
||||
cpu->id_dfr0 = 0x03010066;
|
||||
cpu->isar.id_dfr0 = 0x03010066;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x10101105;
|
||||
cpu->id_mmfr1 = 0x40000000;
|
||||
cpu->id_mmfr2 = 0x01260000;
|
||||
cpu->id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_mmfr0 = 0x10101105;
|
||||
cpu->isar.id_mmfr1 = 0x40000000;
|
||||
cpu->isar.id_mmfr2 = 0x01260000;
|
||||
cpu->isar.id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_isar0 = 0x02101110;
|
||||
cpu->isar.id_isar1 = 0x13112111;
|
||||
cpu->isar.id_isar2 = 0x21232042;
|
||||
@@ -135,10 +135,10 @@ static void aarch64_a57_initfn(Object *obj)
|
||||
cpu->isar.id_isar5 = 0x00011121;
|
||||
cpu->isar.id_isar6 = 0;
|
||||
cpu->isar.id_aa64pfr0 = 0x00002222;
|
||||
cpu->id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64isar0 = 0x00011120;
|
||||
cpu->isar.id_aa64mmfr0 = 0x00001124;
|
||||
cpu->dbgdidr = 0x3516d000;
|
||||
cpu->isar.dbgdidr = 0x3516d000;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32KB L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe012; /* 48KB L1 icache */
|
||||
@@ -175,12 +175,12 @@ static void aarch64_a53_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50838;
|
||||
cpu->id_pfr0 = 0x00000131;
|
||||
cpu->id_pfr1 = 0x00011011;
|
||||
cpu->id_dfr0 = 0x03010066;
|
||||
cpu->isar.id_dfr0 = 0x03010066;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x10101105;
|
||||
cpu->id_mmfr1 = 0x40000000;
|
||||
cpu->id_mmfr2 = 0x01260000;
|
||||
cpu->id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_mmfr0 = 0x10101105;
|
||||
cpu->isar.id_mmfr1 = 0x40000000;
|
||||
cpu->isar.id_mmfr2 = 0x01260000;
|
||||
cpu->isar.id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_isar0 = 0x02101110;
|
||||
cpu->isar.id_isar1 = 0x13112111;
|
||||
cpu->isar.id_isar2 = 0x21232042;
|
||||
@@ -189,10 +189,10 @@ static void aarch64_a53_initfn(Object *obj)
|
||||
cpu->isar.id_isar5 = 0x00011121;
|
||||
cpu->isar.id_isar6 = 0;
|
||||
cpu->isar.id_aa64pfr0 = 0x00002222;
|
||||
cpu->id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64isar0 = 0x00011120;
|
||||
cpu->isar.id_aa64mmfr0 = 0x00001122; /* 40 bit physical addr */
|
||||
cpu->dbgdidr = 0x3516d000;
|
||||
cpu->isar.dbgdidr = 0x3516d000;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x700fe01a; /* 32KB L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe00a; /* 32KB L1 icache */
|
||||
@@ -228,12 +228,12 @@ static void aarch64_a72_initfn(Object *obj)
|
||||
cpu->reset_sctlr = 0x00c50838;
|
||||
cpu->id_pfr0 = 0x00000131;
|
||||
cpu->id_pfr1 = 0x00011011;
|
||||
cpu->id_dfr0 = 0x03010066;
|
||||
cpu->isar.id_dfr0 = 0x03010066;
|
||||
cpu->id_afr0 = 0x00000000;
|
||||
cpu->id_mmfr0 = 0x10201105;
|
||||
cpu->id_mmfr1 = 0x40000000;
|
||||
cpu->id_mmfr2 = 0x01260000;
|
||||
cpu->id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_mmfr0 = 0x10201105;
|
||||
cpu->isar.id_mmfr1 = 0x40000000;
|
||||
cpu->isar.id_mmfr2 = 0x01260000;
|
||||
cpu->isar.id_mmfr3 = 0x02102211;
|
||||
cpu->isar.id_isar0 = 0x02101110;
|
||||
cpu->isar.id_isar1 = 0x13112111;
|
||||
cpu->isar.id_isar2 = 0x21232042;
|
||||
@@ -241,10 +241,10 @@ static void aarch64_a72_initfn(Object *obj)
|
||||
cpu->isar.id_isar4 = 0x00011142;
|
||||
cpu->isar.id_isar5 = 0x00011121;
|
||||
cpu->isar.id_aa64pfr0 = 0x00002222;
|
||||
cpu->id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64dfr0 = 0x10305106;
|
||||
cpu->isar.id_aa64isar0 = 0x00011120;
|
||||
cpu->isar.id_aa64mmfr0 = 0x00001124;
|
||||
cpu->dbgdidr = 0x3516d000;
|
||||
cpu->isar.dbgdidr = 0x3516d000;
|
||||
cpu->clidr = 0x0a200023;
|
||||
cpu->ccsidr[0] = 0x701fe00a; /* 32KB L1 dcache */
|
||||
cpu->ccsidr[1] = 0x201fe012; /* 48KB L1 icache */
|
||||
@@ -699,9 +699,21 @@ static void aarch64_max_initfn(Object *obj)
|
||||
u = FIELD_DP32(u, ID_ISAR6, SPECRES, 1);
|
||||
cpu->isar.id_isar6 = u;
|
||||
|
||||
u = cpu->id_mmfr3;
|
||||
u = cpu->isar.id_mmfr3;
|
||||
u = FIELD_DP32(u, ID_MMFR3, PAN, 2); /* ATS1E1 */
|
||||
cpu->id_mmfr3 = u;
|
||||
cpu->isar.id_mmfr3 = u;
|
||||
|
||||
u = cpu->isar.id_mmfr4;
|
||||
u = FIELD_DP32(u, ID_MMFR4, AC2, 1); /* ACTLR2, HACTLR2 */
|
||||
cpu->isar.id_mmfr4 = u;
|
||||
|
||||
u = cpu->isar.id_aa64dfr0;
|
||||
u = FIELD_DP64(u, ID_AA64DFR0, PMUVER, 5); /* v8.4-PMU */
|
||||
cpu->isar.id_aa64dfr0 = u;
|
||||
|
||||
u = cpu->isar.id_dfr0;
|
||||
u = FIELD_DP32(u, ID_DFR0, PERFMON, 5); /* v8.4-PMU */
|
||||
cpu->isar.id_dfr0 = u;
|
||||
|
||||
/*
|
||||
* FIXME: We do not yet support ARMv8.2-fp16 for AArch32 yet,
|
||||
|
||||
@@ -16,8 +16,8 @@ static bool linked_bp_matches(ARMCPU *cpu, int lbn)
|
||||
{
|
||||
CPUARMState *env = &cpu->env;
|
||||
uint64_t bcr = env->cp15.dbgbcr[lbn];
|
||||
int brps = extract32(cpu->dbgdidr, 24, 4);
|
||||
int ctx_cmps = extract32(cpu->dbgdidr, 20, 4);
|
||||
int brps = arm_num_brps(cpu);
|
||||
int ctx_cmps = arm_num_ctx_cmps(cpu);
|
||||
int bt;
|
||||
uint32_t contextidr;
|
||||
uint64_t hcr_el2;
|
||||
@@ -29,7 +29,7 @@ static bool linked_bp_matches(ARMCPU *cpu, int lbn)
|
||||
* case DBGWCR<n>_EL1.LBN must indicate that breakpoint).
|
||||
* We choose the former.
|
||||
*/
|
||||
if (lbn > brps || lbn < (brps - ctx_cmps)) {
|
||||
if (lbn >= brps || lbn < (brps - ctx_cmps)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1574,3 +1574,5 @@ DEF_HELPER_FLAGS_6(sve_stdd_le_zd, TCG_CALL_NO_WG,
|
||||
void, env, ptr, ptr, ptr, tl, i32)
|
||||
DEF_HELPER_FLAGS_6(sve_stdd_be_zd, TCG_CALL_NO_WG,
|
||||
void, env, ptr, ptr, ptr, tl, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(sve2_pmull_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
+264
-204
File diff suppressed because it is too large
Load Diff
+10
-11
@@ -303,14 +303,8 @@ DEF_HELPER_2(neon_abd_s16, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_abd_u32, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_abd_s32, i32, i32, i32)
|
||||
|
||||
DEF_HELPER_2(neon_shl_u8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_shl_s8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_shl_u16, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_shl_s16, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_shl_u32, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_shl_s32, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_shl_u64, i64, i64, i64)
|
||||
DEF_HELPER_2(neon_shl_s64, i64, i64, i64)
|
||||
DEF_HELPER_2(neon_rshl_u8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_rshl_s8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_rshl_u16, i32, i32, i32)
|
||||
@@ -348,8 +342,6 @@ DEF_HELPER_2(neon_sub_u8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_sub_u16, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_mul_u8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_mul_u16, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_mul_p8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_mull_p8, i64, i32, i32)
|
||||
|
||||
DEF_HELPER_2(neon_tst_u8, i32, i32, i32)
|
||||
DEF_HELPER_2(neon_tst_u16, i32, i32, i32)
|
||||
@@ -569,9 +561,6 @@ DEF_HELPER_FLAGS_3(crc32, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32)
|
||||
DEF_HELPER_FLAGS_3(crc32c, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32)
|
||||
DEF_HELPER_2(dc_zva, void, env, i64)
|
||||
|
||||
DEF_HELPER_FLAGS_2(neon_pmull_64_lo, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
||||
DEF_HELPER_FLAGS_2(neon_pmull_64_hi, TCG_CALL_NO_RWG_SE, i64, i64, i64)
|
||||
|
||||
DEF_HELPER_FLAGS_5(gvec_qrdmlah_s16, TCG_CALL_NO_RWG,
|
||||
void, ptr, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_5(gvec_qrdmlsh_s16, TCG_CALL_NO_RWG,
|
||||
@@ -697,6 +686,16 @@ DEF_HELPER_FLAGS_2(frint64_s, TCG_CALL_NO_RWG, f32, f32, ptr)
|
||||
DEF_HELPER_FLAGS_2(frint32_d, TCG_CALL_NO_RWG, f64, f64, ptr)
|
||||
DEF_HELPER_FLAGS_2(frint64_d, TCG_CALL_NO_RWG, f64, f64, ptr)
|
||||
|
||||
DEF_HELPER_FLAGS_4(gvec_sshl_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(gvec_sshl_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(gvec_ushl_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(gvec_ushl_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(gvec_pmul_b, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(gvec_pmull_q, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
DEF_HELPER_FLAGS_4(neon_pmull_h, TCG_CALL_NO_RWG, void, ptr, ptr, ptr, i32)
|
||||
|
||||
#ifdef TARGET_AARCH64
|
||||
#include "helper-a64.h"
|
||||
#include "helper-sve.h"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user