Hi, > -----Original Message----- > From: Md Rubel Ahmed via gem5-users <gem5-users@gem5.org> > Sent: 05 July 2021 22:24 > To: gem5 users mailing list <gem5-users@gem5.org> > Cc: Md Rubel Ahmed <mdrubelah...@usf.edu> > Subject: [gem5-users] How to find the address range of an ARM IO device > > Greetings, > > I was trying to get the address range of each device in the arm device tree. > > In gem5/src/dev/arm/RealView.py , I find many off-chip device like uart > below: > > uart = Pl011(pio_addr=0x1c090000, interrupt=ArmSPI(num=37)) > > > I am interested to know the memory-mapped address (address range) of > this device.
For the uart you mentioned, the base address is the pio_addr, and the range size is 0x1000 [1]. To understand in general the src/dev/ code, you could either grep for pioAddr and pioSize in C++, which is how the range is usually stored in a device object, or you could have a look at the getAddrRanges virtual method, which is how a device notifies its memory map to an interconnect Alternatively, I posted a contribution some time ago [2] which made gem5 draw the entire RealView memory map at runtime. It hasn't been merged yet > I found additional information below about the off-chip device address but > facing hard times understanding the relation (if any) between them. Any > pointer is highly appreciated. > > # Ranges based on excluding what is part of on-chip I/O (gic, > # a9scu) > _off_chip_ranges = [AddrRange(0x2F000000, size='16MiB'), > AddrRange(0x30000000, size='256MiB'), > AddrRange(0x40000000, size='512MiB'), > AddrRange(0x18000000, size='64MiB'), > AddrRange(0x1C000000, size='64MiB')] > > > > Thanks, > Md Rubel Ahmed > > > Graduate Student, Dept. of CSE > > University of South Fl​orida, Tampa, FL Kind regards Giacomo [1]: https://github.com/gem5/gem5/blob/stable/src/dev/arm/pl011.cc#L54 [2]: https://gem5-review.googlesource.com/c/public/gem5/+/41317/3 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