[qcom-next] WORKAROUND: Use kernel device tree fixup for reserved memory regions#66
Open
balajiselvanathan wants to merge 1 commit into
Open
Conversation
b49020
reviewed
May 22, 2026
| if (fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,talos-evk") != 0 && | ||
| fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,qcs615") != 0 && | ||
| fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,qcs6490-rb3gen2") != 0 && | ||
| fdt_node_check_compatible(gd->fdt_blob, 0, "qcom,qcm6490") != 0) { |
Member
There was a problem hiding this comment.
Rather use APIs: of_* here, see usage above in this file. Ditto for all other places below.
b49020
reviewed
May 22, 2026
| @@ -283,5 +283,116 @@ EVENT_SPY_FULL(EVT_OF_LIVE_BUILT, qcom_of_fixup_nodes); | |||
|
|
|||
| int ft_board_setup(void __maybe_unused *blob, struct bd_info __maybe_unused *bd) | |||
Member
There was a problem hiding this comment.
You can drop __maybe_unused for the blob here.
b49020
reviewed
May 22, 2026
| if (uboot_parent < 0) | ||
| return 0; | ||
|
|
||
| /* Find or create kernel's reserved-memory node */ |
Member
There was a problem hiding this comment.
I don't think there is a case of reserved-memory nodes not being present in kernel DT already. So we should just skip the create part here.
The idea is to keep these workaround patches minimal such that they are easy to carry forward.
The current approach of updating the EFI memory map does not work for FIT-based kernel images. Replace it with kernel device tree fixup in ft_board_setup() to handle reserved memory regions. Reserved memory nodes from U-Boot device tree are now copied to the kernel device tree during boot, ensuring proper memory protection. Regions already present in the kernel device tree are skipped to avoid duplication. This fixup applies only to Talos and Kodiak platforms. Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
1ed8754 to
6a1defe
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.
The current approach of updating the EFI memory map does not work for FIT-based kernel images. Replace it with kernel device tree fixup in ft_board_setup() to handle reserved memory regions.
Reserved memory nodes from U-Boot device tree are now copied to the kernel device tree during boot, ensuring proper memory protection. Regions already present in the kernel device tree are skipped to avoid duplication.
This fixup applies only to Talos and Kodiak platforms.