All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Raspbian in QEMU
@ 2014-03-12  9:55 Peter Hanzel
  2014-03-12 15:43 ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Hanzel @ 2014-03-12  9:55 UTC (permalink / raw)
  To: qemu-devel

Hello.

I have successfully started Raspbian for Raspberry PI in QEMU.
I am just curious why you must disable ld.so.preload to libcofi_rpi.so

This is optimized library for memset, memcpy:
https://github.com/simonjhall/copies-and-fills.

Use this library some unsupported ARM instruction?

Thanks for any replay.

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-12  9:55 [Qemu-devel] Raspbian in QEMU Peter Hanzel
@ 2014-03-12 15:43 ` Peter Maydell
  2014-03-12 18:05   ` Peter Hanzel
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2014-03-12 15:43 UTC (permalink / raw)
  To: Peter Hanzel; +Cc: QEMU Developers

On 12 March 2014 09:55, Peter Hanzel <hanzelpeter@gmail.com> wrote:
> Hello.
>
> I have successfully started Raspbian for Raspberry PI in QEMU.
> I am just curious why you must disable ld.so.preload to libcofi_rpi.so
>
> This is optimized library for memset, memcpy:
> https://github.com/simonjhall/copies-and-fills.
>
> Use this library some unsupported ARM instruction?

It uses SETEND to switch from little-endian to big-endian
mode; QEMU doesn't implement that.

thanks
-- PMM

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-12 15:43 ` Peter Maydell
@ 2014-03-12 18:05   ` Peter Hanzel
  2014-03-12 18:56     ` Stefan Weil
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Hanzel @ 2014-03-12 18:05 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

Thanks.

Now it makes sense. Also google now works and led me to
https://github.com/bavison/arm-mem.
And there is SETEND used.

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-12 18:05   ` Peter Hanzel
@ 2014-03-12 18:56     ` Stefan Weil
  2014-03-12 19:41       ` Richard Henderson
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Weil @ 2014-03-12 18:56 UTC (permalink / raw)
  To: Peter Hanzel, Peter Maydell; +Cc: QEMU Developers, Richard Henderson

Am 12.03.2014 19:05, schrieb Peter Hanzel:
> Thanks.
> 
> Now it makes sense. Also google now works and led me to
> https://github.com/bavison/arm-mem.
> And there is SETEND used.
> 

It might be possible to handle that special case in QEMU without
implementing setend:

That instruction is only used in the implementation of function memcmp.
When TCG detects a setend instruction, it could check whether the
surrounding code has the signature of that memcmp implementation and add
code which calls a memcmp helper function. The setend instruction and
all the following code of memcmp would be handled as if it were a single
special multi byte machine instruction.

Is that special accelerated implementation of memcmp used in lots of ARM
systems, or is it only used for Raspberry PI? From the copyright in
memcpy.S I'd guess that it is RPi specific, so maybe the need for a QEMU
hack is not urgent enough.

Stefan

PS. Link to previous discussion on setend:
https://lists.gnu.org/archive/html/qemu-trivial/2013-08/msg00086.html
I cc Richard because he was / is involved, too.

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-12 18:56     ` Stefan Weil
@ 2014-03-12 19:41       ` Richard Henderson
  2014-03-12 20:01         ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Henderson @ 2014-03-12 19:41 UTC (permalink / raw)
  To: Stefan Weil, Peter Hanzel, Peter Maydell; +Cc: QEMU Developers

On 03/12/2014 11:56 AM, Stefan Weil wrote:
> Am 12.03.2014 19:05, schrieb Peter Hanzel:
>> Thanks.
>>
>> Now it makes sense. Also google now works and led me to
>> https://github.com/bavison/arm-mem.
>> And there is SETEND used.
>>
> 
> It might be possible to handle that special case in QEMU without
> implementing setend:
> 
> That instruction is only used in the implementation of function memcmp.
> When TCG detects a setend instruction, it could check whether the
> surrounding code has the signature of that memcmp implementation and add
> code which calls a memcmp helper function. The setend instruction and
> all the following code of memcmp would be handled as if it were a single
> special multi byte machine instruction.

Ew.  No.  It would be easier to just implement setend, even if badly.

> PS. Link to previous discussion on setend:
> https://lists.gnu.org/archive/html/qemu-trivial/2013-08/msg00086.html
> I cc Richard because he was / is involved, too.

For my part, the endian-aware load/store opcodes I alluded to last
August are now in.


