stdlib: Added LupIO-IPI to the LupV Board

This adds the LupioIPI device to our LupV Board, which
finalizes the changes needed for the LupIO devices to run
with SMP support.

Change-Id: I3e51dae6d8d589d3b38c57c33322e740c832a03d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53042
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Melissa Jost
2021-11-05 16:33:23 -07:00
committed by melissa jost
parent 9f39ea136a
commit 9d64f0fd90

View File

@@ -48,6 +48,7 @@ from m5.objects import (
Plic,
Terminal,
LupioBLK,
LupioIPI,
LupioPIC,
LupioRNG,
LupioRTC,
@@ -110,10 +111,18 @@ class LupvBoard(SimpleBoard):
# PLIC
self.pic = Plic(pio_addr=0xc000000)
# LUPIO IPI
self.lupio_ipi = LupioIPI(
pio_addr=0x20001000,
int_type=self._excep_code['INT_SOFT_SUPER'],
num_threads = self.processor.get_num_cores()
)
# LUPIO PIC
self.lupio_pic = LupioPIC(
pio_addr=0x20002000,
int_type = self._excep_code['INT_EXT_SUPER']
int_type = self._excep_code['INT_EXT_SUPER'],
num_threads = self.processor.get_num_cores()
)
#LupV Platform
@@ -142,7 +151,8 @@ class LupvBoard(SimpleBoard):
# LUPIO TMR
self.lupio_tmr = LupioTMR(
pio_addr=0x20006000,
int_type = self._excep_code['INT_TIMER_SUPER']
int_type = self._excep_code['INT_TIMER_SUPER'],
num_threads = self.processor.get_num_cores()
)
# LUPIO TTY
@@ -183,6 +193,7 @@ class LupvBoard(SimpleBoard):
self._on_chip_devices = [
self.clint,
self.pic,
self.lupio_ipi,
self.lupio_pic,
self.lupio_tmr
]
@@ -423,6 +434,22 @@ class LupvBoard(SimpleBoard):
soc_node.append(plic_node)
# LupioIPI Device
lupio_ipi = self.lupio_ipi
lupio_ipi_node = lupio_ipi.generateBasicPioDeviceNode(soc_state,
"lupio-ipi", lupio_ipi.pio_addr,
lupio_ipi.pio_size)
int_extended = list()
for i, core in enumerate(self.get_processor().get_cores()):
phandle = state.phandle(f"cpu@{i}.int_state")
int_extended.append(phandle)
int_extended.append(self._excep_code['INT_SOFT_SUPER'])
lupio_ipi_node.append(
FdtPropertyWords("interrupts-extended", int_extended))
lupio_ipi_node.append(FdtProperty("interrupt-controller"))
lupio_ipi_node.appendCompatible(["lupio,ipi"])
soc_node.append(lupio_ipi_node)
# LupioPIC Device
lupio_pic = self.lupio_pic
lupio_pic_node = lupio_pic.generateBasicPioDeviceNode(soc_state,