Tegra freezes when touching ungated MMIO regions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I observed that touching MMIO regions of Tegra devices with its
corresponding clock gate deactivated immediately freezes the whole
system. No kernel panic, nothing.

I tested this behavior with a small kernel module, find it attached. A
few seconds after loading this module, the whole device freezes. Tested
this on a TK1 and TX1.

What is the actual expected behavior on ARM(64) when touching ungated
MMIO regions? Is it specified somewhere?

Why do I actually want to do that?
We're working on the Jailhouse hypervisor that partitions hardware to
isolated partitions, called cells. Devices (e.g. MMIO regions) are
assigned to those cells. A cell might do whatever it wants within its
scope. The hypervisor traps on access violations and will stop that cell.

Touching ungated MMIO regions isn't a violation, but it will hang up the
whole system.

Best
  Ralf

---
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/io.h>

MODULE_DESCRIPTION("foobar");
MODULE_LICENSE("GPL");

static int __init mod_init(void)
{
        /* try 0x70006200 for UARTD
         * or  0x7000c000 for I2C-0.
	   Make sure those devices are 'disabled' in your DT.
	 */
        unsigned long phys = 0x70006200;

        volatile unsigned int *mmio = ioremap(phys, 0x40);

        *mmio = 0xdeadbeef;

        iounmap(mmio);

        return 0;
}

static void __exit mod_exit(void)
{
}

module_init(mod_init);
module_exit(mod_exit);
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux