RealView.py (12598:b80b2d9a251b) RealView.py (12659:3b44e9f66aac)
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

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

57from SimpleMemory import SimpleMemory
58from Gic import *
59from EnergyCtrl import EnergyCtrl
60from ClockedObject import ClockedObject
61from ClockDomain import SrcClockDomain
62from SubSystem import SubSystem
63from Graphics import ImageFormat
64from ClockedObject import ClockedObject
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

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

57from SimpleMemory import SimpleMemory
58from Gic import *
59from EnergyCtrl import EnergyCtrl
60from ClockedObject import ClockedObject
61from ClockDomain import SrcClockDomain
62from SubSystem import SubSystem
63from Graphics import ImageFormat
64from ClockedObject import ClockedObject
65from PS2 import *
65
66# Platforms with KVM support should generally use in-kernel GIC
67# emulation. Use a GIC model that automatically switches between
68# gem5's GIC model and KVM's GIC model if KVM is available.
69try:
70 from KvmGic import MuxingKvmGic
71 kvm_gicv2_class = MuxingKvmGic
72except ImportError:

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

460 clock = state.phandle(self.clk_domain.unproxy(self))
461 node.append(FdtPropertyWords("clocks", clock))
462
463 yield node
464
465class Pl050(AmbaIntDevice):
466 type = 'Pl050'
467 cxx_header = "dev/arm/kmi.hh"
66
67# Platforms with KVM support should generally use in-kernel GIC
68# emulation. Use a GIC model that automatically switches between
69# gem5's GIC model and KVM's GIC model if KVM is available.
70try:
71 from KvmGic import MuxingKvmGic
72 kvm_gicv2_class = MuxingKvmGic
73except ImportError:

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

461 clock = state.phandle(self.clk_domain.unproxy(self))
462 node.append(FdtPropertyWords("clocks", clock))
463
464 yield node
465
466class Pl050(AmbaIntDevice):
467 type = 'Pl050'
468 cxx_header = "dev/arm/kmi.hh"
468 vnc = Param.VncInput(Parent.any, "Vnc server for remote frame buffer display")
469 is_mouse = Param.Bool(False, "Is this interface a mouse, if not a keyboard")
470 int_delay = '1us'
471 amba_id = 0x00141050
472
469 int_delay = '1us'
470 amba_id = 0x00141050
471
472 ps2 = Param.PS2Device("PS/2 device")
473
473 def generateDeviceTree(self, state):
474 node = self.generateBasicPioDeviceNode(state, 'kmi', self.pio_addr,
475 0x1000, [int(self.int_num)])
476
477 node.appendCompatible(["arm,pl050", "arm,primecell"])
478 clock = state.phandle(self.clk_domain.unproxy(self))
479 node.append(FdtPropertyWords("clocks", clock))
480

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

619 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16,
620 pci_pio_base=0)
621 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
622 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
623 global_timer = A9GlobalTimer(int_num=27, pio_addr=0x1f000200)
624 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30,
625 pio_addr=0x1f000600)
626 clcd = Pl111(pio_addr=0x10020000, int_num=55)
474 def generateDeviceTree(self, state):
475 node = self.generateBasicPioDeviceNode(state, 'kmi', self.pio_addr,
476 0x1000, [int(self.int_num)])
477
478 node.appendCompatible(["arm,pl050", "arm,primecell"])
479 clock = state.phandle(self.clk_domain.unproxy(self))
480 node.append(FdtPropertyWords("clocks", clock))
481

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

620 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16,
621 pci_pio_base=0)
622 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
623 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
624 global_timer = A9GlobalTimer(int_num=27, pio_addr=0x1f000200)
625 local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30,
626 pio_addr=0x1f000600)
627 clcd = Pl111(pio_addr=0x10020000, int_num=55)
627 kmi0 = Pl050(pio_addr=0x10006000, int_num=52)
628 kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True)
628 kmi0 = Pl050(pio_addr=0x10006000, int_num=52, ps2=PS2Keyboard())
629 kmi1 = Pl050(pio_addr=0x10007000, int_num=53, ps2=PS2TouchKit())
629 a9scu = A9SCU(pio_addr=0x1f000000)
630 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=7, pci_bus=2,
631 io_shift = 1, ctrl_offset = 2, Command = 0x1,
632 BAR0 = 0x18000000, BAR0Size = '16B',
633 BAR1 = 0x18000100, BAR1Size = '1B',
634 BAR0LegacyIO = True, BAR1LegacyIO = True)
635
636

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

748 uart = Pl011(pio_addr=0x10009000, int_num=44)
749 realview_io = RealViewCtrl(pio_addr=0x10000000, idreg=0x01400500)
750 mcc = VExpressMCC()
751 dcc = CoreTile2A15DCC()
752 gic = Pl390(dist_addr=0x10041000, cpu_addr=0x10040000)
753 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
754 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
755 clcd = Pl111(pio_addr=0x10020000, int_num=23)
630 a9scu = A9SCU(pio_addr=0x1f000000)
631 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=7, pci_bus=2,
632 io_shift = 1, ctrl_offset = 2, Command = 0x1,
633 BAR0 = 0x18000000, BAR0Size = '16B',
634 BAR1 = 0x18000100, BAR1Size = '1B',
635 BAR0LegacyIO = True, BAR1LegacyIO = True)
636
637

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

