Hello ARM community,
After getting the calendar_Armv8-A_AC6 example to work, I have been now playing around with it to test the ARM MTE technology.
I have this very simple source code that I modified from the original calendar example to test MTE:
int main(void) { int date_test, i, j, pos; int dflag, mflag; printf("\n\nThis program will read the date in the form yyyy mm dd\n"); printf("then display the dates for the following calendar month."); printf("\n\nPlease type the date (yyyy mm dd) -> "); scanf("%d", &date_test); }
The following code generates the following assembly code on ARM-DS5 after running on Cortex-A65x2 Base FVP (it was mentioned here: https://community.arm.com/support-forums/f/armds-forum/44507/arm-8-5-a-bti-and-mte-benchmarking/166893#166893 that this processor supports ARM MTE):
As you can see, there exist IRG/STG instructions (these were added by using the following compilation command: $(CC) -c --target=aarch64-arm-none-eabi -march=armv8.5-a+memtag -fsanitize=memtag in the provided Makefile.
So long story short, this program cannot be successfully executed.
To figure out, I stepped in individual instructions using the ARM DS and I found out that when I step through IRG instruction using the ARM-DS
it leads to this screen:
From this, I thought it seemed like apparently Cortex A65 FVP model doesn't support MTE instructions?
Therefore, I went to https://developer.arm.com/tools-and-software/simulation-models/fixed-virtual-platforms/arm-ecosystem-models link and downloaded the Armv-A Base RevC AEM FVP model which seemed to be the latest model.
However, upon using this FVP model to run the above code, it still leads to the same problem as before where it just simply hangs:
You can see that I'm using FVP_Base_RevC-2xAEMvA to run the testing program.
Could anyone please give me any insights regarding how I should basically execute MTE-enforced applications using ARM-DS?
I would really prefer not to use QEMU but use ARM FVP instead.
Thank you for any suggestions,
Kind regards,
Jay
Dear Ronan Synnott, thank you very much for your help!
For those who are facing a similar problem with me, you can just simply insert the command Mr. Ronan provided on top of what I used to execute FVP_Base_RevC-2xAEMvA.
I tried this with Cortex-A65 because I wish to use an ARM-DS debugger, but apparently, that doesn't work, so I'll go with this without a debugger for now and see whether I can figure something else out.
Hi Jay,
The AEM is also provided with Development Studio, or you can use the stand alone version.
To connect to the debugger, you need to also start the Iris debug server when you launch the model (this is done silently when the FVP is launched inside the debugger).
To do this, you need to add an additional option(s):
-I (necessary, starts the Iris server) --iris-port (optional. If not set, the default (7100) is used) -p (optional, prints the Iris server port number - useful to verify the port if --iris-port not used) -A (allow remote access, only necessary if the FVP is running on a different machine than the debugger)
Then in the debugger, you can connect to an already running model (usually at localhost:7100)