RealView.py (12664:4e4555947641) RealView.py (12733:fd6b0c5419aa)
1# Copyright (c) 2009-2018 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

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

413 int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
414 int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")
415
416class GenericTimer(ClockedObject):
417 type = 'GenericTimer'
418 cxx_header = "dev/arm/generic_timer.hh"
419 system = Param.ArmSystem(Parent.any, "system")
420 gic = Param.BaseGic(Parent.any, "GIC to use for interrupting")
1# Copyright (c) 2009-2018 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

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

413 int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
414 int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")
415
416class GenericTimer(ClockedObject):
417 type = 'GenericTimer'
418 cxx_header = "dev/arm/generic_timer.hh"
419 system = Param.ArmSystem(Parent.any, "system")
420 gic = Param.BaseGic(Parent.any, "GIC to use for interrupting")
421 # @todo: for now only two timers per CPU is supported, which is the
422 # normal behaviour when security extensions are disabled.
423 int_phys = Param.UInt32("Physical timer interrupt number")
421 int_phys_s = Param.UInt32("Physical (S) timer interrupt number")
422 int_phys_ns = Param.UInt32("Physical (NS) timer interrupt number")
424 int_virt = Param.UInt32("Virtual timer interrupt number")
423 int_virt = Param.UInt32("Virtual timer interrupt number")
424 int_hyp = Param.UInt32("Hypervisor timer interrupt number")
425
426 def generateDeviceTree(self, state):
427 node = FdtNode("timer")
428
429 node.appendCompatible(["arm,cortex-a15-timer",
430 "arm,armv7-timer",
431 "arm,armv8-timer"])
425
426 def generateDeviceTree(self, state):
427 node = FdtNode("timer")
428
429 node.appendCompatible(["arm,cortex-a15-timer",
430 "arm,armv7-timer",
431 "arm,armv8-timer"])
432 node.append(FdtPropertyWords("interrupts",
433 [1, int(self.int_phys) - 16, 0xf08,
434 1, int(self.int_virt) - 16, 0xf08]))
432 node.append(FdtPropertyWords("interrupts", [
433 1, int(self.int_phys_s) - 16, 0xf08,
434 1, int(self.int_phys_ns) - 16, 0xf08,
435 1, int(self.int_virt) - 16, 0xf08,
436 1, int(self.int_hyp) - 16, 0xf08,
437 ]))
435 clock = state.phandle(self.clk_domain.unproxy(self))
436 node.append(FdtPropertyWords("clocks", clock))
437
438 yield node
439
440class GenericTimerMem(PioDevice):
441 type = 'GenericTimerMem'
442 cxx_header = "dev/arm/generic_timer.hh"

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

895 return devices
896
897 ### Off-chip devices ###
898 uart = Pl011(pio_addr=0x1c090000, int_num=37)
899 pci_host = GenericPciHost(
900 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16,
901 pci_pio_base=0)
902
438 clock = state.phandle(self.clk_domain.unproxy(self))
439 node.append(FdtPropertyWords("clocks", clock))
440
441 yield node
442
443class GenericTimerMem(PioDevice):
444 type = 'GenericTimerMem'
445 cxx_header = "dev/arm/generic_timer.hh"

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

898 return devices
899
900 ### Off-chip devices ###
901 uart = Pl011(pio_addr=0x1c090000, int_num=37)
902 pci_host = GenericPciHost(
903 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16,
904 pci_pio_base=0)
905
903 generic_timer = GenericTimer(int_phys=29, int_virt=27)
906 generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30,
907 int_virt=27, int_hyp=26)
904 timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
905 timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')
906 clcd = Pl111(pio_addr=0x1c1f0000, int_num=46)
907 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
908 kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit())
909 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2,
910 io_shift = 2, ctrl_offset = 2, Command = 0x1,
911 BAR0 = 0x1C1A0000, BAR0Size = '256B',

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

1113 gic = kvm_gicv2_class(dist_addr=0x2c001000, cpu_addr=0x2c002000,
1114 it_lines=512)
1115 vgic = VGic(vcpu_addr=0x2c006000, hv_addr=0x2c004000, ppint=25)
1116 gicv2m = Gicv2m()
1117 gicv2m.frames = [
1118 Gicv2mFrame(spi_base=256, spi_len=64, addr=0x2c1c0000),
1119 ]
1120
908 timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
909 timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')
910 clcd = Pl111(pio_addr=0x1c1f0000, int_num=46)
911 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
912 kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit())
913 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2,
914 io_shift = 2, ctrl_offset = 2, Command = 0x1,
915 BAR0 = 0x1C1A0000, BAR0Size = '256B',

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

1117 gic = kvm_gicv2_class(dist_addr=0x2c001000, cpu_addr=0x2c002000,
1118 it_lines=512)
1119 vgic = VGic(vcpu_addr=0x2c006000, hv_addr=0x2c004000, ppint=25)
1120 gicv2m = Gicv2m()
1121 gicv2m.frames = [
1122 Gicv2mFrame(spi_base=256, spi_len=64, addr=0x2c1c0000),
1123 ]
1124
1121 generic_timer = GenericTimer(int_phys=29, int_virt=27)
1125 generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30,
1126 int_virt=27, int_hyp=26)
1122
1123 hdlcd = HDLcd(pxl_clk=dcc.osc_pxl,
1124 pio_addr=0x2b000000, int_num=95)
1125
1126 def _on_chip_devices(self):
1127 return [
1128 self.gic, self.vgic, self.gicv2m,
1129 self.hdlcd,

--- 67 unchanged lines hidden ---
1127
1128 hdlcd = HDLcd(pxl_clk=dcc.osc_pxl,
1129 pio_addr=0x2b000000, int_num=95)
1130
1131 def _on_chip_devices(self):
1132 return [
1133 self.gic, self.vgic, self.gicv2m,
1134 self.hdlcd,

--- 67 unchanged lines hidden ---