refactor(aarch64): Use aarch64-cpu for register access and some memory barriers#598
Open
Gelbpunkt wants to merge 1 commit intohermit-os:mainfrom
Open
refactor(aarch64): Use aarch64-cpu for register access and some memory barriers#598Gelbpunkt wants to merge 1 commit intohermit-os:mainfrom
Gelbpunkt wants to merge 1 commit intohermit-os:mainfrom
Conversation
Member
Author
|
Regarding the missing 56-bit physical address range, I'll open a PR upstream to add it. |
a34ea3f to
75bb927
Compare
995e1da to
f507c5a
Compare
mkroening
requested changes
Apr 23, 2026
f507c5a to
72fd55b
Compare
…y barriers Definitions for DAIFSet were added recently, but are not yet in a release, so the inline assembly that accesses it directly is marked with a FIXME comment. There are three differences I noticed while going through this: - In the TCR setup, the `bfi` instruction was redundant since it was inserting the same 3 bits that were already shifted to the same position there earlier - In TCR_EL1, 0 << 30 was being used to configure 4KiB granule size, which is incorrect. This is not even a valid value for TG1 (bits 30-31). 0x10 is the correct value for 4KiB (the 0x01 for 16KiB was correct but unused) - After enabling the MMU, the code performed a branch to flush the pipeline, which we can do more cleanly by inserting an instruction synchronization barrier
72fd55b to
bd7c6f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Definitions for DAIFSet were added recently, but are not yet in a release, so the inline assembly that accesses it directly is marked with a FIXME comment.
There are three differences I noticed while going through this:
bfiinstruction was redundant since it was inserting the same 3 bits that were already shifted to the same position there earlier