[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/21] hw/arm/omap2: Create the RAM in the board
From: |
Richard Henderson |
Subject: |
Re: [PATCH 04/21] hw/arm/omap2: Create the RAM in the board |
Date: |
Mon, 21 Oct 2019 09:59:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 10/20/19 3:56 PM, Philippe Mathieu-Daudé wrote:
> static void n8x0_init(MachineState *machine,
> struct arm_boot_info *binfo, int model)
> {
> - MemoryRegion *sysmem = get_system_memory();
> + MemoryRegion *sdram = g_new(MemoryRegion, 1);
> struct n800_s *s = (struct n800_s *) g_malloc0(sizeof(*s));
> - int sdram_size = binfo->ram_size;
> + uint64_t sdram_size = binfo->ram_size;
>
> - s->mpu = omap2420_mpu_init(sysmem, sdram_size, machine->cpu_type);
> + memory_region_allocate_system_memory(sdram, NULL, "omap2.dram",
> + sdram_size);
> + memory_region_add_subregion(get_system_memory(), OMAP2_Q2_BASE, sdram);
> +
> + s->mpu = omap2420_mpu_init(sdram, machine->cpu_type);
Any reason not to put the MemoryRegion in to the n800_s structure?
Otherwise,
Reviewed-by: Richard Henderson <address@hidden>
r~
- [PATCH 01/21] hw/arm/xilinx_zynq: Use the IEC binary prefix definitions, (continued)
- [PATCH 01/21] hw/arm/xilinx_zynq: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2019/10/20
- [PATCH 02/21] hw/arm/mps2: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2019/10/20
- [PATCH 03/21] hw/arm/collie: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/20
- [PATCH 04/21] hw/arm/omap2: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/20
- Re: [PATCH 04/21] hw/arm/omap2: Create the RAM in the board,
Richard Henderson <=
- [PATCH 05/21] hw/arm/omap1: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/20
- [PATCH 06/21] hw/arm/digic4: Inline digic4_board_setup_ram() function, Philippe Mathieu-Daudé, 2019/10/20
- [PATCH 07/21] hw: Drop QOM ownership on memory_region_allocate_system_memory() calls, Philippe Mathieu-Daudé, 2019/10/20
- [PATCH 08/21] hw/alpha/dp264: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/20