On 08/23/2013 08:09 AM, Yongbok Kim wrote:
> +    /* alias for pre IO hole access */
> +    memory_region_init_alias(ram_low_preio, NULL, "mips_malta_low_preio.ram",
> +                             ram_high, 0, MIN(ram_size, (256 << 20)));
> +    memory_region_add_subregion(system_memory, 0, ram_low_preio);
> +
> +    /* alias for post IO hole access, if there is enough RAM */
> +    if (ram_size > (512 << 20)) {
> +        ram_low_postio = g_new(MemoryRegion, 1);
> +        memory_region_init_alias(ram_low_postio, NULL,
> +                                 "mips_malta_low_postio.ram",
> +                                 ram_high, 512 << 20,
> +                                 ram_size - (512 << 20));
> +        memory_region_add_subregion(system_memory, 512 << 20, 
> ram_low_postio);
> +    }

This sort of thing is what subregion prioirities are for.  Ideally you'd have
one alias region, with lower priority than the IO hole.

Of course, it looks like most of gt64xxx_pci.c needs cleaning up for proper
usage of the memory region infrastructure before that can happen...


r~

Reply via email to