RealView.py (10847:1826ee736709) RealView.py (11011:2ca6c68fdd6c)
1# Copyright (c) 2009-2015 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

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

37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Ali Saidi
40# Gabe Black
41# William Wang
42
43from m5.params import *
44from m5.proxy import *
1# Copyright (c) 2009-2015 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

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

37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Ali Saidi
40# Gabe Black
41# William Wang
42
43from m5.params import *
44from m5.proxy import *
45from ClockDomain import ClockDomain
46from VoltageDomain import VoltageDomain
45from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice
46from Pci import PciConfigAll
47from Ethernet import NSGigE, IGbE_igb, IGbE_e1000
48from Ide import *
49from Platform import Platform
50from Terminal import Terminal
51from Uart import Uart
52from SimpleMemory import SimpleMemory

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

84
85class RealViewCtrl(BasicPioDevice):
86 type = 'RealViewCtrl'
87 cxx_header = "dev/arm/rv_ctrl.hh"
88 proc_id0 = Param.UInt32(0x0C000000, "Processor ID, SYS_PROCID")
89 proc_id1 = Param.UInt32(0x0C000222, "Processor ID, SYS_PROCID1")
90 idreg = Param.UInt32(0x00000000, "ID Register, SYS_ID")
91
47from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice
48from Pci import PciConfigAll
49from Ethernet import NSGigE, IGbE_igb, IGbE_e1000
50from Ide import *
51from Platform import Platform
52from Terminal import Terminal
53from Uart import Uart
54from SimpleMemory import SimpleMemory

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

86
87class RealViewCtrl(BasicPioDevice):
88 type = 'RealViewCtrl'
89 cxx_header = "dev/arm/rv_ctrl.hh"
90 proc_id0 = Param.UInt32(0x0C000000, "Processor ID, SYS_PROCID")
91 proc_id1 = Param.UInt32(0x0C000222, "Processor ID, SYS_PROCID1")
92 idreg = Param.UInt32(0x00000000, "ID Register, SYS_ID")
93
94class RealViewOsc(ClockDomain):
95 type = 'RealViewOsc'
96 cxx_header = "dev/arm/rv_ctrl.hh"
97
98 parent = Param.RealViewCtrl(Parent.any, "RealView controller")
99
100 # TODO: We currently don't have the notion of a clock source,
101 # which means we have to associate oscillators with a voltage
102 # source.
103 voltage_domain = Param.VoltageDomain(Parent.voltage_domain,
104 "Voltage domain")
105
106 # See ARM DUI 0447J (ARM Motherboard Express uATX -- V2M-P1) and
107 # the individual core/logic tile reference manuals for details
108 # about the site/position/dcc/device allocation.
109 site = Param.UInt8("Board Site")
110 position = Param.UInt8("Position in device stack")
111 dcc = Param.UInt8("Daughterboard Configuration Controller")
112 device = Param.UInt8("Device ID")
113
114 freq = Param.Clock("Default frequency")
115
116class VExpressCoreTileCtrl(RealViewCtrl):
117 class MotherBoardOsc(RealViewOsc):
118 site, position, dcc = (0, 0, 0)
119
120 class CoreTileOsc(RealViewOsc):
121 site, position, dcc = (1, 0, 0)
122
123 # See ARM DUI 0447J (ARM Motherboard Express uATX -- V2M-P1)
124 osc_mcc = MotherBoardOsc(device=0, freq="50MHz")
125 osc_clcd = MotherBoardOsc(device=1, freq="23.75MHz")
126 osc_peripheral = MotherBoardOsc(device=2, freq="24MHz")
127 osc_system_bus = MotherBoardOsc(device=4, freq="24MHz")
128
129 # See Table 2.8 in ARM DUI 0604E (CoreTile Express A15x2 TRM).
130 osc_cpu = CoreTileOsc(device=0, freq="60MHz")
131 osc_hsbm = CoreTileOsc(device=4, freq="40MHz")
132 osc_pxl = CoreTileOsc(device=5, freq="23.75MHz")
133 osc_smb = CoreTileOsc(device=6, freq="50MHz")
134 osc_sys = CoreTileOsc(device=7, freq="60MHz")
135 osc_ddr = CoreTileOsc(device=8, freq="40MHz")
136
92class VGic(PioDevice):
93 type = 'VGic'
94 cxx_header = "dev/arm/vgic.hh"
95 gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
96 platform = Param.Platform(Parent.any, "Platform this device is part of.")
97 vcpu_addr = Param.Addr(0, "Address for vcpu interfaces")
98 hv_addr = Param.Addr(0, "Address for hv control")
99 pio_delay = Param.Latency('10ns', "Delay for PIO r/w")

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

222 cur_sys.load_offset = 0
223
224
225# Reference for memory map and interrupt number
226# RealView Platform Baseboard Explore for Cortex-A9 User Guide(ARM DUI 0440A)
227# Chapter 4: Programmer's Reference
228class RealViewPBX(RealView):
229 uart = Pl011(pio_addr=0x10009000, int_num=44)
137class VGic(PioDevice):
138 type = 'VGic'
139 cxx_header = "dev/arm/vgic.hh"
140 gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
141 platform = Param.Platform(Parent.any, "Platform this device is part of.")
142 vcpu_addr = Param.Addr(0, "Address for vcpu interfaces")
143 hv_addr = Param.Addr(0, "Address for hv control")
144 pio_delay = Param.Latency('10ns', "Delay for PIO r/w")

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

