The docs on the MagicEye's processor tells you how to set the base address of memory for the second processor and also tells you how to reset the second processor.Cant find any reference on how to make code run on second processor. Should it be loaded in the second 32Mb of memory? Ok. But after that?
1) code needs to loaded into physical memory aligned on a 16MB boundary (not a virtual address returned by malloc and friends). Under Linux, this address should also be 32mb or above.
2) Hold the second processor in reset whilst you give it your execution address, and then release the reset (see the MMSP2 pdf for how to do this)
3) Second processor runs your code whilst you do other stuff with the primary processor.
Note: Second processor can not run Linux code or access any Linux libraries or operating system calls. The code should either be PIC (Position independant) or located at the address you specified in (1). The easiest way to do this is by taking a GP32 dev kit and hacking up the linker script/etc.
Hrm...good question. My first instinct is that all of the interrupts are probably routed to the 920, but I guess it all depends on the interrupt source. It is totally possible that you can set a flag in a DMA command packet that says "interrupt the 940 instead of the 920". I hope that is the case because I plan on using the 940 for all I/O and sound so I'm going to need to do DMA from there.I didn't see any mistakes, I was just adding some (hopefully) useful information... ah well, I'm confused (as usual).
Anyway, yes the 940T does have a standard vector table at its 0x00000000. I have no idea how interrupts are handled between the cores - for example, if there's a sound DMA interrupt, how does the programmer control which core handles the interrupt? I guess all that will become clear in time...
Hrm...good question. My first instinct is that all of the interrupts are probably routed to the 920, but I guess it all depends on the interrupt source. It is totally possible that you can set a flag in a DMA command packet that says "interrupt the 940 instead of the 920". I hope that is the case because I plan on using the 940 for all I/O and sound so I'm going to need to do DMA from there.I didn't see any mistakes, I was just adding some (hopefully) useful information... ah well, I'm confused (as usual).
Anyway, yes the 940T does have a standard vector table at its 0x00000000. I have no idea how interrupts are handled between the cores - for example, if there's a sound DMA interrupt, how does the programmer control which core handles the interrupt? I guess all that will become clear in time...
(I got my email from gp32z on friday and it was scanned as "out for delivery" by USPS this morning. It should be there when I get home tonight. I'll finally get to write some code. )
Hrm...good question. My first instinct is that all of the interrupts are probably routed to the 920, but I guess it all depends on the interrupt source. It is totally possible that you can set a flag in a DMA command packet that says "interrupt the 940 instead of the 920". I hope that is the case because I plan on using the 940 for all I/O and sound so I'm going to need to do DMA from there.I didn't see any mistakes, I was just adding some (hopefully) useful information... ah well, I'm confused (as usual).
Anyway, yes the 940T does have a standard vector table at its 0x00000000. I have no idea how interrupts are handled between the cores - for example, if there's a sound DMA interrupt, how does the programmer control which core handles the interrupt? I guess all that will become clear in time...
(I got my email from gp32z on friday and it was scanned as "out for delivery" by USPS this morning. It should be there when I get home tonight. I'll finally get to write some code. )
Actually there is no way to 'flag' interrupts from various hardware sources to 940t.. at least none is documented, except that 920-940 interface. I wouldn't be surprised that 920 has to take care of interrupts coming from hardware and then trigger 940 via the 920-940 interface. Anyway, this is something to find out soon as my next thing to do exception handlers for the gp2x HH project.