-
Notifications
You must be signed in to change notification settings - Fork 58
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
AArch64: speed up paging and fix exception caused by atomic operation #250
Conversation
Atomic operation may cause exception when MMU is not enabled. Serial device struct is containered by atomic refcell that should be done after MMU is enabled. Signed-off-by: Jianyong Wu <[email protected]>
Firmware region is used for edk2 thus will not be used here. Merge it into MMIO region to speed up page table creation. Also enlarge memory map size to 128G then we can use large memory when boot from rust firmware. Signed-off-by: Jianyong Wu <[email protected]>
To set different page attribute for code segment, it must be align with page size which is 64kB in current implementation. Signed-off-by: Jianyong Wu <[email protected]>
Please fix your formatting. |
Creating page table takes 8K * 2 * MEM_SIZE(GB) times loop while each loop is time-consuming. It may takes a few seconds to complete page table creating. As a certain memory region has the same memory attribute, saying the whole MMIO region and the most normal memory, we can simply use 512M block to map the region instead of use 64kB page. Also, there is some optimization in page table creating algorithm. After this change, page table creating takes only dozens of ms. Signed-off-by: Jianyong Wu <[email protected]>
7522586
to
d73060a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the debug-related commit (d73060a) from your PR, as it's too specific to your testing environment. If you want to keep the debug feature, you should provide scripts and documents so that other people can use it.
OK, I will remove it currently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only have build testing on aarch64 so @retrage do you want to boot test it too?
@rbradford Yes, as it's listed on the tracking issue #198. I'd like to try vanilla Ubuntu cloud images with this PR changes. |
There are some issues for rust firmware on arm64:
Two of them:
To address above issues: