iommu/io-pgtable-fast: fix sign extension position
The introduction of support for ttbr1 wrongly caused the fastmap stage 1 input address sign extension position to be set to bit 31. This was causing valid IOVAs to page fault. Set the sign extension position back to its previous value. Change-Id: I95ca88f8c033dd79006eff8dfea85007d091f869 Signed-off-by: Liam Mark <lmark@codeaurora.org>
This commit is contained in:
parent
26db194916
commit
9db017f6ac
1 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,9 @@ struct av8l_fast_io_pgtable {
|
||||||
#define AV8L_FAST_TCR_EPD1_SHIFT 23
|
#define AV8L_FAST_TCR_EPD1_SHIFT 23
|
||||||
#define AV8L_FAST_TCR_EPD1_FAULT 1
|
#define AV8L_FAST_TCR_EPD1_FAULT 1
|
||||||
|
|
||||||
|
#define AV8L_FAST_TCR_SEP_SHIFT (15 + 32)
|
||||||
|
#define AV8L_FAST_TCR_SEP_UPSTREAM 7ULL
|
||||||
|
|
||||||
#define AV8L_FAST_MAIR_ATTR_SHIFT(n) ((n) << 3)
|
#define AV8L_FAST_MAIR_ATTR_SHIFT(n) ((n) << 3)
|
||||||
#define AV8L_FAST_MAIR_ATTR_MASK 0xff
|
#define AV8L_FAST_MAIR_ATTR_MASK 0xff
|
||||||
#define AV8L_FAST_MAIR_ATTR_DEVICE 0x04
|
#define AV8L_FAST_MAIR_ATTR_DEVICE 0x04
|
||||||
|
@ -522,6 +525,7 @@ av8l_fast_alloc_pgtable(struct io_pgtable_cfg *cfg, void *cookie)
|
||||||
#if defined(CONFIG_ARM)
|
#if defined(CONFIG_ARM)
|
||||||
reg |= ARM_32_LPAE_TCR_EAE;
|
reg |= ARM_32_LPAE_TCR_EAE;
|
||||||
#endif
|
#endif
|
||||||
|
reg |= AV8L_FAST_TCR_SEP_UPSTREAM << AV8L_FAST_TCR_SEP_SHIFT;
|
||||||
cfg->av8l_fast_cfg.tcr = reg;
|
cfg->av8l_fast_cfg.tcr = reg;
|
||||||
|
|
||||||
/* MAIRs */
|
/* MAIRs */
|
||||||
|
|
Loading…
Add table
Reference in a new issue