Hi Joshua. You probably need to add the physical address range of your device to the _off_chip_ranges list [1]. This will be assigned to the membus->iobus bridge so that when the membus receives the cpu packet, it knows it must forward it to the io bridge
Let me know if this works Kind Regards Giacomo [1]: https://github.com/gem5/gem5/blob/141cc37c2d4b93959d4c249b8f7e6a8b2ef75338/src/dev/arm/RealView.py#L1081 From: Klein Joshua Alexander Harrison via gem5-users <gem5-users@gem5.org> Date: Monday, 21 March 2022 at 14:12 To: gem5-users@gem5.org <gem5-users@gem5.org> Cc: Klein Joshua Alexander Harrison <joshua.kl...@epfl.ch> Subject: [gem5-users] “fatal: Unable to find destination for [0x10020000 : 0x10020000] on system.iobus”, when adding new BasicPioDevice device. Hi all, I am trying to run an ARM full system simulation with a BasicPioDevice added onto the RealView Platform. I am interested in interfacing it via ioremap. The device is set up like so in src/dev/arm/RealView.py (with the necessary C++ header/implementation files): class CusDevice(BasicPioDevice): type = ‘CusDevice’ cxx_header = "dev/arm/cus_device.hh” pio_addr = Param.Addr(0x10020000, "Address for custom device.”) I then added it to the list of off-chip devices in RealView.py so it would be attached to the iobus, which is confirmed in the config.ini file: [system.realview.cus_device] type=CusDevice … pio_addr=268566528 pio_latency=100000 power_model= system=system pio=system.iobus.master[9] Then to access this device, I am using a kernel module that calls ioremap on the device’s address. Ideally I want to read/write from /dev/cus_device to access it, but this is where I run into the fatal error: root@aarch64-gem5:~/# echo h | /dev/cus_device fatal: Unable to find destination for [0x10020000 : 0x10020000] on system.iobus I have already confirmed that 0x10020000 is within an IO memory region (more specifically, 0x10000000-0x13ffffff are reserved for gem5-specific peripherals but only 0x10000000-0x1001ffff are actually used before adding the custom device). In case it is relevant, I am using the Linux 5.4.0 kernel with an Ubuntu 18.04 LTS image. Accessing the custom device at address 0x10020000 on the iobus is the precise goal, so given that writing to /dev/cus_device tries to write data to the correct address on the iobus, and I know cus_device.pio is attached to the iobus.master with the correct address, I am not sure why gem5 is unable to find the destination. Any ideas on how to approach this issue would be greatly appreciated. Best regards, Joshua Klein IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s