Robster posted on Dec 4 2005 at 05:31 AM said:
Quite funny really - Mr Mirko has spouted so much misinformation in this thread, and then Squidge shows how wrong he is, and now there's no response. Mr Mirko, no offence, but you have been
dead wrong about some things in this thread, and because you have a fairly high profile in the community, people are going to believe you. I would like to see you come along here and admit, publically, that you made some errors.
Here's what I
know about the 940T core in the MMSP2 chip:
1) It is an independent processor, with all of the capabilities of a normal ARM 940T CPU
2) As with all ARM940T processors, it does not have an MMU, but it does have a PU (Protection Unit, which is kinda-sorta like a cut-down MMU)
3) There is
nothing about the 940T core that is specialised for video processing. The MMSP2 chip has some video processing hardware built into it. That video processing hardware can be controlled equally well by either processor.
4) The 940T core is used by GPH's implementation of Linux to control video processing. That is because GPH decided to make it that way, the MMSP2 chip does not require it.
5) Using the 940T core in Linux for other tasks apart from video processing is a bit difficult, but as Squidge has shown, it is possible. In HH mode (or direct hardware, or whatever) it is
trivially easy to use the 940T core.
6) Linux on the GP2X is a great thing, because it means ports of SDL apps can be made very quickly and easily (as we are seeing at the moment). As the system matures, we will see more HH applications and these will use all of the hardware (including the 940T core) more effectively to give even better results than we are seeing at the moment.
7) Mr Mirko's drawing of the memory arrangement for the two cores was wrong, and it was a hopeless oversimplification. Here's a better drawing, and even then it is misleading because it is too simplified:
Code:
---------- -----------
| 64MB | |On-chip |
| SDRAM | |Peripherals|
---------- -----------
| |
----------- | | ----------
| 16kB Inst.| ------ ----- ------------ ----- ------ | 4kB Inst.|
| Cache |---| | | | | Memory | | | | |--| Cache |
----------- | 920T |---| MMU |---| Controller |---| PU |---| 940T | ----------
----------- | Core | | | | | | | | Core | ----------
| 16kB Data |---| | ----- ------------ ----- | |--| 4kb Data |
| Cache | ------ | ------ | Cache |
----------- | ----------
------------
| Static RAM |
| Bus |
------------
Each core contacts the Memory Controller to get data from the RAM. If they both access the RAM at the same time, then one will have to wait (for a very short time) for its data. However, each core has its own independent cache which will mean that the cores do not need to always fetch data or instructions from the RAM. Also, if a core accesses the on-chip peripherals (ie. the memory locations which control the on-chip hardware), then it does not prevent the other core from accessing RAM. There is yet another data path, called the "Static RAM bus", which is independent of the others. The only thing connected to this currently is the USB controller.
There are a bunch of people who've got together on IRC (#gp2xdev on EFnet), including me, Squidge, mr_spiv, DJWillis, and others who are making an SDK to enable people to program direct hardware relatively easily. Programming direct hardware on the GP2X,
including the 940T core, will be no harder than writing code for the GP32. And even though only a small percentage of programmers will choose to use this ability, some
very interesting things are going to happen! Look for public releases of sdk2x (which is our SDK) in the very near future, or come on #gp2xdev to join in the fun
Okay, i think i should answer to this.
to
1. I never said something against this...
2. The same thing, i posted here, no MMU, and the PU is useless, couse Linux can not use it.
3. I posted above, that you can run any code on it, and GPH is using it as an divx decoder.
4. same as 3.
5. I was all the time talking about Linux, and @ Linux it is not possible to run your second core. You must handselect, what to run on the second core, the OS does(and can not) not handle it, like on normal SMP machines. Also, my simple picture, is not wrong. Linux is using the first 32MB of ram, the other 32MB of RAM are used for the second core. (exactly my picture). Your picture is showing, how the hardware is build up, and how it is usable without an OS in the background. But the GPH Linux implementation, the memory is segmented in 32/32MB.
6. I never said other things...
7. It was not wrong, it showed, how the GPH Linux is using the dual cores. And if you want to use dualcore, you are stick to the 32/32mb segmetation too. ( You cant extend the Linux mem to e.g. 64MB)
Your diagramm is nice, (and i know the datasheet) , but for the noncoders it says nothing.
Okay, some things i did not know, was that you can independant clock the two cores.
But i think, if you want to use it, the best performance would be using the same clock for both cores.
Also, i want to explain (again), why the second core, is useless in my opinion. And i never wrote any miss information, and Squdge does not show me wrong. His example is an example, THAT the second core, runs under Linux, not more, not less. And i never said, that it would not run.
Okay, my last explanation, then this thread is dead for me.
The second core is useless, couse the OS ( Linux ) can not use it. The dualcore is not SMP cabable. This means, i can not use a simple fork, to run code on the second core.
You can only use the second core, and speed up things, if you rewrite the code, reload your second core programm to the >32MB segment ( and out of the Linux segment ). This is how GPH is using the second core.
ALSO, now, that we know, that the OS can not handle the second core, you must rewrite your code, to use the second core. And this is not a simple task. Using existing Emulator source is cool, but if you want to use the second core, you must rewrite some parts, and add syncronizing between dataexchange, and some semaphore technic.
Dont get me wrong, the gp2x was sold as Linux OS gaming machine, with dualcore support, and THIS is wrong. The second core is not supported by the OS (SMP).
Please do not say to me, that i spread missinformations.
Also squidge does not fill out my simple example, how to use the second core. Couse it is not useable this way. It is a lot more complicated...