RealView.py (12896:bac7d22c1660) | RealView.py (12975:f521b0fcc17c) |
---|---|
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 gic = Param.BaseGic(Parent.any, "Gic to use for interrupting") 414 int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC") 415 int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC") 416 417class GenericTimer(ClockedObject): 418 type = 'GenericTimer' 419 cxx_header = "dev/arm/generic_timer.hh" 420 system = Param.ArmSystem(Parent.any, "system") | 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 gic = Param.BaseGic(Parent.any, "Gic to use for interrupting") 414 int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC") 415 int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC") 416 417class GenericTimer(ClockedObject): 418 type = 'GenericTimer' 419 cxx_header = "dev/arm/generic_timer.hh" 420 system = Param.ArmSystem(Parent.any, "system") |
421 gic = Param.BaseGic(Parent.any, "GIC to use for interrupting") 422 int_phys_s = Param.UInt32("Physical (S) timer interrupt number") 423 int_phys_ns = Param.UInt32("Physical (NS) timer interrupt number") 424 int_virt = Param.UInt32("Virtual timer interrupt number") 425 int_hyp = Param.UInt32("Hypervisor timer interrupt number") | 421 int_phys_s = Param.ArmPPI("Physical (S) timer interrupt") 422 int_phys_ns = Param.ArmPPI("Physical (NS) timer interrupt") 423 int_virt = Param.ArmPPI("Virtual timer interrupt") 424 int_hyp = Param.ArmPPI("Hypervisor timer interrupt") |
426 427 def generateDeviceTree(self, state): 428 node = FdtNode("timer") 429 430 node.appendCompatible(["arm,cortex-a15-timer", 431 "arm,armv7-timer", 432 "arm,armv8-timer"]) 433 node.append(FdtPropertyWords("interrupts", [ | 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", [ |
434 1, int(self.int_phys_s) - 16, 0xf08, 435 1, int(self.int_phys_ns) - 16, 0xf08, 436 1, int(self.int_virt) - 16, 0xf08, 437 1, int(self.int_hyp) - 16, 0xf08, | 433 1, int(self.int_phys_s.num) - 16, 0xf08, 434 1, int(self.int_phys_ns.num) - 16, 0xf08, 435 1, int(self.int_virt.num) - 16, 0xf08, 436 1, int(self.int_hyp.num) - 16, 0xf08, |
438 ])) 439 clock = state.phandle(self.clk_domain.unproxy(self)) 440 node.append(FdtPropertyWords("clocks", clock)) 441 442 yield node 443 444class GenericTimerMem(PioDevice): 445 type = 'GenericTimerMem' 446 cxx_header = "dev/arm/generic_timer.hh" | 437 ])) 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" |
447 gic = Param.BaseGic(Parent.any, "GIC to use for interrupting") | |
448 449 base = Param.Addr(0, "Base address") 450 | 446 447 base = Param.Addr(0, "Base address") 448 |
451 int_phys = Param.UInt32("Interrupt number") 452 int_virt = Param.UInt32("Interrupt number") | 449 int_phys = Param.ArmSPI("Physical Interrupt") 450 int_virt = Param.ArmSPI("Virtual Interrupt") |
453 454class PL031(AmbaIntDevice): 455 type = 'PL031' 456 cxx_header = "dev/arm/rtc_pl031.hh" 457 time = Param.Time('01/01/2009', "System time to use ('Now' for actual time)") 458 amba_id = 0x00341031 459 460 def generateDeviceTree(self, state): --- 436 unchanged lines hidden (view full) --- 897 return devices 898 899 ### Off-chip devices ### 900 uart = Pl011(pio_addr=0x1c090000, int_num=37) 901 pci_host = GenericPciHost( 902 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16, 903 pci_pio_base=0) 904 | 451 452class PL031(AmbaIntDevice): 453 type = 'PL031' 454 cxx_header = "dev/arm/rtc_pl031.hh" 455 time = Param.Time('01/01/2009', "System time to use ('Now' for actual time)") 456 amba_id = 0x00341031 457 458 def generateDeviceTree(self, state): --- 436 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 |
905 generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30, 906 int_virt=27, int_hyp=26) | 903 generic_timer = GenericTimer(int_phys_s=ArmPPI(num=29), 904 int_phys_ns=ArmPPI(num=30), 905 int_virt=ArmPPI(num=27), 906 int_hyp=ArmPPI(num=26)) 907 |
907 timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz') 908 timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz') 909 clcd = Pl111(pio_addr=0x1c1f0000, int_num=46) 910 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard()) 911 kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit()) 912 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2, 913 io_shift = 2, ctrl_offset = 2, Command = 0x1, 914 BAR0 = 0x1C1A0000, BAR0Size = '256B', --- 205 unchanged lines hidden (view full) --- 1120 gic = kvm_gicv2_class(dist_addr=0x2c001000, cpu_addr=0x2c002000, 1121 it_lines=512) 1122 vgic = VGic(vcpu_addr=0x2c006000, hv_addr=0x2c004000, ppint=25) 1123 gicv2m = Gicv2m() 1124 gicv2m.frames = [ 1125 Gicv2mFrame(spi_base=256, spi_len=64, addr=0x2c1c0000), 1126 ] 1127 | 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', --- 205 unchanged lines hidden (view full) --- 1121 gic = kvm_gicv2_class(dist_addr=0x2c001000, cpu_addr=0x2c002000, 1122 it_lines=512) 1123 vgic = VGic(vcpu_addr=0x2c006000, hv_addr=0x2c004000, ppint=25) 1124 gicv2m = Gicv2m() 1125 gicv2m.frames = [ 1126 Gicv2mFrame(spi_base=256, spi_len=64, addr=0x2c1c0000), 1127 ] 1128 |
1128 generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30, 1129 int_virt=27, int_hyp=26) | 1129 generic_timer = GenericTimer(int_phys_s=ArmPPI(num=29), 1130 int_phys_ns=ArmPPI(num=30), 1131 int_virt=ArmPPI(num=27), 1132 int_hyp=ArmPPI(num=26)) |
1130 1131 def _on_chip_devices(self): 1132 return [ 1133 self.gic, self.vgic, self.gicv2m, 1134 self.generic_timer, 1135 ] 1136 1137 ### Off-chip devices ### --- 81 unchanged lines hidden --- | 1133 1134 def _on_chip_devices(self): 1135 return [ 1136 self.gic, self.vgic, self.gicv2m, 1137 self.generic_timer, 1138 ] 1139 1140 ### Off-chip devices ### --- 81 unchanged lines hidden --- |