Repository navigation
Conversation
namiltd
force-pushed
the
patch-9
branch
2 times, most recently
from
November 14, 2026 19:56
328d11b to
06b9ede
Compare
namiltd
force-pushed
the
patch-9
branch
5 times, most recently
from
November 14, 2026 21:00
cc07dbb to
833757b
Compare
The 24KEc of the MT7620/MT7628 can save a wrong EPC (bits 31:28) for an interrupt taken at the first instruction of a JAL target when the JAL is located in the first 32 KiB of a 256 MiB segment. The return from the interrupt then goes to 0x7... instead of 0x8..., and the kernel dies with "Unable to handle kernel paging request". Instead of avoiding direct calls site by site (330, 331), keep all code out of that window: - 333: reserve 0x8000 bytes in front of _stext in head.S for SOC_MT7620 instead of 0x400, so kernel text starts at 0x80008000. The image is still loaded and entered at 0x80000000 and the padding is zeros (nops), so it works with any bootloader and compresses to almost nothing. Patch by Marco Martins. - 334: return the padding to the page allocator at late_initcall, so the RAM is only lost during boot (the first page is kept if ebase points into it). - 301-02: keep module code out of the window too. Skip such blocks in alloc_phys(), start the vmalloc fallback at VMALLOC_START + 32 KiB, WARN in module_finalize(), and make the physical PLT table optional. The window is guarded for SOC_MT7620 without NO_EXCEPT_FILL, the same condition under which head.S pads. 330 and 331 forced indirect calls on MT7620 for two call sites. They are no longer needed and are removed. Signed-off-by: Mieczyslaw Nalewaj <[email protected]>
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.
The 24KEc of the MT7620/MT7628 can save a wrong EPC (bits 31:28) for an interrupt taken at the first instruction of a JAL target when the JAL is located in the first 32 KiB of a 256 MiB segment. The return from the interrupt then goes to 0x7... instead of 0x8..., and the kernel dies with "Unable to handle kernel paging request".
Instead of avoiding direct calls site by site (330, 331), keep all code out of that window:
330 and 331 forced indirect calls on MT7620 for two call sites. They are no longer needed and are removed.