mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-30 19:15:42 +00:00 
			
		
		
		
	 6111a0c0ed
			
		
	
	
		6111a0c0ed
		
	
	
	
	
		
			
			The license is the 'GNU General Public License v2.0 or later', not 'and': This program is free software; you can redistribute it and/ori modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Fix the license comment. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200312213455.15854-1-philmd@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * Raspberry Pi emulation (c) 2012 Gregory Estrade
 | |
|  * Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous
 | |
|  *
 | |
|  * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft
 | |
|  * Written by Andrew Baumann
 | |
|  *
 | |
|  * ARM Local Timer IRQ Copyright (c) 2019. Zoltán Baldaszti
 | |
|  * Added basic IRQ_TIMER interrupt support
 | |
|  *
 | |
|  * This work is licensed under the terms of the GNU GPL, version 2 or later.
 | |
|  * See the COPYING file in the top-level directory.
 | |
|  */
 | |
| 
 | |
| #ifndef BCM2836_CONTROL_H
 | |
| #define BCM2836_CONTROL_H
 | |
| 
 | |
| #include "hw/sysbus.h"
 | |
| #include "qemu/timer.h"
 | |
| 
 | |
| /* 4 mailboxes per core, for 16 total */
 | |
| #define BCM2836_NCORES 4
 | |
| #define BCM2836_MBPERCORE 4
 | |
| 
 | |
| #define TYPE_BCM2836_CONTROL "bcm2836-control"
 | |
| #define BCM2836_CONTROL(obj) \
 | |
|     OBJECT_CHECK(BCM2836ControlState, (obj), TYPE_BCM2836_CONTROL)
 | |
| 
 | |
| typedef struct BCM2836ControlState {
 | |
|     /*< private >*/
 | |
|     SysBusDevice busdev;
 | |
|     /*< public >*/
 | |
|     MemoryRegion iomem;
 | |
| 
 | |
|     /* mailbox state */
 | |
|     uint32_t mailboxes[BCM2836_NCORES * BCM2836_MBPERCORE];
 | |
| 
 | |
|     /* interrupt routing/control registers */
 | |
|     uint8_t route_gpu_irq, route_gpu_fiq;
 | |
|     uint32_t timercontrol[BCM2836_NCORES];
 | |
|     uint32_t mailboxcontrol[BCM2836_NCORES];
 | |
| 
 | |
|     /* interrupt status regs (derived from input pins; not visible to user) */
 | |
|     bool gpu_irq, gpu_fiq;
 | |
|     uint8_t timerirqs[BCM2836_NCORES];
 | |
| 
 | |
|     /* local timer */
 | |
|     QEMUTimer timer;
 | |
|     uint32_t local_timer_control;
 | |
|     uint8_t route_localtimer;
 | |
| 
 | |
|     /* interrupt source registers, post-routing (also input-derived; visible) */
 | |
|     uint32_t irqsrc[BCM2836_NCORES];
 | |
|     uint32_t fiqsrc[BCM2836_NCORES];
 | |
| 
 | |
|     /* outputs to CPU cores */
 | |
|     qemu_irq irq[BCM2836_NCORES];
 | |
|     qemu_irq fiq[BCM2836_NCORES];
 | |
| } BCM2836ControlState;
 | |
| 
 | |
| #endif
 |