-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ELF file not able to run in gem5 SE mode #4
Comments
I assume the ELFie by itself otherwise runs fine, does it? (Test the 'perf' version natively so it exits gracefully.) |
Yes. I am using "pinball2elf.sim.sh" to convert pinball to ELFie. The ELFie runs perfectly on bare-metal machine. However, it's very difficult to make it work with GEM5. I am very interested to run these ELFies with GEM5 SE mode. Could you please provide simple demo or hints, (like how to make hello.sim.elfie runable in gem5)? |
I have talked to my NUS colleagues/co-authors of the CGO2021 ELFie paper. They had to make changes to GEM5 to get ELFies to work with GEM5. We are trying to figure out the best way to get those changes to you. Thank you for your patience. |
Thanks for your reply. Can't wait to apply those changes to GEM5. |
I have obtained a patch from my NUS collaborators. Please email me (first.last@intel.com) so I can send it to you to try out. |
Thanks for your help. I have tried with gem5_v21 path. And the hello world elfie in this repository. However, the error still existed. Based on the error message, I believe there is something wrong with entry address of generated elfie. **** REAL SIMULATION ****
build/X86/sim/simulate.cc:194: info: Entering event queue @ 0. Starting simulation...
gem5.opt: build/X86/sim/fd_array.cc:321: std::shared_ptr<gem5::FDEntry> gem5::FDArray::getFDEntry(int): Assertion `0 <= tgt_fd && tgt_fd < _fdArray.size()' failed. |
One think you need to note that ELFies are not like a typical compiler generated ELF binaries. Namely, they may be missing certain pieces that GEM5's ELF parser may be relying on. While I do not believe we encountered the exact error you are seeing, the general suggestion is to modify GEM5's ELF reader/consumer to work around the issues. |
I came across the same bug. Have you solved this problem? Thanks for your time. |
Hi Yicheng, I found this bug might is due to operating system call "read()". Maybe we need to use the tool "pinball_state" in ./pinball2elf/pintools/ to generate FD files, as mentioned in the "ELFie Execution Challenges" of the paper. |
Hi all, We (@BobbyRBruce and I) would like to help out to get ELFies working in gem5. For those that are running into the FDEntry issue, could you provide us with the ELFie that's causing the issue and/or describe in detail how you generated it? By the way, I have found two possible other issues that need to be "fixed" during my testing:
Edit: ignoring
My guess is that the error you're seeing in gem5 is that there was a file open by the application when you created the ELFie. So, we need to let gem5 know about that file. But, I'd like to verify this hypothesis before guessing as to how to solve it :). Let me know how we in the gem5 community can help! PS: I've been talking to Trevor about this as well. |
Hi Jason, Many thanks for your help. Yes, I have come across those 2 issues about mapping and ignore. And I solved them by the same method. I generate fat pinball for 505.mcf in spec2017 and use example/ST to generate base/perf/sim.elfie. Enclosed is the compressed file. This is the link to the mcf file. https://drive.google.com/drive/folders/1Ihi0qZSXDWcz7HGDNPgruX03Y1-TFHgu. I copied these file to the example/ST folder and modified testST.sh, replacing log with mcf, and just generate *.elf by testST.sh. By the way, can gem5 work with the example/ST/log_0.perf.elfie or log_0.basic.elfie file? I tried with: Many thanks for your time. |
Have you solved the PDEntry problem? Thanks for your time. |
Added examples/ST/pinball.SSE4.2. This pinball is targetted for an older x86 mico-architecture. It does not use any AVX register/instructions. This may be a good test for GEM5. |
Added this to README.md under "Useful Tips" |
At first, I am surprised about this work. I can convert sliced pinball to ELF file which can reduce the simulation times also get rid of complex environment setup og gem5 simulation.
However, I have followed the instructions. I still cannot run the ELF file with gem5.
The text was updated successfully, but these errors were encountered: