diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-02-22 18:45:30 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2018-06-06 13:54:57 +0000 |
commit | 1fc48cc45471be63a6c7cb4eb2e3a2c13f8f9bf3 (patch) | |
tree | aa73ba7664e05fa40baf2497985cd02f63a4e524 /src/dev/arm/RealView.py | |
parent | a9b78bcee79a9228d0590091c5f6dfc265e59300 (diff) | |
download | gem5-1fc48cc45471be63a6c7cb4eb2e3a2c13f8f9bf3.tar.xz |
dev, arm: Add support for HYP & secure timers
Change-Id: I1a4849283f9bd5b1856e1378f7cefc33fc14eebd
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/10023
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'src/dev/arm/RealView.py')
-rw-r--r-- | src/dev/arm/RealView.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py index 9b91f4609..308de18af 100644 --- a/src/dev/arm/RealView.py +++ b/src/dev/arm/RealView.py @@ -418,10 +418,10 @@ class GenericTimer(ClockedObject): cxx_header = "dev/arm/generic_timer.hh" system = Param.ArmSystem(Parent.any, "system") gic = Param.BaseGic(Parent.any, "GIC to use for interrupting") - # @todo: for now only two timers per CPU is supported, which is the - # normal behaviour when security extensions are disabled. - int_phys = Param.UInt32("Physical timer interrupt number") + int_phys_s = Param.UInt32("Physical (S) timer interrupt number") + int_phys_ns = Param.UInt32("Physical (NS) timer interrupt number") int_virt = Param.UInt32("Virtual timer interrupt number") + int_hyp = Param.UInt32("Hypervisor timer interrupt number") def generateDeviceTree(self, state): node = FdtNode("timer") @@ -429,9 +429,12 @@ class GenericTimer(ClockedObject): node.appendCompatible(["arm,cortex-a15-timer", "arm,armv7-timer", "arm,armv8-timer"]) - node.append(FdtPropertyWords("interrupts", - [1, int(self.int_phys) - 16, 0xf08, - 1, int(self.int_virt) - 16, 0xf08])) + node.append(FdtPropertyWords("interrupts", [ + 1, int(self.int_phys_s) - 16, 0xf08, + 1, int(self.int_phys_ns) - 16, 0xf08, + 1, int(self.int_virt) - 16, 0xf08, + 1, int(self.int_hyp) - 16, 0xf08, + ])) clock = state.phandle(self.clk_domain.unproxy(self)) node.append(FdtPropertyWords("clocks", clock)) @@ -900,7 +903,8 @@ class VExpress_EMM(RealView): conf_base=0x30000000, conf_size='256MB', conf_device_bits=16, pci_pio_base=0) - generic_timer = GenericTimer(int_phys=29, int_virt=27) + generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30, + int_virt=27, int_hyp=26) 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') clcd = Pl111(pio_addr=0x1c1f0000, int_num=46) @@ -1118,7 +1122,8 @@ Interrupts: Gicv2mFrame(spi_base=256, spi_len=64, addr=0x2c1c0000), ] - generic_timer = GenericTimer(int_phys=29, int_virt=27) + generic_timer = GenericTimer(int_phys_s=29, int_phys_ns=30, + int_virt=27, int_hyp=26) hdlcd = HDLcd(pxl_clk=dcc.osc_pxl, pio_addr=0x2b000000, int_num=95) |