mturney mturney has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47261 )
Change subject: sc7180: Correct mmu configuration for AOP SRAM regions ......................................................................
sc7180: Correct mmu configuration for AOP SRAM regions
Signed-off-by: T Michael Turney mturney@codeaurora.org Change-Id: I6611dc614c80063c7df057b59337417c8f56fd9c --- M src/soc/qualcomm/sc7180/include/soc/symbols.h M src/soc/qualcomm/sc7180/memlayout.ld M src/soc/qualcomm/sc7180/mmu.c 3 files changed, 24 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/47261/1
diff --git a/src/soc/qualcomm/sc7180/include/soc/symbols.h b/src/soc/qualcomm/sc7180/include/soc/symbols.h index 207bc43..b498606 100644 --- a/src/soc/qualcomm/sc7180/include/soc/symbols.h +++ b/src/soc/qualcomm/sc7180/include/soc/symbols.h @@ -14,7 +14,14 @@ DECLARE_REGION(dcb) DECLARE_REGION(pmic) DECLARE_REGION(limits_cfg) -DECLARE_REGION(aop) +DECLARE_REGION(aop_code_ram) +DECLARE_REGION(aop_dec) +DECLARE_REGION(aop_qtmr_ac) +DECLARE_REGION(aop_f0_qtmr_v1_f0) +DECLARE_REGION(aop_f1_qtmr_v1_f1) +DECLARE_REGION(aop_vmidmt) +DECLARE_REGION(aop_rscc) +DECLARE_REGION(aop_data_ram) DECLARE_REGION(modem_id)
#endif /* _SOC_QUALCOMM_SC7180_SYMBOLS_H_ */ diff --git a/src/soc/qualcomm/sc7180/memlayout.ld b/src/soc/qualcomm/sc7180/memlayout.ld index 65e50d1..600ef63 100644 --- a/src/soc/qualcomm/sc7180/memlayout.ld +++ b/src/soc/qualcomm/sc7180/memlayout.ld @@ -18,7 +18,14 @@ SECTIONS { AOPSRAM_START(0x0B000000) - REGION(aop, 0x0B000000, 0x100000, 4096) + REGION(aop_code_ram, 0x0B000000, 0x80000, 4096) + REGION(aop_dec, 0x0B080000, 0x2000, 4096) + REGION(aop_qtmr_ac, 0x0B090000, 0x1000, 4096) + REGION(aop_f0_qtmr_v1_f0, 0x0B0A0000, 0x1000, 4096) + REGION(aop_f1_qtmr_v1_f1, 0x0B0B0000, 0x1000, 4096) + REGION(aop_vmidmt, 0x0B0C0000, 0x1000, 4096) + REGION(aop_rscc, 0x0B0D0000, 0x10000, 4096) + REGION(aop_data_ram, 0x0B0E0000, 0x20000, 4096) AOPSRAM_END(0x0B100000)
SSRAM_START(0x14680000) diff --git a/src/soc/qualcomm/sc7180/mmu.c b/src/soc/qualcomm/sc7180/mmu.c index b33baca..c889a60 100644 --- a/src/soc/qualcomm/sc7180/mmu.c +++ b/src/soc/qualcomm/sc7180/mmu.c @@ -22,5 +22,12 @@
void soc_mmu_dram_config_post_dram_init(void) { - mmu_config_range((void *)_aop, REGION_SIZE(aop), CACHED_RAM); + mmu_config_range((void *)_aop_code_ram, REGION_SIZE(aop_code_ram), CACHED_RAM); + mmu_config_range((void *)_aop_dec, REGION_SIZE(aop_dec), DEV_MEM); + mmu_config_range((void *)_aop_qtmr_ac, REGION_SIZE(aop_qtmr_ac), DEV_MEM); + mmu_config_range((void *)_aop_f0_qtmr_v1_f0, REGION_SIZE(aop_f0_qtmr_v1_f0), DEV_MEM); + mmu_config_range((void *)_aop_f1_qtmr_v1_f1, REGION_SIZE(aop_f1_qtmr_v1_f1), DEV_MEM); + mmu_config_range((void *)_aop_vmidmt, REGION_SIZE(aop_vmidmt), DEV_MEM); + mmu_config_range((void *)_aop_rscc, REGION_SIZE(aop_rscc), DEV_MEM); + mmu_config_range((void *)_aop_data_ram, REGION_SIZE(aop_data_ram), CACHED_RAM); }
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47261 )
Change subject: sc7180: Correct mmu configuration for AOP SRAM regions ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/47261/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47261/1//COMMIT_MSG@8 PS1, Line 8: Please add a few sentences here explaining what the problem was and why this fixes it.
https://review.coreboot.org/c/coreboot/+/47261/1/src/soc/qualcomm/sc7180/mmu... File src/soc/qualcomm/sc7180/mmu.c:
https://review.coreboot.org/c/coreboot/+/47261/1/src/soc/qualcomm/sc7180/mmu... PS1, Line 26: mmu_config_range((void *)_aop_dec, REGION_SIZE(aop_dec), DEV_MEM); We really don't need all these tiny ones. All the remaining memory that isn't explicitly mapped otherwise is mapped DEV_MEM anyway (see line 14). We don't explicitly map the register blocks of other peripherals individually either. Let's just put the two CACHED_RAM regions here and in memlayout, and rely on the default memory type for the rest.
mturney mturney has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47261 )
Change subject: sc7180: Correct mmu configuration for AOP SRAM regions ......................................................................
Patch Set 1:
(2 comments)
Next commit (shortly) addresses these two comments.
https://review.coreboot.org/c/coreboot/+/47261/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47261/1//COMMIT_MSG@8 PS1, Line 8:
Please add a few sentences here explaining what the problem was and why this fixes it.
Ack
https://review.coreboot.org/c/coreboot/+/47261/1/src/soc/qualcomm/sc7180/mmu... File src/soc/qualcomm/sc7180/mmu.c:
https://review.coreboot.org/c/coreboot/+/47261/1/src/soc/qualcomm/sc7180/mmu... PS1, Line 26: mmu_config_range((void *)_aop_dec, REGION_SIZE(aop_dec), DEV_MEM);
We really don't need all these tiny ones. […]
Ack
Hello build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47261
to look at the new patch set (#2).
Change subject: sc7180: Correct mmu configuration for AOP SRAM regions ......................................................................
sc7180: Correct mmu configuration for AOP SRAM regions
NOC errors detected at runtime in AOP SRAM region strongly suggested speculative memory accesses were occurring in memory regions that either don't exist or are device memory rather than SRAM.
Signed-off-by: T Michael Turney mturney@codeaurora.org Change-Id: I6611dc614c80063c7df057b59337417c8f56fd9c --- M src/soc/qualcomm/sc7180/include/soc/symbols.h M src/soc/qualcomm/sc7180/memlayout.ld M src/soc/qualcomm/sc7180/mmu.c 3 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/47261/2
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47261 )
Change subject: sc7180: Correct mmu configuration for AOP SRAM regions ......................................................................
Patch Set 2: Code-Review+2
Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47261 )
Change subject: sc7180: Correct mmu configuration for AOP SRAM regions ......................................................................
sc7180: Correct mmu configuration for AOP SRAM regions
NOC errors detected at runtime in AOP SRAM region strongly suggested speculative memory accesses were occurring in memory regions that either don't exist or are device memory rather than SRAM.
Signed-off-by: T Michael Turney mturney@codeaurora.org Change-Id: I6611dc614c80063c7df057b59337417c8f56fd9c Reviewed-on: https://review.coreboot.org/c/coreboot/+/47261 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/soc/qualcomm/sc7180/include/soc/symbols.h M src/soc/qualcomm/sc7180/memlayout.ld M src/soc/qualcomm/sc7180/mmu.c 3 files changed, 6 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/soc/qualcomm/sc7180/include/soc/symbols.h b/src/soc/qualcomm/sc7180/include/soc/symbols.h index 207bc43..1281d63 100644 --- a/src/soc/qualcomm/sc7180/include/soc/symbols.h +++ b/src/soc/qualcomm/sc7180/include/soc/symbols.h @@ -14,7 +14,8 @@ DECLARE_REGION(dcb) DECLARE_REGION(pmic) DECLARE_REGION(limits_cfg) -DECLARE_REGION(aop) +DECLARE_REGION(aop_code_ram) +DECLARE_REGION(aop_data_ram) DECLARE_REGION(modem_id)
#endif /* _SOC_QUALCOMM_SC7180_SYMBOLS_H_ */ diff --git a/src/soc/qualcomm/sc7180/memlayout.ld b/src/soc/qualcomm/sc7180/memlayout.ld index 65e50d1..482620a 100644 --- a/src/soc/qualcomm/sc7180/memlayout.ld +++ b/src/soc/qualcomm/sc7180/memlayout.ld @@ -18,7 +18,8 @@ SECTIONS { AOPSRAM_START(0x0B000000) - REGION(aop, 0x0B000000, 0x100000, 4096) + REGION(aop_code_ram, 0x0B000000, 0x80000, 4096) + REGION(aop_data_ram, 0x0B0E0000, 0x20000, 4096) AOPSRAM_END(0x0B100000)
SSRAM_START(0x14680000) diff --git a/src/soc/qualcomm/sc7180/mmu.c b/src/soc/qualcomm/sc7180/mmu.c index b33baca..8447c01 100644 --- a/src/soc/qualcomm/sc7180/mmu.c +++ b/src/soc/qualcomm/sc7180/mmu.c @@ -22,5 +22,6 @@
void soc_mmu_dram_config_post_dram_init(void) { - mmu_config_range((void *)_aop, REGION_SIZE(aop), CACHED_RAM); + mmu_config_range((void *)_aop_code_ram, REGION_SIZE(aop_code_ram), CACHED_RAM); + mmu_config_range((void *)_aop_data_ram, REGION_SIZE(aop_data_ram), CACHED_RAM); }