RE: [PATCH 08/16] OMAP3: Populate scratchpad contents

Woodruff, Richard
2008-10-30T00:33:36Z

> I assume memory is being corrupted, but it also given an address in the
> virtual memory map of the kernel. How is the ROM code halding a virtual
> address? Just ignoring the upper bits?
>
> >> I believe what is intented is for arm_context_addr to be a physical
> >> memory address, right? I've converted this to virt_to_phys().

Humm, not sure. I'm thinking ROM code isn't using it in this form. The .S code is stacking context there prior to sleep. On wake you un-stack from it.

> > Yes virt_to_phys() should be here. Current 2.6.24 kernel's do it this way
> also.
>
> Which begs the question why the patch sent to the list is using io_p2v()
> introducing a bug which was only caught by accident because it also
> introduced a compiler warning.

IIRC, when OFF was first introduced the bug was in internal code also. It was later fixed. The branch point for initial open source code probably was before the fix.

Also strangely, the previous code worked on SDP. When it was ported to a different board it crashed. That is when the fix came in.

Regards,
Richard W.