Skip to contentSkip to conversation

implementing ARM926EJ-S support

Qemu-devel Alessandro 4 participants 9 messages May 2, 2011 – May 9, 2011

lore
Share & tools
lore

Alessandro

author
#0 lore raw

Hi all!
I am an experencied QEMU user.
Although I am a good C/C++ programmer, I have only theoretic/basic knowledge about virtual machines programming.
For study, I'm thinking to write a simple VM that can simulate an ARM SoC based on ARM926EJ-S core.

I have basically two choice:

1- build all from scratch, full-simulating core and peripherals; 2- modify a pre-existing VM with ARM architecture support(QEMU).

Second option can be a viable way?

Thanks in advance

IT

#1 lore raw
Quoted 9 lines · Alessandro

For study, I'm thinking to write a simple VM that can simulate an ARM SoC based on ARM926EJ-S core.

I have basically two choice:

1- build all from scratch, full-simulating core and peripherals; 2- modify a pre-existing VM with ARM architecture support(QEMU).

Second option can be a viable way?

QEMU already implements an ARM926 model, so all you'd have to implement would be the peripheral models for whatever SoC you had in mind. That sounds much easier to me :-)

-- PMM

author
#2 lore raw

Thanks for your reply, Peter. :-)
Thanks for giving me good news.

According to what you say, would be better to pick QEMU source code, adding some peripherals and enjoy.

ARM core-related code appears to be located (mainly)under ARM directory; peripherals-related files should be located under "machine" dir.

I still have some questions about QEMU ARM926 support:

1- What standard extensions are supported? e.g Jazelle.

2- Sometimes, SoC includes "inusual"(and _poorly_ documented) hardware: ISP, video Coproc, and so on.
This increase significantly the final complexity of project. What are the "guidelines" to follow? What must be implemented, and what could be safely ignored?

Eventually, any indication - references to (official)docs included - would be appreciated. :-)

IT

________________________________
Da: Peter Maydell <[email protected]>
A: Alessandro <[email protected]>
Cc: [email protected]
Inviato: Lun 2 maggio 2011, 10:04:18
Oggetto: Re: [Qemu-devel] implementing ARM926EJ-S support

Quoted 9 lines · Alessandro

For study, I'm thinking to write a simple VM that can simulate an ARM SoC based on ARM926EJ-S core.

I have basically two choice:

1- build all from scratch, full-simulating core and peripherals; 2- modify a pre-existing VM with ARM architecture support(QEMU).

Second option can be a viable way?

QEMU already implements an ARM926 model, so all you'd have to implement would be the peripheral models for whatever SoC you had in mind. That sounds much easier to me :-)

-- PMM

#3 lore raw
Quoted 2 lines · Alessandro

ARM core-related code appears to be located (mainly)under ARM directory; peripherals-related files should be located under "machine" dir.

I'm not sure what source tree you're looking at. Code for ARM core as a target is in target-arm/. Device models are in hw/. (tcg/arm is support for emulating other CPUs on an ARM host, so not relevant for you.)

Quoted 3 lines

I still have some questions about QEMU ARM926 support:

1- What standard extensions are supported? e.g Jazelle.

We don't support Jazelle. We don't implement the TCMs (in the same way we don't implement caches). We probably don't get all the device-specific cp15 registers right. (None of that is likely to be of any practical importance.) I can't see anything else missing from a quick scan.

The rough rule of thumb for support is "if Linux uses it it's almost certainly supported; otherwise it might be missing or broken" :-)

Quoted 5 lines

2- Sometimes, SoC includes "inusual"(and _poorly_ documented) hardware: ISP, video Coproc, and so on.
This increase significantly the final complexity of project. What are the "guidelines" to follow? What must be implemented, and what could be safely ignored?

Well, if you're just doing things for your own amusement you can implement or leave out what you like. For things to be included in QEMU my personal opinion (I don't have a veto or anything) would be that the question is whether there's any benefit to the new SoC model that the existing ones don't provide -- is it some common piece of hardware that a lot of people own and might want to use a model of, for example? If you pass that hurdle then there is presumably an OS and set of applications that run on the real hardware, and the minimum level of peripheral support would be "enough to run that".

What SoC are you planning to model? I assume you have one in mind since you were specific about wanting the ARM926 rather than a more recent ARM core...

-- PMM

#4 lore raw

Alessandro, I think you can try add support for one of the Qualcomm MSM6100, MSM6125, MSM6225, MSM6245, MSM6250, MSM6255A, MSM6260, MSM6275, MSM6280, MSM6300, MSM6500, MSM6800;
Of course, if you dont know yet which you want.

Best regards,
Anton Kochkov.

Quoted 46 lines · Peter Maydell
Quoted 2 lines · Alessandro

ARM core-related code appears to be located (mainly)under ARM directory; peripherals-related files should be located under "machine" dir.

I'm not sure what source tree you're looking at. Code for ARM core as a target is in target-arm/. Device models are in hw/. (tcg/arm is support for emulating other CPUs on an ARM host, so not relevant for you.)

Quoted 3 lines

I still have some questions about QEMU ARM926 support:

1- What standard extensions are supported? e.g Jazelle.

We don't support Jazelle. We don't implement the TCMs (in the same way we don't implement caches). We probably don't get all the device-specific cp15 registers right. (None of that is likely to be of any practical importance.) I can't see anything else missing from a quick scan.

The rough rule of thumb for support is "if Linux uses it it's almost certainly supported; otherwise it might be missing or broken" :-)

