[Cbe-oss-dev] [PATCH] libspe2: Extended __ea support

Kazunori Asayama asayama at sm.sony.co.jp
Tue Apr 15 00:28:40 EST 2008


D. Herrendoerfer wrote:
> Asayama-san,
> 
> are you ok with this ? Then I'll add it.

Yes, please go ahead.

> 
> D.Herrendoerfer
> 
> On Sat, 2008-04-12 at 17:17 +0930, Alan Modra wrote:
>> On Fri, Apr 11, 2008 at 11:47:03PM +0900, Kazunori Asayama wrote:
>>> Alan Modra wrote:
>>>> +		if (r->r_info == ELF32_R_INFO(0,R_SPU_PPU32)) {
>>>> +			Elf32_Word *loc = reloc_base + r->r_offset;
>>>> +			Elf32_Word v = (Elf32_Word)(long)start + r->r_addend;
>>>> +			/* Don't dirty pages unnecessarily.  */
>>>> +			if (*loc != v)
>>>> +				*loc = v;
>>> IIRC, ELF images are embedded in the .rodata section.
>>> Is this write operation possible when the SPU ELF image is embedded in
>>> the PPU program?
>> The write won't be needed when embedded since the embedding process
>> will emit ppc or ppc64 relocs to relocate these fields.  However, I
>> had intended to change embedspu to put images into .data when an ._ea
>> section is detected.  The SPU needs to be able to write into ._ea.
>>
>>>> +			DEBUG_PRINTF("PPU32(%p) = %#x\n", loc, v);
>>>> +		} else if (r->r_info == ELF32_R_INFO(0,R_SPU_PPU32)) {
>>> I guess that this line should be:
>>>
>>> +		} else if (r->r_info == ELF32_R_INFO(0,R_SPU_PPU64)) {
>>>
>>> Right?
>> Oops, yes, indeed.  Corrected patch follows.
>>
>> Signed-off-by: Alan Modra <amodra at bigpond.net.au>
-- 
(ASAYAMA Kazunori
  (asayama at sm.sony.co.jp))
t



More information about the cbe-oss-dev mailing list