267 cur_sys.load_offset = 0
268
269
270# Reference for memory map and interrupt number
271# RealView Platform Baseboard Explore for Cortex-A9 User Guide(ARM DUI 0440A)
272# Chapter 4: Programmer's Reference
273class RealViewPBX(RealView):
274 uart = Pl011(pio_addr=0x10009000, int_num=44)
230 realview_io = RealViewCtrl(pio_addr=0x10000000)
275 realview_io = VExpressCoreTileCtrl(pio_addr=0x10000000)
231 gic = Pl390()
232 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
233 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
234 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x1f000600)
235 clcd = Pl111(pio_addr=0x10020000, int_num=55)
236 kmi0 = Pl050(pio_addr=0x10006000, int_num=52)
237 kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True)
238 a9scu = A9SCU(pio_addr=0x1f000000)

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

349 self.flash_fake.clk_domain = clkdomain
350 self.energy_ctrl.clk_domain = clkdomain
351
352# Reference for memory map and interrupt number
353# RealView Emulation Baseboard User Guide (ARM DUI 0143B)
354# Chapter 4: Programmer's Reference
355class RealViewEB(RealView):
356 uart = Pl011(pio_addr=0x10009000, int_num=44)
276 gic = Pl390()
277 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
278 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
279 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x1f000600)
280 clcd = Pl111(pio_addr=0x10020000, int_num=55)
281 kmi0 = Pl050(pio_addr=0x10006000, int_num=52)
282 kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True)
283 a9scu = A9SCU(pio_addr=0x1f000000)

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

394 self.flash_fake.clk_domain = clkdomain
395 self.energy_ctrl.clk_domain = clkdomain
396
397# Reference for memory map and interrupt number
398# RealView Emulation Baseboard User Guide (ARM DUI 0143B)
399# Chapter 4: Programmer's Reference
400class RealViewEB(RealView):
401 uart = Pl011(pio_addr=0x10009000, int_num=44)
357 realview_io = RealViewCtrl(pio_addr=0x10000000, idreg=0x01400500)
402 realview_io = VExpressCoreTileCtrl(pio_addr=0x10000000, idreg=0x01400500)
358 gic = Pl390(dist_addr=0x10041000, cpu_addr=0x10040000)
359 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
360 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
361 clcd = Pl111(pio_addr=0x10020000, int_num=23)
362 kmi0 = Pl050(pio_addr=0x10006000, int_num=20)
363 kmi1 = Pl050(pio_addr=0x10007000, int_num=21, is_mouse=True)
364
365 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")

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

459 self.flash_fake.clk_domain = clkdomain
460 self.smcreg_fake.clk_domain = clkdomain
461 self.energy_ctrl.clk_domain = clkdomain
462
463class VExpress_EMM(RealView):
464 _mem_regions = [(Addr('2GB'), Addr('2GB'))]
465 pci_cfg_base = 0x30000000
466 uart = Pl011(pio_addr=0x1c090000, int_num=37)
403 gic = Pl390(dist_addr=0x10041000, cpu_addr=0x10040000)
404 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
405 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
406 clcd = Pl111(pio_addr=0x10020000, int_num=23)
407 kmi0 = Pl050(pio_addr=0x10006000, int_num=20)
408 kmi1 = Pl050(pio_addr=0x10007000, int_num=21, is_mouse=True)
409
410 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")

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

504 self.flash_fake.clk_domain = clkdomain
505 self.smcreg_fake.clk_domain = clkdomain
506 self.energy_ctrl.clk_domain = clkdomain
507
508class VExpress_EMM(RealView):
509 _mem_regions = [(Addr('2GB'), Addr('2GB'))]
510 pci_cfg_base = 0x30000000
511 uart = Pl011(pio_addr=0x1c090000, int_num=37)
467 realview_io = RealViewCtrl(proc_id0=0x14000000, proc_id1=0x14000000, \
468 idreg=0x02250000, pio_addr=0x1C010000)
512 realview_io = VExpressCoreTileCtrl(
513 proc_id0=0x14000000, proc_id1=0x14000000,
514 idreg=0x02250000, pio_addr=0x1C010000)
469 gic = Pl390(dist_addr=0x2C001000, cpu_addr=0x2C002000)
470 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x2C080000)
471 generic_timer = GenericTimer(int_phys=29, int_virt=27)
472 timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
473 timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')
474 clcd = Pl111(pio_addr=0x1c1f0000, int_num=46)
475 hdlcd = HDLcd(pio_addr=0x2b000000, int_num=117)
476 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44)

--- 160 unchanged lines hidden ---
515 gic = Pl390(dist_addr=0x2C001000, cpu_addr=0x2C002000)
516 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x2C080000)
517 generic_timer = GenericTimer(int_phys=29, int_virt=27)
518 timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
519 timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')
520 clcd = Pl111(pio_addr=0x1c1f0000, int_num=46)
521 hdlcd = HDLcd(pio_addr=0x2b000000, int_num=117)
522 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44)

--- 160 unchanged lines hidden ---