so a quick question: what commands are needed?
MOV R0, #0x3F @ 4GB page starting at 0x0
MCR p15, 0, R0,c6,c0, 0 @ set as data memory region 0
MCR p15, 0, R0,c6,c0, 1 @ set as instruction memory region 0
MOV R0, #1 @ area 0 cachable/bufferable
MCR p15, 0, R0,c2,c0, 0 @ Write data cachable bits
MCR p15, 0, R0,c3,c0, 0 @ write bufferable bits
MCR p15, 0, R0,c2,c0, 1 @ write instruction cachable bits
MOV R0, #3 @ full access (read+write)
MCR p15, 0, R0,c5,c0, 0 @ write dataspace access permissions
MCR p15, 0, R0,c5,c0, 1 @ write inst space access permissions
MRC p15, 0, R0,c1,c0, 0 @ control register:
ORR R0, R0, #0x1000 @ icache enable
ORR R0, R0, #4 @ dcache enable
ORR R0, R0, #0xC0000000 @ async clock select + fast bus
ORR R0, R0, #1 @ protection unit enable
MCR p15, 0, R0,c1,c0, 0 @
Oops, I seemed to have single handedly managed to start a linux flame war :blink: That was certainly not the intention. We all know that the Linux on the GP2X is not exactly brilliant, but of course it can and will get better in future releases, either by GPH or the Open2X project.
so a quick question: what commands are needed?
Well, perhaps something like:
Code:MOV R0, #0x3F @ 4GB page starting at 0x0 MCR p15, 0, R0,c6,c0, 0 @ set as data memory region 0 MCR p15, 0, R0,c6,c0, 1 @ set as instruction memory region 0 MOV R0, #1 @ area 0 cachable/bufferable MCR p15, 0, R0,c2,c0, 0 @ Write data cachable bits MCR p15, 0, R0,c3,c0, 0 @ write bufferable bits MCR p15, 0, R0,c2,c0, 1 @ write instruction cachable bits MOV R0, #3 @ full access (read+write) MCR p15, 0, R0,c5,c0, 0 @ write dataspace access permissions MCR p15, 0, R0,c5,c0, 1 @ write inst space access permissions MRC p15, 0, R0,c1,c0, 0 @ control register: ORR R0, R0, #0x1000 @ icache enable ORR R0, R0, #4 @ dcache enable ORR R0, R0, #0xC0000000 @ async clock select + fast bus ORR R0, R0, #1 @ protection unit enable MCR p15, 0, R0,c1,c0, 0 @
Would do it?
That code was posted as the commands needed for the 940. It will only work on the 940, as it configures the MPU, whereas the 920 has a much more complicated MMU.
Thinking about it, a kernel module that would configure the upper 32mb properly would cure a lot of things. Also, if that same kernel module accepted some commands via a /dev entry or something like that to allow to easily run code in kernel mode and access interrupts, it could almost kill the need for a HH-mode alltogether, as there would be very little point for it.
linux is not pants. linux is underwear. in your case, probably road-tripp'ed underwear with skidmarks.
in my case, linux is a case of being girls panties, on the floor of my bedroom, a couple pairs scattered here and there, and i'm the one in bed with boxers on, nice and snug ..
Thinking about it, a kernel module that would configure the upper 32mb properly would cure a lot of things. Also, if that same kernel module accepted some commands via a /dev entry or something like that to allow to easily run code in kernel mode and access interrupts, it could almost kill the need for a HH-mode alltogether, as there would be very little point for it.
[QUOTE
Now thats a good Idea! I wonder however if the module would disrupt video playback. If it did I wonder if it could be loaded on demand like a modem or video card module.
That truly rock
Oops, I seemed to have single handedly managed to start a linux flame war :blink: That was certainly not the intention. We all know that the Linux on the GP2X is not exactly brilliant, but of course it can and will get better in future releases, either by GPH or the Open2X project.
There's nothing physically stopping you, but the cache needs to be in sync with memory.paeryn: Why can't you allow both processors to cache the same area of memory? That was exactly my intention. Let the 920 cache all 64MB and the 940 cache the upper 32MB. There is already a perfectly good IPC mechanism between the processors which doesn't depend on external memory, and if the need arises, it's easy enough to ask the processor to drain it's write buffer.
Any program that does use the 940 but relys on the memory model as it stands could really mess things up. The big problem is that you can protect / cache memory to your heart's desire on the 920, but any program running on the 940 potentially has free reign, it's not got Linux looking after it.Plus, why slow down the applications which don't make use of the multiprocessor support? This is why I said the module should be configurable via a /dev or /proc entry, so an application could state how it liked the memory setup.
linux is not pants. linux is underwear. in your case, probably road-tripp'ed underwear with skidmarks.
in my case, linux is a case of being girls panties, on the floor of my bedroom, a couple pairs scattered here and there, and i'm the one in bed with boxers on, nice and snug ..