All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Fw: qemu integrator RAM size can't reach 128M when emulate the arm926
@ 2017-02-14 13:45 heavybird
  2017-02-14 15:21 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: heavybird @ 2017-02-14 13:45 UTC (permalink / raw
  To: qemu-devel

hi qemu-devel,


i tried use the integrator.c to emulate the arm926 which has 128M message but found the RAM size can use is less than 32M. steps below. the qemu usding is 2.8.

1  define the RAM from 0-128M in ld file.
2 write the test program to verify i can write/read the memory from 32M to 64M continuously with address directly.
3 always failed when the size is close to 32M even though i changed start address.
4 error message:

qemu: hardware error: integratorcm_write3: Unimplemented offset 0x0

CPU #0:
R00=00000028 R01=00019000 R02=00000055 R03=10000000
R04=0000ea9c R05=00000505 R06=00000606 R07=00000707
R08=00000808 R09=00000909 R10=00001010 R11=0000feb4
R12=00000000 R13=0000fea8 R14=00000338 R15=00000300
PSR=20000153 --C- A svc32
s00=00000000 s01=00000000 d00=0000000000000000
s02=00000000 s03=00000000 d01=0000000000000000
s04=00000000 s05=00000000 d02=0000000000000000
s06=00000000 s07=00000000 d03=0000000000000000
s08=00000000 s09=00000000 d04=0000000000000000
s10=00000000 s11=00000000 d05=0000000000000000
s12=00000000 s13=00000000 d06=0000000000000000
s14=00000000 s15=00000000 d07=0000000000000000
s16=00000000 s17=00000000 d08=0000000000000000
s18=00000000 s19=00000000 d09=0000000000000000
s20=00000000 s21=00000000 d10=0000000000000000
s22=00000000 s23=00000000 d11=0000000000000000
s24=00000000 s25=00000000 d12=0000000000000000
s26=00000000 s27=00000000 d13=0000000000000000
s28=00000000 s29=00000000 d14=0000000000000000
s30=00000000 s31=00000000 d15=0000000000000000
FPSCR: 00000000


thanks
jason.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Fw: qemu integrator RAM size can't reach 128M when emulate the arm926
  2017-02-14 13:45 [Qemu-devel] Fw: qemu integrator RAM size can't reach 128M when emulate the arm926 heavybird
@ 2017-02-14 15:21 ` Peter Maydell
       [not found]   ` <tencent_0D7C69D20350D3654337361B@qq.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2017-02-14 15:21 UTC (permalink / raw
  To: heavybird; +Cc: qemu-devel

On 14 February 2017 at 13:45, heavybird <4345099@qq.com> wrote:
> i tried use the integrator.c to emulate the arm926 which has 128M message but found the RAM size can use is less than 32M. steps below. the qemu usding is 2.8.
>
> 1  define the RAM from 0-128M in ld file.
> 2 write the test program to verify i can write/read the memory from 32M to 64M continuously with address directly.
> 3 always failed when the size is close to 32M even though i changed start address.
> 4 error message:
>
> qemu: hardware error: integratorcm_write3: Unimplemented offset 0x0
>
> CPU #0:
> R00=00000028 R01=00019000 R02=00000055 R03=10000000
> R04=0000ea9c R05=00000505 R06=00000606 R07=00000707
> R08=00000808 R09=00000909 R10=00001010 R11=0000feb4
> R12=00000000 R13=0000fea8 R14=00000338 R15=00000300

You don't give your test program, but I'm guessing
from this register dump that the address it is
trying to read is in r3 which is 0x10000000.
That is off the end of the RAM (which starts at 0
and goes up to just under 0x10000000 in the case when
you have the maximum possible 256MB RAM in this board).
In particular 0x10000000 is where the board's system
registers start, and the error above indicates that you
have attempted to write to one of them, not to RAM.

I suspect you have a bug in your test code.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Fw: qemu integrator RAM size can't reach 128M whenemulate the arm926
       [not found]   ` <tencent_0D7C69D20350D3654337361B@qq.com>
@ 2017-02-15 13:03     ` Peter Maydell
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2017-02-15 13:03 UTC (permalink / raw
  To: heavybird; +Cc: qemu-devel

On 15 February 2017 at 09:41, heavybird <4345099@qq.com> wrote:
> the issue i reported is caused by my test program, i fixed it by myself now.
> some more concern about your integratorcp.c.
> 1 what is your consideration to use the direct address in the code
> (s->cm_osc = 0x01000048,integratorcm_init), does it take some potential
> trouble for user once it is overlapped in the guest code?

This value is not an address. It is the reset value for the
CM_OSC oscillator control register, and indicates that
the BMODE field is set to 0b10 and the PLL_VDW field
is set to 0b01001000, which is the standard value for this
board as documented in the CM926EJ-S integrator core module
user guide.

> 2 is it possible to create a big DRAM(256M above) memory space to change
> your code integratorcp.c just like the "integrator.flash" with the function
> memory_region_init_ram.

The integratorcp is a model of a specific board, and that
board can't have a large DRAM in it. You'd need to
look at the board's physical address map to find out
if there is space in it to add more RAM.
integrator.flash is a complicated thing because it is
possible for the guest to control at runtime whether
it is mapped; it's not a good example to follow for
simple always-present RAM.

For the standards of the time 256MB was a decent amount
of RAM for an ARM926 core.

thanks
-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-15 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-14 13:45 [Qemu-devel] Fw: qemu integrator RAM size can't reach 128M when emulate the arm926 heavybird
2017-02-14 15:21 ` Peter Maydell
     [not found]   ` <tencent_0D7C69D20350D3654337361B@qq.com>
2017-02-15 13:03     ` [Qemu-devel] Fw: qemu integrator RAM size can't reach 128M whenemulate " Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.