Skip to content

Commit

Permalink
Missed file
Browse files Browse the repository at this point in the history
  • Loading branch information
vintagepc committed Apr 15, 2024
1 parent 5881d8a commit 2321479
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hw/arm/prusa/stm32_common/stm32_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,20 @@ extern void stm32_soc_realize_all_peripherals(DeviceState *soc_state,Error **err
if (!c->cfg->perhipherals[i].type) break;
n_dmas++;
}
MemoryRegion* dest_region = get_system_memory();

if (s->has_sys_memory)
{
dest_region = &s->sys_memory;
}
for (int i=0; i<STM32_P_COUNT; i++)
{
if (c->cfg->unimplemented[i].type != NULL)
{
const stm32_periph_cfg_t* cfg = &c->cfg->unimplemented[i];
MemoryRegion* mr = g_new0(MemoryRegion, 1);
memory_region_init_ram(mr, OBJECT(soc_state), cfg->type, cfg->size, &error_fatal);
memory_region_add_subregion_overlap(&s->sys_memory, cfg->base_addr, mr, -999);
memory_region_add_subregion_overlap(dest_region, cfg->base_addr, mr, -999);
continue;
}
stm32_soc_realize_peripheral(soc_state, i, errp);
Expand Down

0 comments on commit 2321479

Please sign in to comment.