From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Riku Voipio <riku.voipio@iki.fi>,
Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other
Date: Thu, 05 Feb 2015 07:03:35 +0800 [thread overview]
Message-ID: <54D2A547.8090404@sunrus.com.cn> (raw)
In-Reply-To: <54C98EF3.3070405@sunrus.com.cn>
On 1/29/15 09:37, Chen Gang S wrote:
> On 1/29/15 06:36, Peter Maydell wrote:
>> On 28 January 2015 at 22:09, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>>> - Is what I said above really correct (e.g. is linux-user really mainly
>>> for cpu emulation)?.
>>
>> Not really. linux-user is mainly for running single Linux binaries.
>> It has a secondary use for running gcc test binaries which think
>> they are "bare metal" but actually use some kind of semihosting API.
>> (You should check whether tile has one of those.)
>>
>> As well as linux-user mode, QEMU has system emulation mode, where
>> we emulate a complete machine.
>>
>> Both modes need CPU emulation.
>>
>
> OK, thanks.
>
> For coding and test, is linux-user a good starting position for me? (I
> guess it is).
>
At present, I make a static program which will print "Hello world" for
microblaze architecture, and can excute successfully.
[root@localhost qemu]# cat test.c
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
[root@localhost qemu]# /upstream/release/bin/microblaze-gchen-linux-gcc -Wall -O2 -static -o test.mb test.c
[root@localhost qemu]# file ./test.mb
./test.mb: ELF 32-bit MSB executable, Xilinx MicroBlaze 32-bit RISC, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped
[root@localhost qemu]# ls -l ./test.mb
-rwxr-xr-x. 1 root root 3224540 Feb 5 06:39 ./test.mb
[root@localhost qemu]# ./microblaze-linux-user/qemu-microblaze ./test.mb
Hello world!
And I also generate tile "Hello world" static program:
[root@localhost qemu]# /upstream/release-tile/bin/tilegx-gchen-linux-gcc -Wall -O2 -static -o test.tgx test.c
[root@localhost qemu]# file ./test.tgx
./test.tgx: ELF 64-bit LSB executable, Tilera TILE-Gx, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped
[root@localhost qemu]# ls -l ./test.tgx
-rwxr-xr-x. 1 root root 3611376 Feb 5 06:42 ./test.tgx
I shall try to let tile "Hello world" static program run successfully
within this month:
- 1st patch: can run an empty elf64 tile executable in linux-user.
(try to finish within 2015-02-15).
- 2nd patch: can run "Hello world" elf64 tile program in linux-user.
(try to finish within 2015-02-25, it seems hard to finish in time).
- 3rd patch: for completion, or fixing issues, or documentations.
(try to finish within 2015-02-28).
Welcome any ideas, suggestions, and completions.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
WARNING: multiple messages have this Message-ID (diff)
From: Chen Gang S <gang.chen@sunrus.com.cn>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
Riku Voipio <riku.voipio@iki.fi>,
Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other
Date: Thu, 05 Feb 2015 07:03:35 +0800 [thread overview]
Message-ID: <54D2A547.8090404@sunrus.com.cn> (raw)
In-Reply-To: <54C98EF3.3070405@sunrus.com.cn>
On 1/29/15 09:37, Chen Gang S wrote:
> On 1/29/15 06:36, Peter Maydell wrote:
>> On 28 January 2015 at 22:09, Chen Gang S <gang.chen@sunrus.com.cn> wrote:
>>> - Is what I said above really correct (e.g. is linux-user really mainly
>>> for cpu emulation)?.
>>
>> Not really. linux-user is mainly for running single Linux binaries.
>> It has a secondary use for running gcc test binaries which think
>> they are "bare metal" but actually use some kind of semihosting API.
>> (You should check whether tile has one of those.)
>>
>> As well as linux-user mode, QEMU has system emulation mode, where
>> we emulate a complete machine.
>>
>> Both modes need CPU emulation.
>>
>
> OK, thanks.
>
> For coding and test, is linux-user a good starting position for me? (I
> guess it is).
>
At present, I make a static program which will print "Hello world" for
microblaze architecture, and can excute successfully.
[root@localhost qemu]# cat test.c
#include <stdio.h>
int main()
{
printf("Hello world!\n");
return 0;
}
[root@localhost qemu]# /upstream/release/bin/microblaze-gchen-linux-gcc -Wall -O2 -static -o test.mb test.c
[root@localhost qemu]# file ./test.mb
./test.mb: ELF 32-bit MSB executable, Xilinx MicroBlaze 32-bit RISC, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped
[root@localhost qemu]# ls -l ./test.mb
-rwxr-xr-x. 1 root root 3224540 Feb 5 06:39 ./test.mb
[root@localhost qemu]# ./microblaze-linux-user/qemu-microblaze ./test.mb
Hello world!
And I also generate tile "Hello world" static program:
[root@localhost qemu]# /upstream/release-tile/bin/tilegx-gchen-linux-gcc -Wall -O2 -static -o test.tgx test.c
[root@localhost qemu]# file ./test.tgx
./test.tgx: ELF 64-bit LSB executable, Tilera TILE-Gx, version 1 (SYSV), statically linked, for GNU/Linux 2.6.32, not stripped
[root@localhost qemu]# ls -l ./test.tgx
-rwxr-xr-x. 1 root root 3611376 Feb 5 06:42 ./test.tgx
I shall try to let tile "Hello world" static program run successfully
within this month:
- 1st patch: can run an empty elf64 tile executable in linux-user.
(try to finish within 2015-02-15).
- 2nd patch: can run "Hello world" elf64 tile program in linux-user.
(try to finish within 2015-02-25, it seems hard to finish in time).
- 3rd patch: for completion, or fixing issues, or documentations.
(try to finish within 2015-02-28).
Welcome any ideas, suggestions, and completions.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
next prev parent reply other threads:[~2015-02-04 22:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-25 12:06 [Qemu-trivial] [PATCH] linux-user/syscall.c: Let all lock_user_struct() and unlock_user_struct() paired with each other Chen Gang S
2015-01-25 12:06 ` [Qemu-devel] " Chen Gang S
2015-01-25 12:49 ` [Qemu-trivial] " Peter Maydell
2015-01-25 12:49 ` [Qemu-devel] " Peter Maydell
2015-01-25 21:59 ` [Qemu-trivial] " Chen Gang S
2015-01-25 21:59 ` [Qemu-devel] " Chen Gang S
2015-01-25 22:10 ` [Qemu-trivial] " Peter Maydell
2015-01-25 22:10 ` [Qemu-devel] " Peter Maydell
2015-01-26 14:59 ` [Qemu-trivial] " Chen Gang S
2015-01-26 14:59 ` [Qemu-devel] " Chen Gang S
2015-01-26 15:01 ` [Qemu-trivial] " Peter Maydell
2015-01-26 15:01 ` [Qemu-devel] " Peter Maydell
2015-01-26 23:02 ` [Qemu-trivial] " Chen Gang S
2015-01-26 23:02 ` [Qemu-devel] " Chen Gang S
2015-01-28 14:27 ` [Qemu-trivial] " Riku Voipio
2015-01-28 14:27 ` [Qemu-devel] " Riku Voipio
2015-01-28 22:09 ` [Qemu-trivial] " Chen Gang S
2015-01-28 22:09 ` [Qemu-devel] " Chen Gang S
2015-01-28 22:36 ` [Qemu-trivial] " Peter Maydell
2015-01-28 22:36 ` Peter Maydell
2015-01-29 1:37 ` [Qemu-trivial] " Chen Gang S
2015-01-29 1:37 ` Chen Gang S
2015-02-04 23:03 ` Chen Gang S [this message]
2015-02-04 23:03 ` Chen Gang S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54D2A547.8090404@sunrus.com.cn \
--to=gang.chen@sunrus.com.cn \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.