Map L2CFG region to tlb - #85
Draft
zbelinsk wants to merge 5 commits into
Draft
Conversation
zbelinsk
commented
Jul 27, 2026
Contributor
- Add pinned TLB entry for L2 config
- Refactor getxreg/setxreg to use permanent VA instead of tmpmap
- Add SIZE_*_MASK macros for page offset extraction
- Add pinned TLB entry for L2 config - Refactor getxreg/setxreg to use permanent VA instead of tmpmap - Add SIZE_*_MASK macros for page offset extraction Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
zbelinsk
marked this pull request as draft
July 27, 2026 15:06
Bryan Bayerdorffer (bryanb-h2)
requested changes
Jul 27, 2026
Bryan Bayerdorffer (bryanb-h2)
left a comment
Contributor
There was a problem hiding this comment.
Good overall. Should be ok to merge after requested changes.
Comment on lines
+440
to
+444
| FROM = cfgbase | ||
| FROM = asl(FROM, #(CFG_TABLE_SHIFT - PHYSREAD_HI_SHIFT)) | ||
| TO = #CFG_TABLE_L2REGS | ||
| TO = memw_phys(TO, FROM) | ||
| TO = asl(TO, #CFG_TABLE_SHIFT) |
Contributor
There was a problem hiding this comment.
Instead of using FROM and TO here, how about defining CFG_* back to their regs:
#undef SYSCFG
#undef SIG_COUNT
#define CFG_IDX r8
#define CFG_HI r9
and then s/FROM/CFG_HI/g; s/TO/CFG_IDX/g
Contributor
Author
There was a problem hiding this comment.
Right. Don't know why haven't done that at first.
Done.
| /* Hardware threads this build supports; never start or account beyond it. */ | ||
| #define MAX_HTHREADS_MASK ((1U << MAX_HTHREADS) - 1) | ||
|
|
||
| #define L2CFG_BASE_VA 0xffb00000 // leaves at most 3M for tmpmap at 0xff800000 |
Contributor
There was a problem hiding this comment.
Can we put this at 0xffd00000? I think we should leave room to be able to tmpmap a 4M page.
Move L2CFG_BASE_VA to 0xffd00000 and ANGEL_VA to 0xffe00000. Clarify boot.ref.S register names (FROM→CFG_HI, TO→L2_CFG_BASE). Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
Bryan Bayerdorffer (bryanb-h2)
approved these changes
Jul 28, 2026
Bryan Bayerdorffer (bryanb-h2)
left a comment
Contributor
There was a problem hiding this comment.
✔️ after minor fix
| #define DEVICE_PAGE_SIZE SIZE_1M | ||
|
|
||
| #define Q6_SS_BASE_VA 0xffc00000 // leaves at most 4M for tmpmap at 0xff800000 | ||
| #define Q6_SS_BASE_VA 0xffc00000 // leaves at most 3M for tmpmap at 0xff800000 |
Signed-off-by: zbelinsk <zbelinsk@qti.qualcomm.com>
Contributor
Author
Do we want to merge now, or wait to simulate fast l2vic support? |
Contributor
|
Ok to merge. |
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.