aboutsummaryrefslogtreecommitdiff
path: root/hw/spitz.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-24 17:59:27 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-04-24 17:59:27 +0000
commit7fb4fdcffeb199c1a742c45ac2413be8a9a33354 (patch)
tree39c795fed9ae5e8d59afde1ca6031702cdd3224e /hw/spitz.c
parentc73f96fddc0f5ec7c708290f159b04cfa09ef713 (diff)
downloadqemu-7fb4fdcffeb199c1a742c45ac2413be8a9a33354.zip
qemu-7fb4fdcffeb199c1a742c45ac2413be8a9a33354.tar.gz
qemu-7fb4fdcffeb199c1a742c45ac2413be8a9a33354.tar.bz2
RAM usage information in machine definition.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4246 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/spitz.c')
-rw-r--r--hw/spitz.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/hw/spitz.c b/hw/spitz.c
index b059f9a..28987a6 100644
--- a/hw/spitz.c
+++ b/hw/spitz.c
@@ -1180,6 +1180,9 @@ static void sl_bootparam_write(uint32_t ptr)
/* Board init. */
enum spitz_model_e { spitz, akita, borzoi, terrier };
+#define SPITZ_RAM 0x04000000
+#define SPITZ_ROM 0x00800000
+
static struct arm_boot_info spitz_binfo = {
.loader_start = PXA2XX_SDRAM_BASE,
.ram_size = 0x04000000,
@@ -1190,8 +1193,6 @@ static void spitz_common_init(int ram_size, int vga_ram_size,
const char *kernel_cmdline, const char *initrd_filename,
const char *cpu_model, enum spitz_model_e model, int arm_id)
{
- uint32_t spitz_ram = spitz_binfo.ram_size;
- uint32_t spitz_rom = 0x00800000;
struct pxa2xx_state_s *cpu;
struct scoop_info_s *scp;
@@ -1199,17 +1200,17 @@ static void spitz_common_init(int ram_size, int vga_ram_size,
cpu_model = (model == terrier) ? "pxa270-c5" : "pxa270-c0";
/* Setup CPU & memory */
- if (ram_size < spitz_ram + spitz_rom + PXA2XX_INTERNAL_SIZE) {
+ if (ram_size < SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE) {
fprintf(stderr, "This platform requires %i bytes of memory\n",
- spitz_ram + spitz_rom + PXA2XX_INTERNAL_SIZE);
+ SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE);
exit(1);
}
- cpu = pxa270_init(spitz_ram, ds, cpu_model);
+ cpu = pxa270_init(spitz_binfo.ram_size, ds, cpu_model);
sl_flash_register(cpu, (model == spitz) ? FLASH_128M : FLASH_1024M);
- cpu_register_physical_memory(0, spitz_rom,
- qemu_ram_alloc(spitz_rom) | IO_MEM_ROM);
+ cpu_register_physical_memory(0, SPITZ_ROM,
+ qemu_ram_alloc(SPITZ_ROM) | IO_MEM_ROM);
/* Setup peripherals */
spitz_keyboard_register(cpu);
@@ -1285,22 +1286,26 @@ QEMUMachine akitapda_machine = {
"akita",
"Akita PDA (PXA270)",
akita_init,
+ SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
};
QEMUMachine spitzpda_machine = {
"spitz",
"Spitz PDA (PXA270)",
spitz_init,
+ SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
};
QEMUMachine borzoipda_machine = {
"borzoi",
"Borzoi PDA (PXA270)",
borzoi_init,
+ SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
};
QEMUMachine terrierpda_machine = {
"terrier",
"Terrier PDA (PXA270)",
terrier_init,
+ SPITZ_RAM + SPITZ_ROM + PXA2XX_INTERNAL_SIZE + RAMSIZE_FIXED,
};