I am looking to emulate an Apple II and would like to specify some address ranges as being memory mapped so that any access would result in perhaps an interrupt that I am then able to handle and in which I can determine the memory address being accessed and react accordingly. Is this possible, and if so, would someone point me in the right direction?
Hi Peter,
Thanks for the info! I find searching for this information in the manuals themselves so hard because I don't know the proper terminology so I don't really know what to look for. Would this be in the Armv8 manual or the manual for one of the specific chips, such as the A53? I'm looking to see how I can set this up and whether faulting at the page level is as granular as I can get.
Hi Anthony,
The table formats are in the Arm ARM. The TRM has some info about implemented granules and suchlike but most of the things you need are in the ARM.
The Arm ARM doesn't really cover usage. So it will tell you how to program a fault page but not that that will be useful for emulating a device IYKWIM.
Using this mechanism a page (min4KB) is the smallest granularity you can trap. This is fairly efficient for emulating 'modern' system as peripherals are generally placed on page boundaries - and the trend is towards even sparser physical memory maps using the expanded address range for future-proofing - but it doesn't scale down that well to older stuff.
Pete.
Search for the TrustZone example for the ARMv8, it contains a basic setup of the MMU to learn from.
Thanks for the info Pete!
Hi 42Bastian! Do you mean https://developer.arm.com/support/training/trustzone-for-armv8-a-1? That's a paid course. I'll see if there's an example that's freely available.
This one on github:
github.com/.../arm-trusted-firmware