On 5 November 2014 15:09, Greg Bellows <greg.bell...@linaro.org> wrote:
> Ah... I was confused and thinking of ttbcr_raw_write.  Yes, raw_write does
> not actually touch the masks.
>
> The reason we used raw_write is that it updates the correct ri offset.  We
> could be calling with the secure or non-secure ri so it was necessary to
> make sure the correct offset gets updated.

...but this doesn't help if you need to also update the mask etc.

> Staying with this pattern, I introduced a new utility function raw_ptr()
> that gives back the pointer calculation based on the ri fieldoffset.  For
> TCR, this will be the base of the TCR struct which we can then update.

Seems like overkill for one register, compared to just doing
 if (ri->secure == ...)

thanks
-- PMM

Reply via email to