Deleted Added
sdiff udiff text old ( 8847:ef8630054b5e ) new ( 8870:f95c4042f2d0 )
full compact
1# Copyright (c) 2009-2011 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license
9# terms below provided that you ensure that this notice is replicated

--- 34 unchanged lines hidden (view full) ---

44from m5.proxy import *
45from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice
46from Pci import PciConfigAll
47from Ethernet import NSGigE, IGbE_e1000, IGbE_igb
48from Ide import *
49from Platform import Platform
50from Terminal import Terminal
51from Uart import Uart
52
53class AmbaDevice(BasicPioDevice):
54 type = 'AmbaDevice'
55 abstract = True
56 amba_id = Param.UInt32("ID of AMBA device for kernel detection")
57
58class AmbaIntDevice(AmbaDevice):
59 type = 'AmbaIntDevice'

--- 54 unchanged lines hidden (view full) ---

114
115class CpuLocalTimer(BasicPioDevice):
116 type = 'CpuLocalTimer'
117 gic = Param.Gic(Parent.any, "Gic to use for interrupting")
118 int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
119 int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")
120 clock = Param.Clock('1GHz', "Clock speed at which the timer counts")
121
122class Pl050(AmbaIntDevice):
123 type = 'Pl050'
124 vnc = Param.VncServer(Parent.any, "Vnc server for remote frame buffer display")
125 is_mouse = Param.Bool(False, "Is this interface a mouse, if not a keyboard")
126 int_delay = '1us'
127 amba_id = 0x00141050
128
129class Pl111(AmbaDmaDevice):
130 type = 'Pl111'
131 clock = Param.Clock('24MHz', "Clock speed of the input")
132 vnc = Param.VncServer(Parent.any, "Vnc server for remote frame buffer display")
133 amba_id = 0x00141111
134
135class RealView(Platform):
136 type = 'RealView'
137 system = Param.System(Parent.any, "system")
138 pci_cfg_base = Param.Addr(0, "Base address of PCI Configuraiton Space")
139
140# Reference for memory map and interrupt number
141# RealView Platform Baseboard Explore for Cortex-A9 User Guide(ARM DUI 0440A)
142# Chapter 4: Programmer's Reference
143class RealViewPBX(RealView):
144 uart = Pl011(pio_addr=0x10009000, int_num=44)
145 realview_io = RealViewCtrl(pio_addr=0x10000000)
146 gic = Gic()
147 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)

--- 36 unchanged lines hidden (view full) ---

184 self.gic.pio = bus.master
185 self.l2x0_fake.pio = bus.master
186 self.a9scu.pio = bus.master
187 self.local_cpu_timer.pio = bus.master
188 # Bridge ranges based on excluding what is part of on-chip I/O
189 # (gic, l2x0, a9scu, local_cpu_timer)
190 bridge.ranges = [AddrRange(self.realview_io.pio_addr,
191 self.a9scu.pio_addr - 1),
192 AddrRange(self.flash_fake.pio_addr, Addr.max)]
193
194 # Attach I/O devices to specified bus object. Can't do this
195 # earlier, since the bus object itself is typically defined at the
196 # System level.
197 def attachIO(self, bus):
198 self.uart.pio = bus.master
199 self.realview_io.pio = bus.master
200 self.timer0.pio = bus.master

--- 94 unchanged lines hidden (view full) ---

295 self.sci_fake.pio = bus.master
296 self.aaci_fake.pio = bus.master
297 self.mmc_fake.pio = bus.master
298 self.rtc_fake.pio = bus.master
299 self.flash_fake.pio = bus.master
300 self.smcreg_fake.pio = bus.master
301
302class VExpress_ELT(RealView):
303 pci_cfg_base = 0xD0000000
304 elba_uart = Pl011(pio_addr=0xE0009000, int_num=42)
305 uart = Pl011(pio_addr=0xFF009000, int_num=121)
306 realview_io = RealViewCtrl(proc_id0=0x0C000222, pio_addr=0xFF000000)
307 gic = Gic(dist_addr=0xE0201000, cpu_addr=0xE0200100)
308 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0xE0200600)
309 v2m_timer0 = Sp804(int_num0=120, int_num1=120, pio_addr=0xFF011000)
310 v2m_timer1 = Sp804(int_num0=121, int_num1=121, pio_addr=0xFF012000)

--- 86 unchanged lines hidden (view full) ---

397 self.aaci_fake.pio = bus.master
398 self.elba_aaci_fake.pio = bus.master
399 self.mmc_fake.pio = bus.master
400 self.rtc_fake.pio = bus.master
401 self.spsc_fake.pio = bus.master
402 self.lan_fake.pio = bus.master
403 self.usb_fake.pio = bus.master
404