qemu-armv7: memcpy to ROMSTAGE_BASE

Hi all, during debugging of qemu-armv7 I found that coreboot performs memcpy to ROMSTAGE_BASE area. This is in src/arch/armv7/memcpy.S: 3: PLD( pld [r1, #124] ) 4: ldr8w r1, r3, r4, r5, r6, r7, r8, ip, lr, abort=20f subs r2, r2, #32 str8w r0, r3, r4, r5, r6, r7, r8, ip, lr, abort=20f bge 3b r0 at this moment (for qemu-armv7) is 0x10000 (ROMSTAGE_BASE). Is it ok that ROM area is used as storage during memory copying ? Shouldn't it be considered read only ? Am I missing something here ? Because coreboot execute from RAM this is not the problem but when I try to execute it from flash ('-bios' option) I'm unable to boot because qemu emulates flash as read only area. Is it ok to move ROMSTAGE_BASE to SRAM or this is violation of general rule ? Thanks, Piotr

The ROMSTAGE on ARM is expected to be SRAM. When you know the SRAM address for a given mainboard, you need to set it up in Kconfig for *just* that mainboard. Nice work, I think you're getting close! ron
participants (2)
-
Piotr Król
-
ron minnich