[Top][All Lists]

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

What does soft-mmu mean? What happens when we set MMU registers? (aarch6

From: ckim
Subject: What does soft-mmu mean? What happens when we set MMU registers? (aarch64)
Date: Mon, 8 Mar 2021 22:16:18 +0900


Hello qemu people,


In hw/arm/virt.c, I see these coces,


static const MemMapEntry base_memmap[] = {

    /* Space up to 0x8000000 is reserved for a boot ROM */

    [VIRT_FLASH] =              {          0, 0x08000000 },

    [VIRT_CPUPERIPHS] =         { 0x08000000, 0x00020000 },

    /* GIC distributor and CPU interfaces sit inside the CPU peripheral space */

    [VIRT_GIC_DIST] =           { 0x08000000, 0x00010000 },


[VIRT_GPIO] =               { 0x09030000, 0x00001000 },

    [VIRT_SECURE_UART] =        { 0x09040000, 0x00001000 },

    [VIRT_SMMU] =               { 0x09050000, 0x00020000 },

    [VIRT_PCDIMM_ACPI] =        { 0x09070000, MEMORY_HOTPLUG_IO_LEN },

    [VIRT_ACPI_GED] =           { 0x09080000, ACPI_GED_EVT_SEL_LEN },


As far as I understand, in arm architecture, access to SMMU is done by system registers,

not by reading or writing to certain registers located in certain addresses.

Then what is the VIRT_SMMU above? Is it ‘the’ SMMU for the core(doing virtual to physical address translation) or a special SMMU? (like IOMMU for a peripheral?)


And I launched qemu using this command :

${QEMU_DIR}/qemu-system-aarch64 -machine type=virt,gic-version=3,secure=true,virtualization=true -cpu cortex-a72

-nographic -smp 1 -m 2048 -drive if=pflash,file=pflash.img,format=raw,readonly=on

I found setting sctlr_el3 caused exception (for smmu setting), trying to find what is the difference that makes this error (the baremetal code I run on qemu runs ok in rtl sim),

I remembered qemu I run is something called ‘soft-mmu’, so maybe I shouldn’t set the mmu registers..

In codes for SoCs with real mmu, how does the codes work when it sets MMU related registers?


These aren’t all clear to me. If someone could explain it to me or give me an advice, I would deeply appreciate it.


Thank you!
Chan Kim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]