* VPE loader support on 34K
@ 2009-03-25 14:37 ` Alan Wu
0 siblings, 0 replies; 5+ messages in thread
From: Alan Wu @ 2009-03-25 14:37 UTC (permalink / raw)
To: linux-mips
Hello,
I'm porting 2.6.26 Linux on the platform of MIPS 34K. Currently, the uni-processor
kernel model(1 VPE) and SMP model (2 VPE) are up and work perfectly.
Now, I need to port the AP/SP model on a normal Linux uniprocessor kernel model.
I'd like to load an application program (ELF ?) into kernel space where this
application will run on a Secondary VPE undisturbed by the Linux kernel.
After I enabled the MIPS_VPE_LOADER [=y] in .config , the kernel is up without
any error/warning message.
Please help :
1. How to load the application into VPE1 from VPE0 ? (cat XYZapp >/dev/vpe1 ?)
2. Is there any sample "Hello World" application for this ?
3. Any specific tool chain needed ?
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: VPE loader support on 34K
2009-03-25 14:37 ` Alan Wu
(?)
@ 2009-03-25 15:42 ` Ralf Baechle
-1 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2009-03-25 15:42 UTC (permalink / raw)
To: Alan Wu; +Cc: linux-mips
On Wed, Mar 25, 2009 at 10:37:20PM +0800, Alan Wu wrote:
> I'm porting 2.6.26 Linux on the platform of MIPS 34K. Currently, the uni-processor
> kernel model(1 VPE) and SMP model (2 VPE) are up and work perfectly.
>
> Now, I need to port the AP/SP model on a normal Linux uniprocessor kernel model.
> I'd like to load an application program (ELF ?) into kernel space where this
> application will run on a Secondary VPE undisturbed by the Linux kernel.
>
> After I enabled the MIPS_VPE_LOADER [=y] in .config , the kernel is up without
> any error/warning message.
>
> Please help :
>
> 1. How to load the application into VPE1 from VPE0 ? (cat XYZapp >/dev/vpe1 ?)
> 2. Is there any sample "Hello World" application for this ?
> 3. Any specific tool chain needed ?
I assume you're a MTI customer? If so I suggest you talk to customer
support. There are docs, SDE-based toolchain and example code showing
how to use this. If you understand the technical details it will not
be too difficult to figure out your own solution using a standard
Linux/MIPS toolchains but of course in that case you can't use any of
the userspace libraries for building an AP/SP program.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: VPE loader support on 34K
2009-03-25 14:37 ` Alan Wu
(?)
(?)
@ 2009-03-25 16:03 ` Kevin D. Kissell
-1 siblings, 0 replies; 5+ messages in thread
From: Kevin D. Kissell @ 2009-03-25 16:03 UTC (permalink / raw)
To: Alan Wu; +Cc: linux-mips
Alan Wu wrote:
> Hello,
>
> I'm porting 2.6.26 Linux on the platform of MIPS 34K. Currently, the uni-processor
> kernel model(1 VPE) and SMP model (2 VPE) are up and work perfectly.
>
> Now, I need to port the AP/SP model on a normal Linux uniprocessor kernel model.
> I'd like to load an application program (ELF ?) into kernel space where this
> application will run on a Secondary VPE undisturbed by the Linux kernel.
>
> After I enabled the MIPS_VPE_LOADER [=y] in .config , the kernel is up without
> any error/warning message.
>
> Please help :
>
> 1. How to load the application into VPE1 from VPE0 ? (cat XYZapp >/dev/vpe1 ?)
>
If I recall correctly, yes that's it.
> 2. Is there any sample "Hello World" application for this ?
> 3. Any specific tool chain needed ?
>
There was a sort of tool kit distributed by MIPS that provided examples,
a minimal C runtime library, and tool settings for AP/SP (aka APRP).
The binaries are ELF, but they aren't linked the way you'd link a
userland program (they either need to be relocatable, or be linked to
load at an appropriately high kernel segment address) and of course they
can't use standard C libraries that do system calls, though there is the
provision for open/close/read/write of files and devices via a Linux
kernel server. I'm no longer working for MIPS, so I don't have my copy
anymore, but I'd like to think that you could find a pointer to the tool
kit and documentation somewhere on MIPS's web site. And, as Ralf
suggested (after I'd started typing this message, but before I got to
the point of sending it) if you are a MIPS customer, or are a
subcontractor to one, MIPS customer support should definitely be able to
get you the necessary tool kit.
Regards,
Kevin K.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: VPE loader support on 34K
2009-03-25 14:37 ` Alan Wu
` (2 preceding siblings ...)
(?)
@ 2009-03-26 1:42 ` tiejun.chen
-1 siblings, 0 replies; 5+ messages in thread
From: tiejun.chen @ 2009-03-26 1:42 UTC (permalink / raw)
To: Alan Wu; +Cc: linux-mips
Alan Wu wrote:
> Hello,
>
> I'm porting 2.6.26 Linux on the platform of MIPS 34K. Currently, the uni-processor
> kernel model(1 VPE) and SMP model (2 VPE) are up and work perfectly.
>
> Now, I need to port the AP/SP model on a normal Linux uniprocessor kernel model.
> I'd like to load an application program (ELF ?) into kernel space where this
> application will run on a Secondary VPE undisturbed by the Linux kernel.
>
> After I enabled the MIPS_VPE_LOADER [=y] in .config , the kernel is up without
> any error/warning message.
>
> Please help :
>
> 1. How to load the application into VPE1 from VPE0 ? (cat XYZapp >/dev/vpe1 ?)
Exactly.
> 2. Is there any sample "Hello World" application for this ?
> 3. Any specific tool chain needed ?
I recommend you refer to the file, MIPS® SDE Programmers' Guide (.pdf).
http://www.mips.com/products/product-materials/processor/software/
It's easy to build the sample with SDE. And ever I program a sample to output
some messages from UART to validate AP/AP. I think even you can implement the
same to display something from the LED.
Best Regards
Tiejun
>
> Thanks.
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread