Skip to contentSkip to conversation

[6063] target-ppc: create a helper function to allow more flexible RAM allocation for PPC 4xx

Qemu-devel Aurelien Jarno 1 participant 1 message Dec 15, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 6063

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6063
Author:   aurel32
Date:     2008-12-15 23:15:56 +0000 (Mon, 15 Dec 2008)

Log Message:
-----------
target-ppc: create a helper function to allow more flexible RAM allocation for PPC 4xx

The 4xx SDRAM controller supports a small number of banks, and each bank must be one of a small set of sizes. The number of banks and the supported sizes varies by SoC.

This function uses the user-specified RAM size to fill in the "ram_bases" and "ram_sizes" arrays required by ppc4xx_sdram_init().

Modified Paths:
--------------
trunk/hw/ppc4xx.h
trunk/hw/ppc4xx_devs.c

Modified: trunk/hw/ppc4xx.h
===================================================================

hw/ppc4xx.h +5 -0
@@ -48,6 +48,11 @@
 qemu_irq *ppcuic_init (CPUState *env, qemu_irq *irqs,
                        uint32_t dcr_base, int has_ssr, int has_vr);
 
+ram_addr_t ppc4xx_sdram_adjust(ram_addr_t ram_size, int nr_banks,
+                               target_phys_addr_t ram_bases[],
+                               target_phys_addr_t ram_sizes[],
+                               const unsigned int sdram_bank_sizes[]);
+
 void ppc4xx_sdram_init (CPUState *env, qemu_irq irq, int nbanks,
                         target_phys_addr_t *ram_bases,
                         target_phys_addr_t *ram_sizes,

Modified: trunk/hw/ppc4xx_devs.c
===================================================================

hw/ppc4xx_devs.c +42 -0

45 lines not on this page · raw message