mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-16 14:41:55 -06:00
target-arm queue:
* gdbstub: Correct misparsing of vCont C/S requests * openrisc: Move pic_cpu code into CPU object proper * nios2: Move IIC code into CPU object proper * Improve reporting of ROM overlap errors * xlnx-versal: Add USB support * hw/misc/zynq_slcr: Avoid #DIV/0! error * Numonyx: Fix dummy cycles and check for SPI mode on cmds -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAl/YwVIZHHBldGVyLm1h eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3lOpD/9FjasMvZqYeanyNlv+4Swk 4MFeYouIzXKSFu9tj5eDTHzN1TJl5iSwhkIcr9NBqxppuv2eqzxfWWMEfCZ06pxz BR2HoSlSLUih8cKpu40cQg0TTMEOGEOV9RAHtt8vSGE0FesoiXG2ORUPcxm3NxbN l9XZ1x3Yb5ZLqVZViFjlZ5gXnTzJ//uPEzbl7N9+pa0mXDKvmvwAl19DLmF6N2Jj D+gmrLGeEbkJ358RGO/VF7r/1bOkrhwKrb8MzeqFRmjIqaOGbGqs/71+amiSjS8n hC1HKf6KQOLrklMVaYg1pRxHLbHpQR+haeeX4Xt9jxx8EUrwXojlyaD8p4V9Hcu8 L5haTIBhPrnTkUfHZYL0qYkqRpzbNq97oX2Gmk967FfsZME5fxNa3kS6zM0GkIBx YKghaZtFInAFODUbG1hHdUc+WbvfQDhj/mBQ6wWw669vYpoab/3nfVq8YVoupVM/ RntcqpBfqtGgPzuJ2dJEEsm6QlK4SZaGlmPkz542OzcHxw3SgeqkbIuDW/CtNI+b c5PgX0C2S2AnFAAHURnsXdqt6+O01FZqOU7SCLjmwrBrpDG69lum+JLCqXFe9iMW XgrTrxyPIcz5+Bv63AqKcm6rpcQs5ekwmLLEjT0OJtr+5ef9MeRil0aChj1j4i+2 H/82yKR4JWW1egEvTJhskQ== =lHZA -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201215' into staging target-arm queue: * gdbstub: Correct misparsing of vCont C/S requests * openrisc: Move pic_cpu code into CPU object proper * nios2: Move IIC code into CPU object proper * Improve reporting of ROM overlap errors * xlnx-versal: Add USB support * hw/misc/zynq_slcr: Avoid #DIV/0! error * Numonyx: Fix dummy cycles and check for SPI mode on cmds # gpg: Signature made Tue 15 Dec 2020 13:59:46 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-20201215: hw/block/m25p80: Fix Numonyx fast read dummy cycle count hw/block/m25p80: Check SPI mode before running some Numonyx commands hw/block/m25p80: Fix when VCFG XIP bit is set for Numonyx hw/block/m25p80: Make Numonyx config field names more accurate hw/misc/zynq_slcr: Avoid #DIV/0! error arm: xlnx-versal: Connect usb to virt-versal usb: xlnx-usb-subsystem: Add xilinx usb subsystem usb: Add DWC3 model usb: Add versal-usb2-ctrl-regs module elf_ops.h: Be more verbose with ROM blob names elf_ops.h: Don't truncate name of the ROM blobs we create hw/core/loader.c: Improve reporting of ROM overlap errors hw/core/loader.c: Track last-seen ROM in rom_check_and_register_reset() target/nios2: Use deposit32() to update ipending register target/nios2: Move nios2_check_interrupts() into target/nios2 target/nios2: Move IIC code into CPU object proper target/openrisc: Move pic_cpu code into CPU object proper hw/openrisc/openrisc_sim: Abstract out "get IRQ x of CPU y" hw/openrisc/openrisc_sim: Use IRQ splitter when connecting IRQ to multiple CPUs gdbstub: Correct misparsing of vCont C/S requests Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
657ee88ef3
32 changed files with 1557 additions and 304 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "hw/net/cadence_gem.h"
|
||||
#include "hw/rtc/xlnx-zynqmp-rtc.h"
|
||||
#include "qom/object.h"
|
||||
#include "hw/usb/xlnx-usb-subsystem.h"
|
||||
|
||||
#define TYPE_XLNX_VERSAL "xlnx-versal"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(Versal, XLNX_VERSAL)
|
||||
|
@ -59,6 +60,7 @@ struct Versal {
|
|||
PL011State uart[XLNX_VERSAL_NR_UARTS];
|
||||
CadenceGEMState gem[XLNX_VERSAL_NR_GEMS];
|
||||
XlnxZDMA adma[XLNX_VERSAL_NR_ADMAS];
|
||||
VersalUsb2 usb;
|
||||
} iou;
|
||||
} lpd;
|
||||
|
||||
|
@ -88,6 +90,7 @@ struct Versal {
|
|||
|
||||
#define VERSAL_UART0_IRQ_0 18
|
||||
#define VERSAL_UART1_IRQ_0 19
|
||||
#define VERSAL_USB0_IRQ_0 22
|
||||
#define VERSAL_GEM0_IRQ_0 56
|
||||
#define VERSAL_GEM0_WAKE_IRQ_0 57
|
||||
#define VERSAL_GEM1_IRQ_0 58
|
||||
|
@ -125,6 +128,12 @@ struct Versal {
|
|||
#define MM_OCM 0xfffc0000U
|
||||
#define MM_OCM_SIZE 0x40000
|
||||
|
||||
#define MM_USB2_CTRL_REGS 0xFF9D0000
|
||||
#define MM_USB2_CTRL_REGS_SIZE 0x10000
|
||||
|
||||
#define MM_USB_0 0xFE200000
|
||||
#define MM_USB_0_SIZE 0x10000
|
||||
|
||||
#define MM_TOP_DDR 0x0
|
||||
#define MM_TOP_DDR_SIZE 0x80000000U
|
||||
#define MM_TOP_DDR_2 0x800000000ULL
|
||||
|
|
|
@ -330,7 +330,6 @@ static int glue(load_elf, SZ)(const char *name, int fd,
|
|||
uint64_t addr, low = (uint64_t)-1, high = 0;
|
||||
GMappedFile *mapped_file = NULL;
|
||||
uint8_t *data = NULL;
|
||||
char label[128];
|
||||
int ret = ELF_LOAD_FAILED;
|
||||
|
||||
if (read(fd, &ehdr, sizeof(ehdr)) != sizeof(ehdr))
|
||||
|
@ -544,7 +543,9 @@ static int glue(load_elf, SZ)(const char *name, int fd,
|
|||
*/
|
||||
if (mem_size != 0) {
|
||||
if (load_rom) {
|
||||
snprintf(label, sizeof(label), "phdr #%d: %s", i, name);
|
||||
g_autofree char *label =
|
||||
g_strdup_printf("%s ELF program header segment %d",
|
||||
name, i);
|
||||
|
||||
/*
|
||||
* rom_add_elf_program() takes its own reference to
|
||||
|
|
55
include/hw/usb/hcd-dwc3.h
Normal file
55
include/hw/usb/hcd-dwc3.h
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* QEMU model of the USB DWC3 host controller emulation.
|
||||
*
|
||||
* Copyright (c) 2020 Xilinx Inc.
|
||||
*
|
||||
* Written by Vikram Garhwal<fnu.vikram@xilinx.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#ifndef HCD_DWC3_H
|
||||
#define HCD_DWC3_H
|
||||
|
||||
#include "hw/usb/hcd-xhci.h"
|
||||
#include "hw/usb/hcd-xhci-sysbus.h"
|
||||
|
||||
#define TYPE_USB_DWC3 "usb_dwc3"
|
||||
|
||||
#define USB_DWC3(obj) \
|
||||
OBJECT_CHECK(USBDWC3, (obj), TYPE_USB_DWC3)
|
||||
|
||||
#define USB_DWC3_R_MAX ((0x530 / 4) + 1)
|
||||
#define DWC3_SIZE 0x10000
|
||||
|
||||
typedef struct USBDWC3 {
|
||||
SysBusDevice parent_obj;
|
||||
MemoryRegion iomem;
|
||||
XHCISysbusState sysbus_xhci;
|
||||
|
||||
uint32_t regs[USB_DWC3_R_MAX];
|
||||
RegisterInfo regs_info[USB_DWC3_R_MAX];
|
||||
|
||||
struct {
|
||||
uint8_t mode;
|
||||
uint32_t dwc_usb3_user;
|
||||
} cfg;
|
||||
|
||||
} USBDWC3;
|
||||
|
||||
#endif
|
45
include/hw/usb/xlnx-usb-subsystem.h
Normal file
45
include/hw/usb/xlnx-usb-subsystem.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* QEMU model of the Xilinx usb subsystem
|
||||
*
|
||||
* Copyright (c) 2020 Xilinx Inc. Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _XLNX_VERSAL_USB_SUBSYSTEM_H_
|
||||
#define _XLNX_VERSAL_USB_SUBSYSTEM_H_
|
||||
|
||||
#include "hw/usb/xlnx-versal-usb2-ctrl-regs.h"
|
||||
#include "hw/usb/hcd-dwc3.h"
|
||||
|
||||
#define TYPE_XILINX_VERSAL_USB2 "xlnx.versal-usb2"
|
||||
|
||||
#define VERSAL_USB2(obj) \
|
||||
OBJECT_CHECK(VersalUsb2, (obj), TYPE_XILINX_VERSAL_USB2)
|
||||
|
||||
typedef struct VersalUsb2 {
|
||||
SysBusDevice parent_obj;
|
||||
MemoryRegion dwc3_mr;
|
||||
MemoryRegion usb2Ctrl_mr;
|
||||
|
||||
VersalUsb2CtrlRegs usb2Ctrl;
|
||||
USBDWC3 dwc3;
|
||||
} VersalUsb2;
|
||||
|
||||
#endif
|
45
include/hw/usb/xlnx-versal-usb2-ctrl-regs.h
Normal file
45
include/hw/usb/xlnx-versal-usb2-ctrl-regs.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* QEMU model of the VersalUsb2CtrlRegs Register control/Status block for
|
||||
* USB2.0 controller
|
||||
*
|
||||
* Copyright (c) 2020 Xilinx Inc. Vikram Garhwal <fnu.vikram@xilinx.com>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _XLNX_USB2_REGS_H_
|
||||
#define _XLNX_USB2_REGS_H_
|
||||
|
||||
#define TYPE_XILINX_VERSAL_USB2_CTRL_REGS "xlnx.versal-usb2-ctrl-regs"
|
||||
|
||||
#define XILINX_VERSAL_USB2_CTRL_REGS(obj) \
|
||||
OBJECT_CHECK(VersalUsb2CtrlRegs, (obj), TYPE_XILINX_VERSAL_USB2_CTRL_REGS)
|
||||
|
||||
#define USB2_REGS_R_MAX ((0x78 / 4) + 1)
|
||||
|
||||
typedef struct VersalUsb2CtrlRegs {
|
||||
SysBusDevice parent_obj;
|
||||
MemoryRegion iomem;
|
||||
qemu_irq irq_ir;
|
||||
|
||||
uint32_t regs[USB2_REGS_R_MAX];
|
||||
RegisterInfo regs_info[USB2_REGS_R_MAX];
|
||||
} VersalUsb2CtrlRegs;
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue