@@ -107,6 +107,8 @@ void __init early_fixmap_init(void);
#define __late_set_fixmap __set_fixmap
#define __late_clear_fixmap(idx) __set_fixmap((idx), 0, FIXMAP_PAGE_CLEAR)
+#define set_fixmap_io set_fixmap_io
+void set_fixmap_io(enum fixed_addresses idx, phys_addr_t phys);
void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot);
#include <asm-generic/fixmap.h>
@@ -1279,6 +1279,19 @@ void __set_fixmap(enum fixed_addresses idx,
}
}
+void set_fixmap_io(enum fixed_addresses idx, phys_addr_t phys)
+{
+ pgprot_t prot = FIXMAP_PAGE_IO;
+
+ /*
+ * For now we consider all I/O as non-secure. For future
+ * filter the I/O base for setting appropriate permissions.
+ */
+ prot = __pgprot(pgprot_val(prot) | PROT_NS_SHARED);
+
+ return __set_fixmap(idx, phys, prot);
+}
+
void *__init fixmap_remap_fdt(phys_addr_t dt_phys, int *size, pgprot_t prot)
{
const u64 dt_virt_base = __fix_to_virt(FIX_FDT);