Gic.py (13880:856d3436a90d) | Gic.py (13996:8a567118e670) |
---|---|
1# Copyright (c) 2012-2013, 2017-2018 ARM Limited | 1# Copyright (c) 2012-2013, 2017-2019 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 --- 25 unchanged lines hidden (view full) --- 35# 36# Authors: Andreas Sandberg 37 38from m5.params import * 39from m5.proxy import * 40from m5.util.fdthelper import * 41from m5.SimObject import SimObject 42 | 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 --- 25 unchanged lines hidden (view full) --- 35# 36# Authors: Andreas Sandberg 37 38from m5.params import * 39from m5.proxy import * 40from m5.util.fdthelper import * 41from m5.SimObject import SimObject 42 |
43from m5.objects.Device import PioDevice | 43from m5.objects.Device import PioDevice, BasicPioDevice |
44from m5.objects.Platform import Platform 45 46class BaseGic(PioDevice): 47 type = 'BaseGic' 48 abstract = True 49 cxx_header = "dev/arm/base_gic.hh" 50 51 platform = Param.Platform(Parent.any, "Platform this device is part of.") --- 105 unchanged lines hidden (view full) --- 157 node.append(FdtPropertyWords("reg", regs)) 158 node.append(FdtPropertyWords("interrupts", 159 [1, int(self.maint_int)-16, 0xf04])) 160 161 node.appendPhandle(gic) 162 163 yield node 164 | 44from m5.objects.Platform import Platform 45 46class BaseGic(PioDevice): 47 type = 'BaseGic' 48 abstract = True 49 cxx_header = "dev/arm/base_gic.hh" 50 51 platform = Param.Platform(Parent.any, "Platform this device is part of.") --- 105 unchanged lines hidden (view full) --- 157 node.append(FdtPropertyWords("reg", regs)) 158 node.append(FdtPropertyWords("interrupts", 159 [1, int(self.maint_int)-16, 0xf04])) 160 161 node.appendPhandle(gic) 162 163 yield node 164 |
165class Gicv3Its(BasicPioDevice): 166 type = 'Gicv3Its' 167 cxx_header = "dev/arm/gic_v3_its.hh" 168 169 dma = MasterPort("DMA port") 170 pio_size = Param.Unsigned(0x20000, "Gicv3Its pio size") 171 172 # CIL [36] = 0: ITS supports 16-bit CollectionID 173 # Devbits [17:13] = 0b100011: ITS supports 23 DeviceID bits 174 # ID_bits [12:8] = 0b11111: ITS supports 31 EventID bits 175 gits_typer = Param.UInt64(0x30023F01, "GITS_TYPER RO value") 176 |
|
165class Gicv3(BaseGic): 166 type = 'Gicv3' 167 cxx_header = "dev/arm/gic_v3.hh" 168 | 177class Gicv3(BaseGic): 178 type = 'Gicv3' 179 cxx_header = "dev/arm/gic_v3.hh" 180 |
181 its = Param.Gicv3Its(Gicv3Its(), "GICv3 Interrupt Translation Service") 182 |
|
169 dist_addr = Param.Addr("Address for distributor") 170 dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor") 171 redist_addr = Param.Addr("Address for redistributors") 172 redist_pio_delay = Param.Latency('10ns', 173 "Delay for PIO r/w to redistributors") 174 it_lines = Param.UInt32(1020, 175 "Number of interrupt lines supported (max = 1020)") 176 177 maint_int = Param.ArmInterruptPin( 178 "HV maintenance interrupt." 179 "ARM strongly recommends that maintenance interrupts " 180 "are configured to use INTID 25 (PPI Interrupt).") 181 182 cpu_max = Param.Unsigned(256, 183 "Maximum number of PE. This is affecting the maximum number of " 184 "redistributors") 185 186 gicv4 = Param.Bool(True, "GICv4 extension available") | 183 dist_addr = Param.Addr("Address for distributor") 184 dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor") 185 redist_addr = Param.Addr("Address for redistributors") 186 redist_pio_delay = Param.Latency('10ns', 187 "Delay for PIO r/w to redistributors") 188 it_lines = Param.UInt32(1020, 189 "Number of interrupt lines supported (max = 1020)") 190 191 maint_int = Param.ArmInterruptPin( 192 "HV maintenance interrupt." 193 "ARM strongly recommends that maintenance interrupts " 194 "are configured to use INTID 25 (PPI Interrupt).") 195 196 cpu_max = Param.Unsigned(256, 197 "Maximum number of PE. This is affecting the maximum number of " 198 "redistributors") 199 200 gicv4 = Param.Bool(True, "GICv4 extension available") |