Zynq-7000 EPP platform model
Subsystems (2)
v9 cover Zynq-7000 EPP platform model
This is a suite of Device models and a machine model for the Xilinx Zynq-7000 Extensible Processing Platform:
http://www.xilinx.com/products/silicon-devices/epp/zynq-7000/index.htm
This is an ARM based platform featuring embedded SoC peripherals. This patch series includes a minimal set of device models and a a machine model capable of emulating zynq platforms booting linux.
This first 3 patches in this series are device models for IP provided by cadence for the Zynq platform. The final patch is the initial revision of the zynq machine model.
Most of this work was originally authored by Xilinx, as indicated by (c) notices in added files.
Tree is available from:git://developer.petalogix.com/private/peterc/qemu.git
branch: zynq-initial.9
---
changed from v8:
reworked uart interrupt behaviour (1/4)
implemented vmsd (2/4) (3/4) (4/4)
various typographical errors in comments (1/4) (2/4)
changed from v7:
removed fflush() from DBPRINTF (all)
address P. Maydell comments re v6 (3/4) (4/4)
fixed timer mod on wrap around logic (r.e. P Brook comments) (2/4)
changed from v6:
addressed P. Maydell comments re v5 (1/4) (2/4)
renamed qemu_debug() -> DB_PRINT (all)
changed from v5:
removed usages of arm_boot_info->bootsmp_priv_base (4/4)
changed from v4:
fixed FSF addess (1/4) (2/4) (4/4)
changed device_init -> type_init (all)
changed from v3:
fixed timer race condition issue (2/4)
changed from v2:
fixed timer prescision issue (2/4)
fixed compile warnings in zynq_arm_sysctl (4/4)
changes from v1:
formatting and style fixes
updated for QOM
removed former patch 3 (cadence WDT device model) - not required
removed former patch 5 (dtb argument) - this is currently under discussion in other patch series' removed former patch 6 (initrd parameterisation) - not required for minimal boot
Peter A. G. Crosthwaite (4):
cadence_uart: initial version of device model
cadence_ttc: initial version of device model
cadence_gem: initial version of device model
xilinx_zynq: machine model initial version
MAINTAINERS | 7 + Makefile.target | 4 + hw/cadence_gem.c | 1233 +++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/cadence_ttc.c | 489 +++++++++++++++++++++ hw/cadence_uart.c | 513 ++++++++++++++++++++++ hw/xilinx_zynq.c | 157 +++++++ hw/zynq_slcr.c | 535 +++++++++++++++++++++++ 7 files changed, 2938 insertions(+), 0 deletions(-) create mode 100644 hw/cadence_gem.c create mode 100644 hw/cadence_ttc.c create mode 100644 hw/cadence_uart.c create mode 100644 hw/xilinx_zynq.c create mode 100644 hw/zynq_slcr.c
Signature · 1 line
1.7.3.2
PATCH v9 1/4 cadence_uart: initial version of device model
Implemented cadence UART serial controller
---
changed from v8:
reworked uart interrupt behaviour
typo fix UARK->UART
vsmd version correction
changed from v7:
removed fflush() from DBPRINTF
changed from v6:
removed automatic interrupt clearing
removed mask_and_right_justify
removed redundant stop_break logic
made tx and rx function interfaces consistent
renamed qemu_debug() -> DB_PRINT (all)
changed from v4:
fixed FSF addess
changed device_init -> type_init
changes from v1:
converted register file to array
added vmsd state save/load support
removed read side effects from CISR register
Makefile.target | 1 + hw/cadence_uart.c | 513 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 514 insertions(+), 0 deletions(-) create mode 100644 hw/cadence_uart.c
Makefile.target +1 -0
@@ -345,6 +345,7 @@ endif obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o obj-arm-y += versatile_pci.o +obj-arm-y += cadence_uart.o obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
hw/cadence_uart.c new file +513 -0
513 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH v9 2/4 cadence_ttc: initial version of device model
In reply to Peter A. G. CrosthwaiteImplemented cadence Triple Timer Counter (TCC)
---
changed from v8:
implemented vmsd
changed from v7:
removed fflush() from DBPRINTF
changed from v6:
renamed cadence_ttc_state -> CadenceTTCState
renamed qemu_debug() -> DB_PRINT (all)
added reset function
changed from v4:
fixed FSF addess
changed device_init -> type_init
changed from v3:
Fixed race condition where timer could miss match events on wrap around changed from v2:
changed ptimer to QEMUTimer (Fixed skew/drift issue in timer delays) changes from v1:
refactored event driven code
marked vmsd as unmigratable
Makefile.target | 1 + hw/cadence_ttc.c | 489 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 490 insertions(+), 0 deletions(-) create mode 100644 hw/cadence_ttc.c
Makefile.target +1 -0
@@ -346,6 +346,7 @@ obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o obj-arm-y += versatile_pci.o obj-arm-y += cadence_uart.o +obj-arm-y += cadence_ttc.o obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
hw/cadence_ttc.c new file +489 -0
489 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH v9 3/4 cadence_gem: initial version of device model
In reply to Peter A. G. CrosthwaiteDevice model for cadence gem ethernet controller.
---
changed from v8:
implemented vmsd
changed from v7:
removed dedundant #includes
renamed *COMPL -> *CMPL for consistency changed bzero -> memset
removed fflush() from DBPRINTF
removed copius usage of /4 for register offsets factored out phy reset and implement phy software reset reworked gem_update_int_status (less repitious code) corrected number typos
changed from v6:
renamed qemu_debug() -> DB_PRINT
changed from v4:
changed device_init -> type_init
changes from v1:
removed global init function
marked vmsd as unmigratable
Makefile.target | 1 + hw/cadence_gem.c | 1233 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1234 insertions(+), 0 deletions(-) create mode 100644 hw/cadence_gem.c
Makefile.target +1 -0
@@ -347,6 +347,7 @@ obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o obj-arm-y += versatile_pci.o obj-arm-y += cadence_uart.o obj-arm-y += cadence_ttc.o +obj-arm-y += cadence_gem.o obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
hw/cadence_gem.c new file +1233 -0
1,233 lines not on this page · raw message
Signature · 1 line
1.7.3.2
PATCH v9 4/4 xilinx_zynq: machine model initial version
In reply to Peter A. G. CrosthwaiteXilinx zynq-7000 machine model. Also includes device model for the zynq-specific system level control register (SLCR) module.
---
changed from v8:
implemented vmsd for slcr
changed from v7:
removed (non-functional) SMP support removed pflash #ifery
renamed zynq_arm_sysctl -> zynq_slcr deleted bogus cryptic comments
marked slcr vmsd as unmigratable CamelCased typedef enum types
changed from v6:
renamed qemu_debug() -> DB_PRINT
changed from v5:
removed usages of arm_boot_info->bootsmp_priv_base changed from v4:
fixed FSF addess
changed device_init -> type_init
changes since v2:
removed 2 compile warnings from zynq_arm_sysctl.c changes since v1:
Added gem init function
remowed WDT instantiation
Added maintainers information
removed dead sys_id and proc_id variables
MAINTAINERS | 7 + Makefile.target | 1 + hw/xilinx_zynq.c | 157 ++++++++++++++++ hw/zynq_slcr.c | 535 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 700 insertions(+), 0 deletions(-) create mode 100644 hw/xilinx_zynq.c create mode 100644 hw/zynq_slcr.c
MAINTAINERS +7 -0
@@ -251,6 +251,13 @@ M: Peter Maydell <[email protected]> S: Maintained F: hw/versatilepb.c +Xilinx Zynq +M: Peter Crosthwaite <[email protected]> +S: Maintained +F: hw/xilinx_zynq.c +F: hw/zynq_slcr.c +F: hw/cadence_* + CRIS Machines ------------- Axis Dev88
Makefile.target +1 -0
@@ -348,6 +348,7 @@ obj-arm-y += versatile_pci.o obj-arm-y += cadence_uart.o obj-arm-y += cadence_ttc.o obj-arm-y += cadence_gem.o +obj-arm-y += xilinx_zynq.o zynq_slcr.o obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
hw/xilinx_zynq.c new file +157 -0
157 lines not on this page · raw message
hw/zynq_slcr.c new file +535 -0
535 lines not on this page · raw message
Signature · 1 line
1.7.3.2
Quoted 6 lines · Peter A. G. Crosthwaite
This is a suite of Device models and a machine model for the Xilinx Zynq-7000 Extensible Processing Platform:
http://www.xilinx.com/products/silicon-devices/epp/zynq-7000/index.htm
This is an ARM based platform featuring embedded SoC peripherals. This patch series includes a minimal set of device models and a a machine model capable of emulating zynq platforms booting linux.
Quoted 7 lines
This first 3 patches in this series are device models for IP provided by cadence for the Zynq platform. The final patch is the initial revision of the zynq machine model.
Most of this work was originally authored by Xilinx, as indicated by (c) notices in added files.
Tree is available from:
git://developer.petalogix.com/private/peterc/qemu.git
branch: zynq-initial.9
Thanks for this work Peter, I've pulled the series.
Cheers,
Ed
Quoted 12 lines
-----Original Message-----
From: Edgar E. Iglesias [mailto:[email protected]]
Sent: Tuesday, March 06, 2012 5:25 PM
To: Peter A. G. Crosthwaite
Cc: [email protected]; [email protected]; [email protected]; Duy Le; John Linn; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH v9 0/4] Zynq-7000 EPP platform modelQuoted 1 line · Peter A. G. Crosthwaite
This is a suite of Device models and a machine model for the Xilinx
Quoted 10 lines
Zynq-7000 Extensible Processing Platform:
Quoted 2 lines
7000/index.htm
Quoted 2 lines
This is an ARM based platform featuring embedded SoC peripherals.
This patch series includes a minimal set of device models and a a machine model capable of emulating zynq platforms booting linux.
Quoted 2 lines
This first 3 patches in this series are device models for IP
provided
Quoted 4 lines
by cadence for the Zynq platform. The final patch is the initial revision of the zynq machine model.
Quoted 2 lines
Most of this work was originally authored by Xilinx, as indicated by
Quoted 8 lines
(c) notices in added files.
Quoted 4 lines
Tree is available from:
git://developer.petalogix.com/private/peterc/qemu.git
branch: zynq-initial.9Thanks for this work Peter, I've pulled the series.
Great! Appreciate the help Ed.
Quoted 3 lines
Cheers,
Ed
Cheers,
John
***** stuck in corporate email #$%#$%#, please ignore the following footer *****
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Re: [Qemu-devel] [PATCH v9 4/4] xilinx_zynq: machine model initial version
In reply to Peter A. G. CrosthwaiteQuoted 5 lines · Peter A. G. Crosthwaite
Xilinx zynq-7000 machine model. Also includes device model for the zynq-specific system level control register (SLCR) module.
Signed-off-by Peter A. G. Crosthwaite<[email protected]>Acked-by Edgar E. Iglesias<[email protected]>
This breaks the build for me:
cc1: warnings being treated as errors /home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_read’:/home/anthony/git/qemu/hw/zynq_slcr.c:314:25: error: array subscript is above array bounds /home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_write’:/home/anthony/git/qemu/hw/zynq_slcr.c:457:22: error: array subscript is above array bounds make[1]: *** [zynq_slcr.o] Error 1
hw/zynq_slcr.c line 458
Quoted 3 lines
hw/zynq_slcr.c new file +3
-0+ case 0xA60 ... 0xA8C: + s->afi[0 ][(offset -0x700 ) /4 ] = val; +break ;
And GCC is definitely right here. This will pretty clearly overflow the array if offset is any of the allowable values per the switch statement.
Regards,
Anthony Liguori
Re: [Qemu-devel] [PATCH v9 4/4] xilinx_zynq: machine model initial version
On it
Quoted 34 lines · Anthony Liguori
Quoted 7 lines · Peter A. G. Crosthwaite
Xilinx zynq-7000 machine model. Also includes device model for the zynq-specific
system level control register (SLCR) module.Signed-off-by Peter A. G. Crosthwaite<[email protected]>Acked-by Edgar E. Iglesias<[email protected]>This breaks the build for me:
cc1: warnings being treated as errors
/home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_read’:/home/anthony/git/qemu/hw/zynq_slcr.c:314:25: error: array subscript is above array bounds/home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_write’:/home/anthony/git/qemu/hw/zynq_slcr.c:457:22: error: array subscript is above array bounds
make[1]: *** [zynq_slcr.o] Error 1Quoted 3 lines
+ case
0xA60...0xA8C:
+ s->afi[0][(offset -0x700) / 4] = val;
+ break;And GCC is definitely right here. This will pretty clearly overflow the array if offset is any of the allowable values per the switch statement.
Regards,
Anthony Liguori
Re: [Qemu-devel] [PATCH v9 4/4] xilinx_zynq: machine model initial version
nvm,
youve got it covered. Thanks Anthony.
Quoted 37 lines · Peter Crosthwaite
On it
Quoted 34 lines · Anthony Liguori
Quoted 7 lines · Peter A. G. Crosthwaite
Xilinx zynq-7000 machine model. Also includes device model for the zynq-specific
system level control register (SLCR) module.Signed-off-by Peter A. G. Crosthwaite<[email protected]>Acked-by Edgar E. Iglesias<[email protected]>This breaks the build for me:
cc1: warnings being treated as errors
/home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_read’:/home/anthony/git/qemu/hw/zynq_slcr.c:314:25: error: array subscript is above array bounds/home/anthony/git/qemu/hw/zynq_slcr.c: In function ‘zynq_slcr_write’:/home/anthony/git/qemu/hw/zynq_slcr.c:457:22: error: array subscript is above array bounds
make[1]: *** [zynq_slcr.o] Error 1Quoted 3 lines
+ case
0xA60...0xA8C:
+ s->afi[0][(offset -0x700) / 4] = val;
+ break;And GCC is definitely right here. This will pretty clearly overflow the array if offset is any of the allowable values per the switch statement.
Regards,
Anthony Liguori