tukl-msd / gem5.bare-metal

This shows a simple ARM bare-metal software implementation for gem5
16 stars 9 forks source link

gem5.bare-metal for armv8 #3

Open kjnprince opened 7 years ago

kjnprince commented 7 years ago

Excuse me. I want to run a binary compiled with armv8 compiler in gem5 with fs bare-metal model. I find your project and want to modified for my purpose. I want to know I should change the compiler arm-none-eabi to what? And I should modified what else ? Hope your advises, thx.

myzinsky commented 7 years ago

Actually I don't get your question yet, can you please elaborate more in detail?

kjnprince commented 7 years ago

Sorry for not describing my questions clearly. I want to run an armv8 version application in gem5 bare metal mode. would you please tell the modifications I have to make on current project to implement it? which compiler do I have to use and what are the flags? Should I modify the boot.S and other files?

myzinsky commented 7 years ago

I think the important thing is that you run gem5 with this option:

--machine-type=VExpress_EMM64

in order to get the v8 architecture.

For sure, some other changes are necessary, maybe have look here:

https://github.com/freedomtan/aarch64-bare-metal-qemu

If you have a final solution, please share it with a pull request!

kjnprince commented 7 years ago

Thanks very much. I have make some modifying based your repositories. But having mistakes also. I have described in my repository README.md. Please have a look, I don't understand the compile options. Thx!

https://github.com/kjnprince/gem5.bare-metal-armv8/blob/master/README.md

ghost commented 6 years ago

I wanted to check if anyone got this work. Thanks

myzinsky commented 6 years ago

I had no time to do this so far :(

cirosantilli2 commented 6 years ago

@myzinsky @kjnprince hi, I've described a detailed setup that works on aarch64 at: https://stackoverflow.com/questions/43682311/uart-communication-in-gem5-with-arm-bare-metal/50983650#50983650

It is recommended that you use VExpress_GEM5_V1 going forward. It handles both arm and aarch64.

myzinsky commented 6 years ago

@cirosantilli2 could you create a proper example and open a pull request? I would highly appreciate!

cirosantilli2 commented 6 years ago

@myzinsky as mentioned on the Stack Overflow answer, there is a working setup on this repo You can extract it from there with --dry-run if you are interested in the Bash commands used. It is not easy to make a simple pull request that just works here as the harder part is perhaps compiling GCC from source for Newlib in aarch64.