Gic.py (13665:9c7fe3811b88) Gic.py (13814:90cdf66cca54)
1# Copyright (c) 2012-2013, 2017-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

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

123 type = 'VGic'
124 cxx_header = "dev/arm/vgic.hh"
125 gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
126 platform = Param.Platform(Parent.any, "Platform this device is part of.")
127 vcpu_addr = Param.Addr(0, "Address for vcpu interfaces")
128 hv_addr = Param.Addr(0, "Address for hv control")
129 pio_delay = Param.Latency('10ns', "Delay for PIO r/w")
130 # The number of list registers is not currently configurable at runtime.
1# Copyright (c) 2012-2013, 2017-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

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

123 type = 'VGic'
124 cxx_header = "dev/arm/vgic.hh"
125 gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
126 platform = Param.Platform(Parent.any, "Platform this device is part of.")
127 vcpu_addr = Param.Addr(0, "Address for vcpu interfaces")
128 hv_addr = Param.Addr(0, "Address for hv control")
129 pio_delay = Param.Latency('10ns', "Delay for PIO r/w")
130 # The number of list registers is not currently configurable at runtime.
131 ppint = Param.UInt32("HV maintenance interrupt number")
131 maint_int = Param.UInt32("HV maintenance interrupt number")
132
133 # gicv_iidr same as gicc_idr
134 gicv_iidr = Param.UInt32(Self.gic.gicc_iidr,
135 "VM CPU Interface Identification Register")
136
137 def generateDeviceTree(self, state):
138 gic = self.gic.unproxy(self)
139

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

151 state.sizeCells(0x1000) +
152 state.addrCells(self.hv_addr) +
153 state.sizeCells(0x2000) +
154 state.addrCells(self.vcpu_addr) +
155 state.sizeCells(0x2000) )
156
157 node.append(FdtPropertyWords("reg", regs))
158 node.append(FdtPropertyWords("interrupts",
132
133 # gicv_iidr same as gicc_idr
134 gicv_iidr = Param.UInt32(Self.gic.gicc_iidr,
135 "VM CPU Interface Identification Register")
136
137 def generateDeviceTree(self, state):
138 gic = self.gic.unproxy(self)
139

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

151 state.sizeCells(0x1000) +
152 state.addrCells(self.hv_addr) +
153 state.sizeCells(0x2000) +
154 state.addrCells(self.vcpu_addr) +
155 state.sizeCells(0x2000) )
156
157 node.append(FdtPropertyWords("reg", regs))
158 node.append(FdtPropertyWords("interrupts",
159 [1, int(self.ppint)-16, 0xf04]))
159 [1, int(self.maint_int)-16, 0xf04]))
160
161 node.appendPhandle(gic)
162
163 yield node
164
165class Gicv3(BaseGic):
166 type = 'Gicv3'
167 cxx_header = "dev/arm/gic_v3.hh"
168
169 dist_addr = Param.Addr(0x2c000000, "Address for distributor")
170 dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor")
171 redist_addr = Param.Addr(0x2c010000, "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)")
160
161 node.appendPhandle(gic)
162
163 yield node
164
165class Gicv3(BaseGic):
166 type = 'Gicv3'
167 cxx_header = "dev/arm/gic_v3.hh"
168
169 dist_addr = Param.Addr(0x2c000000, "Address for distributor")
170 dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor")
171 redist_addr = Param.Addr(0x2c010000, "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)")