make it possible to define amount of SDRAM dynamically on commandline. however this patch will still put all the ram on cs0. also removed the unknown 80kb rom block and use only the publicly defined 32kb boot rom area.
fprintf(stderr, "%s: missing SecureDigital device\n", __FUNCTION__);
exit(1);
}
- if (ram_size < (beagle_machine.ram_require & ~RAMSIZE_FIXED)) {
- fprintf(stderr, "%s: This architecture uses %lu bytes of memory\n",
- __FUNCTION__, (beagle_machine.ram_require & ~RAMSIZE_FIXED));
- exit(1);
- }
- s->cpu = omap3530_mpu_init(BEAGLE_SDRAM_SIZE, NULL);
+ s->cpu = omap3530_mpu_init(ram_size, NULL);
if (serial_hds[0])
omap_uart_attach(s->cpu->uart[2], serial_hds[0]);
.name = "beagle",
.desc = "Beagle board (OMAP3530)",
.init = beagle_init,
- .ram_require = (BEAGLE_SDRAM_SIZE
- + OMAP3XXX_SRAM_SIZE
- + OMAP3XXX_BOOTROM_SIZE) | RAMSIZE_FIXED,
+ .ram_require = OMAP3XXX_SRAM_SIZE + OMAP3XXX_BOOTROM_SIZE,
};
# define OMAP242X_SRAM_SIZE 0x000a0000
# define OMAP243X_SRAM_SIZE 0x00010000
# define OMAP3XXX_SRAM_SIZE 0x00010000
-# define OMAP3XXX_BOOTROM_SIZE 0x0001C000
+# define OMAP3XXX_BOOTROM_SIZE 0x00008000
# define OMAP_CS0_SIZE 0x04000000
# define OMAP_CS1_SIZE 0x04000000
# define OMAP_CS2_SIZE 0x04000000
break;
case 0x10: /* SDRC_SYSCONFIG */
- if ((value >> 3) != 0x2)
+ /* ignore invalid idle mode settings */
+ /*if ((value >> 3) != 0x2)
fprintf(stderr, "%s: bad SDRAM idle mode %i for SDRC_SYSCONFIG (full value 0x%08x)\n",
- __FUNCTION__, value >> 3, value);
+ __FUNCTION__, value >> 3, value);*/
if (value & 2)
omap_sdrc_reset(s);
s->config = value & 0x18;
case 0x40: /* SDRC_CS_CFG */
s->cscfg = value & 0x30f;
- fprintf(stderr, "%s: SDRC_CS_CFG = 0x%08x\n", __FUNCTION__, s->cscfg);
break;
case 0x44: /* SDRC_SHARING */
break;
case 0x68: /* SDRC_DLLB_CTRL */
- OMAP_BAD_REGV(addr, value);
+ /* silently ignore */
+ /*OMAP_BAD_REGV(addr, value);*/
break;
case 0x70: /* SDRC_POWER_REG */
cpu_register_physical_memory(OMAP3_SRAM_BASE, s->sram_size,
sram_base | IO_MEM_RAM);
bootrom_base = qemu_ram_alloc(OMAP3XXX_BOOTROM_SIZE);
- cpu_register_physical_memory(OMAP3_Q1_BASE, OMAP3_BOOT_ROM_SIZE,
+ cpu_register_physical_memory(OMAP3_Q1_BASE + 0x14000, OMAP3_BOOT_ROM_SIZE,
bootrom_base | IO_MEM_ROM);
cpu_register_physical_memory(0, OMAP3_BOOT_ROM_SIZE,
bootrom_base | IO_MEM_ROM);
uint8_t bus16;
};
-/* first 80kB (reserved section) */
-static const uint8_t omap3_boot_rom_block1[] = { /* 0x40000000-0x40013fff */
- /* this gets mapped to zero at power-up so let's have a branch
- * table to the upper block ROM exception vectors here */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x40014000 */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x40014004 */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x40014008 */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x4001400c */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x40014010 */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x40014014 */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x40014018 */
- 0xfe, 0x4f, 0x00, 0xea, /* b 0x4001401c */
-};
-
-/* upper 32kB */
-static const uint8_t omap3_boot_rom_block2[] = { /* 0x40014000-0x4001bfff */
+static const uint8_t omap3_boot_rom[] = { /* 0x40014000-0x4001bfff */
/* 0x40014000: ROM Exception vectors */
0x3e, 0x00, 0x00, 0xea, /* b 0x40014100 */
0x18, 0xf0, 0x9f, 0xe5, /* ldr pc, [pc, #0x18] */
uint8_t x[4] = {0, 0, 0, 0};
int result = 0;
- cpu_physical_memory_write_rom(OMAP3_Q1_BASE,
- omap3_boot_rom_block1,
- sizeof(omap3_boot_rom_block1));
cpu_physical_memory_write_rom(OMAP3_Q1_BASE + 0x14000,
- omap3_boot_rom_block2,
- sizeof(omap3_boot_rom_block2));
+ omap3_boot_rom,
+ sizeof(omap3_boot_rom));
cpu_physical_memory_write_rom(OMAP3_Q1_BASE + 0x1bffc,
rom_version,
sizeof(rom_version));