diff options
Diffstat (limited to 'hw/pxa2xx.c')
-rw-r--r-- | hw/pxa2xx.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c index 9f4c46c..19494b8 100644 --- a/hw/pxa2xx.c +++ b/hw/pxa2xx.c @@ -1515,7 +1515,8 @@ void pxa2xx_reset(int line, int level, void *opaque) } /* Initialise a PXA270 integrated chip (ARM based core). */ -struct pxa2xx_state_s *pxa270_init(DisplayState *ds, const char *revision) +struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, + DisplayState *ds, const char *revision) { struct pxa2xx_state_s *s; struct pxa2xx_ssp_s *ssp; @@ -1530,6 +1531,12 @@ struct pxa2xx_state_s *pxa270_init(DisplayState *ds, const char *revision) s->env = cpu_init(); cpu_arm_set_model(s->env, revision ?: "pxa270"); + /* SDRAM & Internal Memory Storage */ + cpu_register_physical_memory(PXA2XX_SDRAM_BASE, + sdram_size, qemu_ram_alloc(sdram_size) | IO_MEM_RAM); + cpu_register_physical_memory(PXA2XX_INTERNAL_BASE, + 0x40000, qemu_ram_alloc(0x40000) | IO_MEM_RAM); + s->pic = pxa2xx_pic_init(0x40d00000, s->env); s->dma = pxa27x_dma_init(0x40000000, s->pic[PXA2XX_PIC_DMA]); @@ -1613,7 +1620,8 @@ struct pxa2xx_state_s *pxa270_init(DisplayState *ds, const char *revision) } /* Initialise a PXA255 integrated chip (ARM based core). */ -struct pxa2xx_state_s *pxa255_init(DisplayState *ds) +struct pxa2xx_state_s *pxa255_init(unsigned int sdram_size, + DisplayState *ds) { struct pxa2xx_state_s *s; struct pxa2xx_ssp_s *ssp; @@ -1623,6 +1631,12 @@ struct pxa2xx_state_s *pxa255_init(DisplayState *ds) s->env = cpu_init(); cpu_arm_set_model(s->env, "pxa255"); + /* SDRAM & Internal Memory Storage */ + cpu_register_physical_memory(PXA2XX_SDRAM_BASE, + sdram_size, qemu_ram_alloc(sdram_size) | IO_MEM_RAM); + cpu_register_physical_memory(PXA2XX_INTERNAL_BASE, + 0x40000, qemu_ram_alloc(0x40000) | IO_MEM_RAM); + s->pic = pxa2xx_pic_init(0x40d00000, s->env); s->dma = pxa255_dma_init(0x40000000, s->pic[PXA2XX_PIC_DMA]); |