summaryrefslogtreecommitdiff
path: root/src/dev/arm/RealView.py
diff options
context:
space:
mode:
authorAndreas Sandberg <Andreas.Sandberg@ARM.com>2012-10-25 14:05:24 +0100
committerAndreas Sandberg <Andreas.Sandberg@ARM.com>2012-10-25 14:05:24 +0100
commit81be8b9d157a038c1d8f3ebf7e2ec8eba0eac935 (patch)
treea10132c3d1938bab3cd79626aead978ca1760d20 /src/dev/arm/RealView.py
parentb904bd5437ead0dfc2c4c0977f3d29d63299c601 (diff)
downloadgem5-81be8b9d157a038c1d8f3ebf7e2ec8eba0eac935.tar.xz
arm: Create a GIC base class and make the PL390 derive from it
This patch moves the GIC interface to a separate base class and makes all interrupt devices use that base class instead of a pointer to the PL390 implementation. This allows us to have multiple GIC implementations. Future implementations will allow in-kernel GIC implementations when using hardware virtualization. --HG-- rename : src/dev/arm/gic.cc => src/dev/arm/gic_pl390.cc rename : src/dev/arm/gic.hh => src/dev/arm/gic_pl390.hh
Diffstat (limited to 'src/dev/arm/RealView.py')
-rw-r--r--src/dev/arm/RealView.py28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index f2fc9c0af..f01572e40 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -50,6 +50,7 @@ from Platform import Platform
from Terminal import Terminal
from Uart import Uart
from SimpleMemory import SimpleMemory
+from Gic import *
class AmbaDevice(BasicPioDevice):
type = 'AmbaDevice'
@@ -61,7 +62,7 @@ class AmbaIntDevice(AmbaDevice):
type = 'AmbaIntDevice'
abstract = True
cxx_header = "dev/arm/amba_device.hh"
- gic = Param.Gic(Parent.any, "Gic to use for interrupting")
+ gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
int_num = Param.UInt32("Interrupt number that connects to GIC")
int_delay = Param.Latency("100ns",
"Time between action and interrupt generation by device")
@@ -72,7 +73,7 @@ class AmbaDmaDevice(DmaDevice):
cxx_header = "dev/arm/amba_device.hh"
pio_addr = Param.Addr("Address for AMBA slave interface")
pio_latency = Param.Latency("10ns", "Time between action and write/read result by AMBA DMA Device")
- gic = Param.Gic(Parent.any, "Gic to use for interrupting")
+ gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
int_num = Param.UInt32("Interrupt number that connects to GIC")
amba_id = Param.UInt32("ID of AMBA device for kernel detection")
@@ -87,17 +88,6 @@ class RealViewCtrl(BasicPioDevice):
proc_id1 = Param.UInt32(0x0C000222, "Processor ID, SYS_PROCID1")
idreg = Param.UInt32(0x00000000, "ID Register, SYS_ID")
-class Gic(PioDevice):
- type = 'Gic'
- cxx_header = "dev/arm/gic.hh"
- platform = Param.Platform(Parent.any, "Platform this device is part of.")
- dist_addr = Param.Addr(0x1f001000, "Address for distributor")
- cpu_addr = Param.Addr(0x1f000100, "Address for cpu")
- dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor")
- cpu_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to cpu interface")
- int_latency = Param.Latency('10ns', "Delay for interrupt to get to CPU")
- it_lines = Param.UInt32(128, "Number of interrupt lines supported (max = 1020)")
-
class AmbaFake(AmbaDevice):
type = 'AmbaFake'
cxx_header = "dev/arm/amba_fake.hh"
@@ -107,7 +97,7 @@ class AmbaFake(AmbaDevice):
class Pl011(Uart):
type = 'Pl011'
cxx_header = "dev/arm/pl011.hh"
- gic = Param.Gic(Parent.any, "Gic to use for interrupting")
+ gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
int_num = Param.UInt32("Interrupt number that connects to GIC")
end_on_eot = Param.Bool(False, "End the simulation when a EOT is received on the UART")
int_delay = Param.Latency("100ns", "Time between action and interrupt generation by UART")
@@ -115,7 +105,7 @@ class Pl011(Uart):
class Sp804(AmbaDevice):
type = 'Sp804'
cxx_header = "dev/arm/timer_sp804.hh"
- gic = Param.Gic(Parent.any, "Gic to use for interrupting")
+ gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
int_num0 = Param.UInt32("Interrupt number that connects to GIC")
clock0 = Param.Clock('1MHz', "Clock speed of the input")
int_num1 = Param.UInt32("Interrupt number that connects to GIC")
@@ -125,7 +115,7 @@ class Sp804(AmbaDevice):
class CpuLocalTimer(BasicPioDevice):
type = 'CpuLocalTimer'
cxx_header = "dev/arm/timer_cpulocal.hh"
- gic = Param.Gic(Parent.any, "Gic to use for interrupting")
+ gic = Param.BaseGic(Parent.any, "Gic to use for interrupting")
int_num_timer = Param.UInt32("Interrrupt number used per-cpu to GIC")
int_num_watchdog = Param.UInt32("Interrupt number for per-cpu watchdog to GIC")
# Override the default clock
@@ -174,7 +164,7 @@ class RealView(Platform):
class RealViewPBX(RealView):
uart = Pl011(pio_addr=0x10009000, int_num=44)
realview_io = RealViewCtrl(pio_addr=0x10000000)
- gic = Gic()
+ gic = Pl390()
timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x1f000600)
@@ -262,7 +252,7 @@ class RealViewPBX(RealView):
class RealViewEB(RealView):
uart = Pl011(pio_addr=0x10009000, int_num=44)
realview_io = RealViewCtrl(pio_addr=0x10000000)
- gic = Gic(dist_addr=0x10041000, cpu_addr=0x10040000)
+ gic = Pl390(dist_addr=0x10041000, cpu_addr=0x10040000)
timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000)
timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000)
clcd = Pl111(pio_addr=0x10020000, int_num=23)
@@ -338,7 +328,7 @@ class VExpress_EMM(RealView):
pci_cfg_base = 0x30000000
uart = Pl011(pio_addr=0x1c090000, int_num=37)
realview_io = RealViewCtrl(proc_id0=0x14000000, proc_id1=0x14000000, pio_addr=0x1C010000)
- gic = Gic(dist_addr=0x2C001000, cpu_addr=0x2C002000)
+ gic = Pl390(dist_addr=0x2C001000, cpu_addr=0x2C002000)
local_cpu_timer = CpuLocalTimer(int_num_timer=29, int_num_watchdog=30, pio_addr=0x2C080000)
timer0 = Sp804(int_num0=34, int_num1=34, pio_addr=0x1C110000, clock0='1MHz', clock1='1MHz')
timer1 = Sp804(int_num0=35, int_num1=35, pio_addr=0x1C120000, clock0='1MHz', clock1='1MHz')