749 uart = Pl011(pio_addr=0x10009000, int_num=44)
750 realview_io = RealViewCtrl(pio_addr=0x10000000, idreg=0x01400500)
751 mcc = VExpressMCC()
752 dcc = CoreTile2A15DCC()
753 gic = Pl390(dist_addr=0x10041000, cpu_addr=0x10040000)
754 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
755 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
756 clcd = Pl111(pio_addr=0x10020000, int_num=23)
756 kmi0 = Pl050(pio_addr=0x10006000, int_num=20)
757 kmi1 = Pl050(pio_addr=0x10007000, int_num=21, is_mouse=True)
757 kmi0 = Pl050(pio_addr=0x10006000, int_num=20, ps2=PS2Keyboard())
758 kmi1 = Pl050(pio_addr=0x10007000, int_num=21, ps2=PS2TouchKit())
758
759 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")
760 flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x20000000-1,
761 fake_mem=True)
762 dmac_fake = AmbaFake(pio_addr=0x10030000)
763 uart1_fake = AmbaFake(pio_addr=0x1000a000)
764 uart2_fake = AmbaFake(pio_addr=0x1000b000)
765 uart3_fake = AmbaFake(pio_addr=0x1000c000)

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

899 pci_host = GenericPciHost(
900 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16,
901 pci_pio_base=0)
902
903 generic_timer = GenericTimer(int_phys=29, int_virt=27)
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)
759
760 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff, warn_access="1")
761 flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x20000000-1,
762 fake_mem=True)
763 dmac_fake = AmbaFake(pio_addr=0x10030000)
764 uart1_fake = AmbaFake(pio_addr=0x1000a000)
765 uart2_fake = AmbaFake(pio_addr=0x1000b000)
766 uart3_fake = AmbaFake(pio_addr=0x1000c000)

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

900 pci_host = GenericPciHost(
901 conf_base=0x30000000, conf_size='256MB', conf_device_bits=16,
902 pci_pio_base=0)
903
904 generic_timer = GenericTimer(int_phys=29, int_virt=27)
905 timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
906 timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')
907 clcd = Pl111(pio_addr=0x1c1f0000, int_num=46)
907 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44)
908 kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, is_mouse=True)
908 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
909 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',
912 BAR1 = 0x1C1A0100, BAR1Size = '4096B',
913 BAR0LegacyIO = True, BAR1LegacyIO = True)
914
915 vram = SimpleMemory(range = AddrRange(0x18000000, size='32MB'),
916 conf_table_reported = False)

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

1131 ]
1132
1133 ### Off-chip devices ###
1134 clock24MHz = SrcClockDomain(clock="24MHz",
1135 voltage_domain=VoltageDomain(voltage="3.3V"))
1136
1137 uart0 = Pl011(pio_addr=0x1c090000, int_num=37)
1138
910 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2,
911 io_shift = 2, ctrl_offset = 2, Command = 0x1,
912 BAR0 = 0x1C1A0000, BAR0Size = '256B',
913 BAR1 = 0x1C1A0100, BAR1Size = '4096B',
914 BAR0LegacyIO = True, BAR1LegacyIO = True)
915
916 vram = SimpleMemory(range = AddrRange(0x18000000, size='32MB'),
917 conf_table_reported = False)

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

1132 ]
1133
1134 ### Off-chip devices ###
1135 clock24MHz = SrcClockDomain(clock="24MHz",
1136 voltage_domain=VoltageDomain(voltage="3.3V"))
1137
1138 uart0 = Pl011(pio_addr=0x1c090000, int_num=37)
1139
1139 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44)
1140 kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, is_mouse=True)
1140 kmi0 = Pl050(pio_addr=0x1c060000, int_num=44, ps2=PS2Keyboard())
1141 kmi1 = Pl050(pio_addr=0x1c070000, int_num=45, ps2=PS2TouchKit())
1141
1142 rtc = PL031(pio_addr=0x1c170000, int_num=36)
1143
1144 ### gem5-specific off-chip devices ###
1145 pci_host = GenericArmPciHost(
1146 conf_base=0x30000000, conf_size='256MB', conf_device_bits=12,
1147 pci_pio_base=0x2f000000,
1148 int_policy="ARM_PCI_INT_DEV", int_base=100, int_count=4)

--- 48 unchanged lines hidden ---
1142
1143 rtc = PL031(pio_addr=0x1c170000, int_num=36)
1144
1145 ### gem5-specific off-chip devices ###
1146 pci_host = GenericArmPciHost(
1147 conf_base=0x30000000, conf_size='256MB', conf_device_bits=12,
1148 pci_pio_base=0x2f000000,
1149 int_policy="ARM_PCI_INT_DEV", int_base=100, int_count=4)

--- 48 unchanged lines hidden ---