Giacomo Travaglini has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/34380 )
Change subject: dev-arm: Instantiate SCMI in VExpress_GEM5 platforms
......................................................................
dev-arm: Instantiate SCMI in VExpress_GEM5 platforms
JIRA: https://gem5.atlassian.net/browse/GEM5-768
Change-Id: If5c03aed43f6a521c657e0c9b1dfa95fa4c72413
Signed-off-by: Giacomo Travaglini <[email protected]>
---
M src/dev/arm/RealView.py
1 file changed, 39 insertions(+), 0 deletions(-)
diff --git a/src/dev/arm/RealView.py b/src/dev/arm/RealView.py
index 4750be8..aea21e1 100644
--- a/src/dev/arm/RealView.py
+++ b/src/dev/arm/RealView.py
@@ -53,6 +53,7 @@
from m5.objects.SimpleMemory import SimpleMemory
from m5.objects.GenericTimer import *
from m5.objects.Gic import *
+from m5.objects.MHU import MHU, Scp2ApDoorbell, Ap2ScpDoorbell
from m5.objects.EnergyCtrl import EnergyCtrl
from m5.objects.ClockedObject import ClockedObject
from m5.objects.SubSystem import SubSystem
@@ -61,6 +62,7 @@
from m5.objects.PS2 import *
from m5.objects.VirtIOMMIO import MmioVirtIO
from m5.objects.Display import Display, Display1080p
+from m5.objects.Scmi import *
from m5.objects.SMMUv3 import SMMUv3
# Platforms with KVM support should generally use in-kernel GIC
@@ -606,6 +608,23 @@
type = 'FVPBasePwrCtrl'
cxx_header = 'dev/arm/fvp_base_pwr_ctrl.hh'
+class GenericMHU(MHU):
+ lowp_scp2ap = Scp2ApDoorbell(
+ set_address=0x2b1f0008, clear_address=0x2b1f0010,
+ interrupt=ArmSPI(num=68))
+ highp_scp2ap = Scp2ApDoorbell(
+ set_address=0x2b1f0028, clear_address=0x2b1f0030,
+ interrupt=ArmSPI(num=67))
+ sec_scp2ap = Scp2ApDoorbell(
+ set_address=0x2b1f0208, clear_address=0x2b1f0210,
+ interrupt=ArmSPI(num=69))
+ lowp_ap2scp = Ap2ScpDoorbell(
+ set_address=0x2b1f0108, clear_address=0x2b1f0110)
+ highp_ap2scp = Ap2ScpDoorbell(
+ set_address=0x2b1f0128, clear_address=0x2b1f0130)
+ sec_ap2scp = Ap2ScpDoorbell(
+ set_address=0x2b1f0308, clear_address=0x2b1f0310)
+
class RealView(Platform):
type = 'RealView'
cxx_header = "dev/arm/realview.hh"
@@ -937,6 +956,7 @@
0x2a830000-0x2a830fff: System Timer (frame 1)
0x2b000000-0x2b00ffff: HDLCD
+ 0x2b1f0000-0x2b1fffff: MHU (gem5-specific)
0x2b060000-0x2b060fff: System Watchdog (SP805)
@@ -1186,6 +1206,25 @@
# system.
cur_sys.m5ops_base = 0x10010000
+ def attachScmi(self, bus):
+ # Generate and attach the mailbox
+ self.mailbox = GenericMHU(pio_addr=0x2b1f0000)
+ self._attach_device(self.mailbox, bus)
+
+ # Generate and attach the SCMI platform
+ _scmi_comm = ScmiCommunication(
+ agent_channel = ScmiAgentChannel(
+ shmem=self.non_trusted_sram,
+ shmem_range=AddrRange(0x2e000000, size=0x200),
+ doorbell=self.mailbox.highp_ap2scp),
+ platform_channel = ScmiPlatformChannel(
+ shmem=self.non_trusted_sram,
+ shmem_range=AddrRange(0x2e000000, size=0x200),
+ doorbell=self.mailbox.highp_scp2ap))
+
+ self.scmi = ScmiPlatform(comms=[ _scmi_comm ])
+ self._attach_device(self.scmi, bus)
+
def generateDeviceTree(self, state):
# Generate using standard RealView function
dt = list(super(VExpress_GEM5_Base,
self).generateDeviceTree(state))
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/34380
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: If5c03aed43f6a521c657e0c9b1dfa95fa4c72413
Gerrit-Change-Number: 34380
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s