Hi Yong,
On 23/02/16 23:02, Yong Wu wrote:
Mediatek extend bit9 in the lvl1 and lvl2 pgtable descriptor of the
Short-descriptor as the 4GB mode in which the dram size will be
over 4GB.
We add a special quirk for this MTK-4GB mode, And in the standard
spec, Bit9 in the lvl1 is "IMPLEMENTATION DEFINED", while it's AP[2]
in the lvl2, therefore if this quirk is enabled, NO_PERMS is also
expected.
Would you be able to explain exactly what this "4GB mode" actually is?
I've been trying to make sense of it from the original M4U patches and
the patch for the I2C driver, but it has me completely baffled.
diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h
index d4f5027..a84a60a 100644
--- a/drivers/iommu/io-pgtable.h
+++ b/drivers/iommu/io-pgtable.h
@@ -60,10 +60,16 @@ struct io_pgtable_cfg {
* IO_PGTABLE_QUIRK_TLBI_ON_MAP: If the format forbids caching
invalid
* (unmapped) entries but the hardware might do so anyway,
perform
* TLB maintenance when mapping as well as when unmapping.
+ *
+ * IO_PGTABLE_QUIRK_MTK_4GB_EXT: Mediatek extend bit9 in the lvl1
and
+ * lvl2 descriptor of the Short-descriptor as the 4GB mode.
+ * Note that: Bit9 in the lvl1 is "IMPLEMENTATION DEFINED", while
+ * it is AP[2] in the lvl2.
Unfortunately that comment doesn't really explain anything - I'd be
happy to suggest a more helpful wording, If only I understood what it
actually did.