Quoted 5 lines

2- Sometimes, SoC includes "inusual"(and _poorly_ documented) hardware: ISP, video Coproc, and so on.
This increase significantly the final complexity of project. What are the "guidelines" to follow? What must be implemented, and what could be safely ignored?

Well, if you're just doing things for your own amusement you can implement or leave out what you like. For things to be included in QEMU my personal opinion (I don't have a veto or anything) would be that the question is whether there's any benefit to the new SoC model that the existing ones don't provide -- is it some common piece of hardware that a lot of people own and might want to use a model of, for example? If you pass that hurdle then there is presumably an OS and set of applications that run on the real hardware, and the minimum level of peripheral support would be "enough to run that".

What SoC are you planning to model? I assume you have one in mind since you were specific about wanting the ARM926 rather than a more recent ARM core...

-- PMM

author
#5 lore raw

Hi, Anton.
Your proposal is also interesting :-)

It is well-documented hardware?

IT

________________________________
Da: Антон Кочков <[email protected]>
A: Peter Maydell <[email protected]>
Cc: Alessandro <[email protected]>; [email protected]
Inviato: Mar 3 maggio 2011, 00:04:13
Oggetto: Re: [Qemu-devel] implementing ARM926EJ-S support

Alessandro, I think you can try add support for one of the Qualcomm MSM6100, MSM6125, MSM6225, MSM6245, MSM6250, MSM6255A, MSM6260, MSM6275, MSM6280, MSM6300, MSM6500, MSM6800;
Of course, if you dont know yet which you want.

Best regards,
Anton Kochkov.

Quoted 46 lines · Peter Maydell
Quoted 2 lines · Alessandro

ARM core-related code appears to be located (mainly)under ARM directory; peripherals-related files should be located under "machine" dir.

I'm not sure what source tree you're looking at. Code for ARM core as a target is in target-arm/. Device models are in hw/. (tcg/arm is support for emulating other CPUs on an ARM host, so not relevant for you.)

Quoted 3 lines

I still have some questions about QEMU ARM926 support:

1- What standard extensions are supported? e.g Jazelle.

We don't support Jazelle. We don't implement the TCMs (in the same way we don't implement caches). We probably don't get all the device-specific cp15 registers right. (None of that is likely to be of any practical importance.) I can't see anything else missing from a quick scan.

The rough rule of thumb for support is "if Linux uses it it's almost certainly supported; otherwise it might be missing or broken" :-)

Quoted 5 lines

2- Sometimes, SoC includes "inusual"(and _poorly_ documented) hardware: ISP, video Coproc, and so on.
This increase significantly the final complexity of project. What are the "guidelines" to follow? What must be implemented, and what could be safely ignored?

Well, if you're just doing things for your own amusement you can implement or leave out what you like. For things to be included in QEMU my personal opinion (I don't have a veto or anything) would be that the question is whether there's any benefit to the new SoC model that the existing ones don't provide -- is it some common piece of hardware that a lot of people own and might want to use a model of, for example? If you pass that hurdle then there is presumably an OS and set of applications that run on the real hardware, and the minimum level of peripheral support would be "enough to run that".

What SoC are you planning to model? I assume you have one in mind since you were specific about wanting the ARM926 rather than a more recent ARM core...

-- PMM

author
#6 lore raw
In reply to Peter Maydell
Quoted 2 lines

I'm not sure what source tree you're looking at. Code for ARM core as a target is in target-arm/.

Exactly that.

Quoted 4 lines

We don't support Jazelle. We don't implement the TCMs (in the same way we don't implement caches). We probably don't get all the device-specific cp15 registers right. (None of that is likely to be of any practical importance.)

I have noticed that fully-simulating TCMs could be very difficult too.
My first trouble - for now - is: I can not distinguish beetween _CRITICAL_ features(that must be implemented) and _OPTIONAL_ features which can be omitted for simplicity.

Quoted 3 lines

What SoC are you planning to model? I assume you have one in mind since you were specific about wanting the ARM926 rather than a more recent ARM core...

I was originally thinking to TI-DM365: as you can see, this SoC includes several _inusual_ peripherals, other than main core ARM926.

Linux runs on it: https://linuxlink.timesys.com/dev_center/dm365

IT

#7 lore raw

Hi,

Am 03.05.2011 um 14:56 schrieb Alessandro:

Quoted 8 lines
Quoted 4 lines

What SoC are you planning to model? I assume you have one in mind since you were specific about wanting the ARM926 rather than a more recent ARM core...

I was originally thinking to TI-DM365: as you can see, this SoC includes several _inusual_ peripherals, other than main core ARM926.

Linux runs on it: https://linuxlink.timesys.com/dev_center/dm365

Have you checked if some QEMU fork already emulates the Leopardboard 365? [1] At least the BeagleBoard is available somewhere, not sure about the other animals.

Andreas

[1] http://designsomething.org/leopardboard/default.aspx

#8 lore raw
Quoted 4 lines · Andreas Färber

Have you checked if some QEMU fork already emulates the Leopardboard 365?

At least the BeagleBoard is available somewhere, not sure about the other animals.

Beagle is a different SoC (OMAP3). I have a patchstack with omap3 support in qemu-linaro that I need to clean up and submit for review. There might be some other tree with leopard support, of course.

-- PMM