stdlib: Added Lupio-SYS device to LupV Board
This adds the Lupio-SYS device to the LupV Board, which finalizes
all of the devices needed to complete the LupIO device
collection within gem5.
Change-Id: I5af34d8c2735d74f4240d3077ed162dd25f2bcb2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53044
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
diff --git a/src/python/gem5/components/boards/lupv_board.py b/src/python/gem5/components/boards/lupv_board.py
index 11a9ebc..c6073a8 100644
--- a/src/python/gem5/components/boards/lupv_board.py
+++ b/src/python/gem5/components/boards/lupv_board.py
@@ -54,6 +54,7 @@
LupioRTC,
LupioTMR,
LupioTTY,
+ LupioSYS,
LupV,
AddrRange,
CowDiskImage,
@@ -148,6 +149,9 @@
# LUPIO RTC
self.lupio_rtc = LupioRTC(pio_addr=0x20004000)
+ #LUPIO SYS
+ self.lupio_sys = LupioSYS(pio_addr= 0x20003000)
+
# LUPIO TMR
self.lupio_tmr = LupioTMR(
pio_addr=0x20006000,
@@ -200,6 +204,7 @@
self._off_chip_devices = [
self.lupio_blk,
self.lupio_tty,
+ self.lupio_sys,
self.lupio_rng,
self.lupio_rtc
]
@@ -265,6 +270,7 @@
script to start the simulaiton.
After the workload is set up, this function will generate the device
tree file and output it to the output directory.
+
**Limitations**
* Only supports a Linux kernel
* Must use the provided bootloader and disk image as denoted in the
@@ -497,6 +503,29 @@
state.phandle(self.lupio_pic)))
soc_node.append(lupio_rng_node)
+ #LupioSYS Device
+ lupio_sys = self.lupio_sys
+ lupio_sys_node = lupio_sys.generateBasicPioDeviceNode(soc_state,
+ "lupio-sys", lupio_sys.pio_addr, lupio_sys.pio_size)
+ lupio_sys_node.appendCompatible(["syscon"])
+ sys_phandle = state.phandle(self.lupio_sys)
+ lupio_sys_node.append(FdtPropertyWords("phandle", [sys_phandle]))
+ soc_node.append(lupio_sys_node)
+
+ poweroff_node = FdtNode("poweroff")
+ poweroff_node.appendCompatible(["syscon-poweroff"])
+ poweroff_node.append(FdtPropertyWords("regmap", [sys_phandle]))
+ poweroff_node.append(FdtPropertyWords("offset", [0x0]))
+ poweroff_node.append(FdtPropertyWords("value", [1]))
+ soc_node.append(poweroff_node)
+
+ reboot_node = FdtNode("reboot")
+ reboot_node.appendCompatible(["syscon-reboot"])
+ reboot_node.append(FdtPropertyWords("regmap", [sys_phandle]))
+ reboot_node.append(FdtPropertyWords("offset", [0x4]))
+ reboot_node.append(FdtPropertyWords("value", [1]))
+ soc_node.append(reboot_node)
+
# LupioRTC Device
lupio_rtc = self.lupio_rtc
lupio_rtc_node = lupio_rtc.generateBasicPioDeviceNode(