-
Notifications
You must be signed in to change notification settings - Fork 340
Added support for AARCH64. #229
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
Conversation
For AARCH64 architecture, Linux doesn't honor MAP_32_BIT parameter in mmap. So we force AARCH64 use virtual addressing (a.k.a memory banks) and bypase the sanity check in mmap. In fact, the sanity check is not needed for virtual addressing in x86_64 architecture, either.
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
|
I also added Travis CI for aarch64 architecture. See build info: https://travis-ci.org/github/rickyzhang82/macemu/builds/746506426 |
|
@asvitkine Any concerns on this PR? |
|
Direct addressing works just fine on aarch64 with #225. Any reason you're so opposed to fixing direct addressing? And PPC64 and RISC-V will still be broken as well as any future platform that comes along. |
|
Don't take me wrong. I opposed adding the magic number in your PR #225, which forces In ASLR, how can you be so sure you don't cause the conflict problem? I'd prefer to let the kernel decide. Regarding to direct addressing, your PR works by luck. RAM+ROM allocate by mmap and then frame buffer allocate by mmap again. The direct addressing expects they are in contiguous memory and within 4GiB limit, which is not always correct. The direct address mapping is a simple difference between host and guest. macemu/BasiliskII/src/uae_cpu/memory.h Lines 126 to 134 in d684527
|
|
Is there a document on using QEMU to test other platforms? I'm curious about setting that up in CI. Also, is there a way to run tests on the addressing system in an automated way? |
|
I am looking for the commands that you use to do this. Can you provide them please, or point me to where they're documented? |
Fix Microseconds() implementation for clock_gettime and other posix
For AARCH64 architecture, Linux doesn't honor
MAP_32BITparameter in mmap. Thus, we can't use direct addressing.The fix in this PR forces AARCH64 to use virtual addressing (a.k.a memory banks) and bypass the sanity check where allocated memory must be under 4GiB. In fact, the sanity check is unnecessary for virtual addressing in any architecture, either.
Because the base addresses for host RAM, host ROM, host frame buffer are separate when perform address mapping between the host and the guest. But direct addressing requires host RAM, host ROM, host frame buffer are in consecutive memory area.
I also updated the outdated script
config.guessandconfig.subfrom GNU FTP. This fixed the road block in configure in AARCH64.I think this is better fix than another PR for AARCH64. I tested the build and run BII in QEMU. It works fine.
Below is my another repo including script that I use to spin up AARCH 64 QEMU: https://github.com/rickyzhang82/arm64-ubuntu-20.04