r~

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-12 19:41       ` Richard Henderson
@ 2014-03-12 20:01         ` Peter Maydell
  2014-03-20 12:36           ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2014-03-12 20:01 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Stefan Weil, Peter Hanzel, QEMU Developers

On 12 March 2014 19:41, Richard Henderson <rth@twiddle.net> wrote:
> Ew.  No.  It would be easier to just implement setend, even if badly.

Agreed.

> For my part, the endian-aware load/store opcodes I alluded to last
> August are now in.

Yes, it would be fairly straightforward to implement setend now.
I haven't actually looked at it, though, because the only thing that
uses it is this raspi memcmp code, and there's a workaround
for that. So other things have been higher priority.

thanks
-- PMM

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-12 20:01         ` Peter Maydell
@ 2014-03-20 12:36           ` Paolo Bonzini
  2014-03-20 13:08             ` François Revol
  0 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2014-03-20 12:36 UTC (permalink / raw)
  To: Peter Maydell, Richard Henderson
  Cc: Stefan Weil, Peter Hanzel, QEMU Developers

Il 12/03/2014 21:01, Peter Maydell ha scritto:
> On 12 March 2014 19:41, Richard Henderson <rth@twiddle.net> wrote:
>> Ew.  No.  It would be easier to just implement setend, even if badly.
>
> Agreed.
>
>> For my part, the endian-aware load/store opcodes I alluded to last
>> August are now in.
>
> Yes, it would be fairly straightforward to implement setend now.
> I haven't actually looked at it, though, because the only thing that
> uses it is this raspi memcmp code, and there's a workaround
> for that. So other things have been higher priority.

I looked at that yesterday and it took me exactly one hour... I'll 
submit it for 2.1 since I'm interested (for non-work reasons) in 
Raspberry Pi emulation.

Paolo

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-20 12:36           ` Paolo Bonzini
@ 2014-03-20 13:08             ` François Revol
  2014-03-20 13:21               ` Paolo Bonzini
  0 siblings, 1 reply; 9+ messages in thread
From: François Revol @ 2014-03-20 13:08 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: QEMU Developers, Peter Maydell, Stefan Weil, Peter Hanzel,
	Richard Henderson

On 20/03/2014 13:36, Paolo Bonzini wrote:
> Il 12/03/2014 21:01, Peter Maydell ha scritto:
>> On 12 March 2014 19:41, Richard Henderson <rth@twiddle.net> wrote:
>>> Ew.  No.  It would be easier to just implement setend, even if badly.
>>
>> Agreed.
>>
>>> For my part, the endian-aware load/store opcodes I alluded to last
>>> August are now in.
>>
>> Yes, it would be fairly straightforward to implement setend now.
>> I haven't actually looked at it, though, because the only thing that
>> uses it is this raspi memcmp code, and there's a workaround
>> for that. So other things have been higher priority.
> 
> I looked at that yesterday and it took me exactly one hour... I'll
> submit it for 2.1 since I'm interested (for non-work reasons) in
> Raspberry Pi emulation.

Just so you don't start rewriting the wheel:

https://github.com/Torlus/qemu/tree/rpi

I'm not sure how far he went yet though.

François.

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

* Re: [Qemu-devel] Raspbian in QEMU
  2014-03-20 13:08             ` François Revol
@ 2014-03-20 13:21               ` Paolo Bonzini
  0 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2014-03-20 13:21 UTC (permalink / raw)
  To: François Revol
  Cc: QEMU Developers, Peter Maydell, Stefan Weil, Peter Hanzel,
	Richard Henderson

Il 20/03/2014 14:08, François Revol ha scritto:
>> > I looked at that yesterday and it took me exactly one hour... I'll
>> > submit it for 2.1 since I'm interested (for non-work reasons) in
>> > Raspberry Pi emulation.
> Just so you don't start rewriting the wheel:
>
> https://github.com/Torlus/qemu/tree/rpi

No, I'm not going to rewrite it but I'll gladly review it.

Paolo

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

end of thread, other threads:[~2014-03-20 13:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12  9:55 [Qemu-devel] Raspbian in QEMU Peter Hanzel
2014-03-12 15:43 ` Peter Maydell
2014-03-12 18:05   ` Peter Hanzel
2014-03-12 18:56     ` Stefan Weil
2014-03-12 19:41       ` Richard Henderson
2014-03-12 20:01         ` Peter Maydell
2014-03-20 12:36           ` Paolo Bonzini
2014-03-20 13:08             ` François Revol
2014-03-20 13:21               ` Paolo Bonzini

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.