Re: [RFC PATCH v7 14/29] hw/loongarch: Add support loongson3 virt machine type.

2022-04-15 Thread yangxiaojuan
Hi, On 2022/3/29 上午5:02, Mark Cave-Ayland wrote: +static const MemoryRegionOps loongarch_qemu_ops = { +    .read = loongarch_qemu_read, +    .write = loongarch_qemu_write, +    .endianness = DEVICE_LITTLE_ENDIAN, +    .valid = { +    .min_access_size = 4, +    .max_access_size = 8, +  

Re: [RFC PATCH v7 14/29] hw/loongarch: Add support loongson3 virt machine type.

2022-03-28 Thread Mark Cave-Ayland
On 28/03/2022 21:49, Richard Henderson wrote: On 3/28/22 06:57, Xiaojuan Yang wrote: +static uint64_t loongarch_qemu_read(void *opaque, hwaddr addr, unsigned size) +{ +    uint64_t feature = 0UL; + +    switch (addr) { +    case FEATURE_REG: +    feature |= 1UL << IOCSRF_MSI | 1UL << IOCSRF

Re: [RFC PATCH v7 14/29] hw/loongarch: Add support loongson3 virt machine type.

2022-03-28 Thread Richard Henderson
On 3/28/22 06:57, Xiaojuan Yang wrote: +static uint64_t loongarch_qemu_read(void *opaque, hwaddr addr, unsigned size) +{ +uint64_t feature = 0UL; + +switch (addr) { +case FEATURE_REG: +feature |= 1UL << IOCSRF_MSI | 1UL << IOCSRF_EXTIOI | + 1UL << IOCSRF_CSRI

[RFC PATCH v7 14/29] hw/loongarch: Add support loongson3 virt machine type.

2022-03-28 Thread Xiaojuan Yang
Emulate a 3A5000 board use the new loongarch instruction. 3A5000 belongs to the Loongson3 series processors. The board consists of a 3A5000 cpu model and the virt bridge. The host 3A5000 board is really complicated and contains many functions.Now for the tcg softmmu mode only part functions are emu